Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2000 15:43:08 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        freebsd-emulation@freebsd.org, freebsd-java@freebsd.org
Subject:   IBM JDK 1.3 now working (pointer to patches)
Message-ID:  <14783.55339.269170.481033@grasshopper.cs.duke.edu>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14783.55339.269170.481033>