From owner-freebsd-emulation Wed Sep 13 12:43:17 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 3EC5F37B424; Wed, 13 Sep 2000 12:43:11 -0700 (PDT) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id PAA24950; Wed, 13 Sep 2000 15:43:09 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.0/8.9.1) id e8DJh8749427; Wed, 13 Sep 2000 15:43:08 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 13 Sep 2000 15:43:08 -0400 (EDT) To: freebsd-emulation@freebsd.org, freebsd-java@freebsd.org Subject: IBM JDK 1.3 now working (pointer to patches) X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14783.55339.269170.481033@grasshopper.cs.duke.edu> 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. Drew ------------------------------------------------------------------------------ Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin Duke University Email: gallatin@cs.duke.edu Department of Computer Science Phone: (919) 660-6590 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message