From owner-freebsd-emulation Wed Sep 13 14: 0:19 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from news.IAEhv.nl (news.IAE.nl [194.151.64.4]) by hub.freebsd.org (Postfix) with ESMTP id 8647A37B42C for ; Wed, 13 Sep 2000 14:00:14 -0700 (PDT) Received: (from uucp@localhost) by news.IAEhv.nl (8.9.1/8.9.1) with IAEhv.nl id XAA11085 for emulation@freebsd.org; Wed, 13 Sep 2000 23:00:13 +0200 (MET DST) Received: from localhost (localhost [127.0.0.1]) by bowtie.nl (8.8.8/8.8.8) with ESMTP id WAA16252 for ; Wed, 13 Sep 2000 22:58:54 +0200 (CEST) (envelope-from marc@bowtie.nl) Message-Id: <200009132058.WAA16252@bowtie.nl> X-Mailer: exmh version 2.1.1 10/15/1999 To: emulation@freebsd.org Subject: Re: IBM JDK 1.3 now working (pointer to patches) In-reply-to: gallatin's message of Wed, 13 Sep 2000 15:43:08 -0400. <14783.55339.269170.481033@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 13 Sep 2000 22:58:54 +0200 From: Marc van Kempen Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > I've finally gotten the IBM jdk 1.3 working. I haven't tested it very > heavily AWT stuff seems to finally work though. > > Here's an an updated patchset to a pre-SMPng -current. The patchset > does the following: > > - changes MINSIGSTKSZ from 8192 to 2048 > - implements linux_rt_sendsig() & linux_rt_sigreturn() > - implements userland sigtramp code for linux_rt_sigreturn() > - implements linux_to_bsd_sigaltstack & bsd_to_linux_sigaltstack() to > fix a bug in linux_sigaltstack & to avoid lots of cut-n-paste in > linux_rt_sigreturn(). This also fixes the "Java HotSpot(TM) > Client VM warning: cannot uninstall alt signal stack" one sees with > Sun's 1.3 JDK. > - changes the MAP_STACK flag to MAP_ANON for LINUX_MAP_GROWSDOWN > mmaps. This was the final step in getting it working. Any VM gurus > out there want to talk about this one? There's aparently > something wrong with autogrowing linux thread stacks[*] > > Patches at: http://www.cs.duke.edu/~gallatin/linux_sa_siginfo/diff > > [*]The "problem" is the heuristic used by vm_map_growstack() to > determine whether the stack part of the main process stack. We > currently use: > > is_procstack = addr >= (vm_offset_t)vm->vm_maxsaddr; > > where vm->vm_maxsaddr comes from exec_new_vmspace(): > vmspace->vm_maxsaddr = (char *)USRSTACK - MAXSSIZ; > > The IBM JDK's main thread reduces it's stack size to rlim_cur=2040*1024. > It then creates stacks for its threads at addresses which are greater > than vm_maxsaddr but less than the current bottom of the main process > stack as defined by p->p_rlimit[RLIMIT_STACK].rlim_cur. The first time > a thread accesses something requiring this region to grow, it goes > down in flames. > Great work Andrew, I wish I could have helped, I tried, but this is beyond my capabilities I'm afraid. Marc. -- ---------------------------------------------------- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!! Wij zijn verhuisd! Onze telefoonnr's en !!!!! !!!! ons adres zijn gewijzigd. !!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Marc van Kempen BowTie Technology Raiffeisenstraat 7 5611 CH Eindhoven tel. +31 40 2 64 98 60 mailto:marc@bowtie.nl fax. +31 40 2 64 98 61 http://www.bowtie.nl ---------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message