From owner-freebsd-emulation Thu Sep 5 11:40:46 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A75F137B400 for ; Thu, 5 Sep 2002 11:40:42 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FF4943E3B for ; Thu, 5 Sep 2002 11:40:42 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17n1YQ-000DOm-00; Thu, 05 Sep 2002 19:40:34 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17n1YP-0001yp-00; Thu, 05 Sep 2002 19:40:33 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 05 Sep 2002 19:40:33 +0100 (BST) From: Duncan Barclay To: Marcel Moolenaar Subject: Re: TIOCSCTTY not implemented in linuxulator? Cc: emulation@FreeBSD.org Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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