Date: Thu, 05 Sep 2002 19:40:33 +0100 (BST) From: Duncan Barclay <dmlb@dmlb.org> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: emulation@FreeBSD.org Subject: Re: TIOCSCTTY not implemented in linuxulator? Message-ID: <XFMail.20020905194033.dmlb@computer.my.domain> In-Reply-To: <XFMail.20020905174357.dmlb@computer.my.domain>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05-Sep-2002 Duncan Barclay wrote: > > On 05-Sep-2002 Marcel Moolenaar wrote: >> On Thu, Sep 05, 2002 at 10:31:18AM +0100, Duncan Barclay wrote: > > Will dig a bit more, but I have already noticed that matlab -nojvm > doesn't spawn any threads. However, with the JVM about four or five > threads are created. I suspect something is broken in the killing of > threads. This does indeed seem to tbe the case. With the JVM running, matlab spawns a thread tree like this: PID 6255 (0x186f) matlab programme 6303 (0x189f) matlab_helper - real programme 6304 (0x18a0) jvm, sibling thread of 6255 6305 (0x18a1) jvm, sibling thread of 6304 6306 (0x18a2) jvm, sibling thread of 6304 6307 (0x18a3) jvm, sibling thread of 6304 When the command "exit" is typed at the matlab propmt, the sibling threads are all killed with signal 0x21 by the jvm parent pid=6304. This thread reaps the children with wait4 and options of 0x80000000 (WLINUXCLONE). ktrace then tells us: jvm parent kill itself and exits 6304 matlab RET linux_kill 0 6304 matlab CALL exit(0) matlab notices that the JVM dies, 6255 matlab RET linux_rt_sigsuspend -1 errno 4 Interrupted system call 6255 matlab PSIG SIGCHLD caught handler=0x28c97460 mask=0x80000000 code=0 x0 matlab parent tries to reap any dead children, with no options. this call never returns 6255 matlab CALL linux_wait4(0xffffffff,0xbfbfa1b0,0,0) At this point ps shows PGID PID PPID WCHAN STAT TT TIME COMMAND 6255 6255 5319 wait I+ p1 0:00.93 /ide3.g/matlab6p1/bin/glnx86/matlab 6255 6404 6255 - Z+ p1 0:00.00 (matlab) and a kill -9 is needed. Should the wait4 by pid=6255 actually have the WCLONE option set? It is reaping a cloned process. Duncan -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King 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?XFMail.20020905194033.dmlb>