Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Mar 2001 23:05:23 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/alpha/linux linux_machdep.c
Message-ID:  <XFMail.010307230523.jhb@FreeBSD.org>
In-Reply-To: <20010307225230.A27093@grasshopper.cs.duke.edu>

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

On 08-Mar-01 Andrew Gallatin wrote:
> John Baldwin [jhb@FreeBSD.org] wrote:
>> jhb         2001/03/05 18:55:23 PST
>> 
>>   Modified files:
>>     sys/alpha/linux      linux_machdep.c 
>>   Log:
>>   Create clone'd linux processes as stopped processes at first and don't
>>   actually make them runnable until after the emulator layer has had a
>>   chance
>>   to perform fixups.
> 
> This change causes the entire machine to lock up when it runs a
> threaded linux binary.  I can still break into the debugger, but
> that's about it.  Reverting this commit fixes the problem.
> 
> When I break into the debugger, the state is this:
> 
> db> ps
>   pid   proc     addr    uid  ppid  pgrp  flag stat wmesg   wchan   cmd
>  3878 fffffe0006845400 fffffe00068aa000    0   160   160 000100  2           
> sendmail
>  3877 fffffe0006844580 fffffe00068cc000    0   164   164 000000  2           
> sshd
>  3876 fffffe0006845b40 fffffe0006896000 1387  3875  3874 000002  2           
> ex6
>  3875 fffffe0006844920 fffffe00068c8000 1387  3874  3874 000002  3    poll
> fffffc0000657d38 ex6
>  3874 fffffe0006844cc0 fffffe00068b2000 1387  3833  3874 004002  2           
> ex6
>  3833 fffffe0006845ee0 fffffe0006888000 1387  3832  3833 2004002  3  opause
> fffffe00068881a8 tcsh
>  3832 fffffe0006846280 fffffe000687c000    0   164   164 000100  2           
> sshd
>   244 fffffe0006846620 fffffe0006878000 1387   242   244 004002  3   ttyin
> fffffe0000617a50 tcsh
>   242 fffffe00058e24e0 fffffe00067e0000    0   164   164 000100  3  select
> fffffc0000657d38 sshd
>   238 fffffe00068469c0 fffffe0006868000    0     1   238 004002  2           
> getty
>   237 fffffe0006846d60 fffffe0006862000    0     1   237 004002  3   ttyin
> fffffe00005fe210 getty
>   236 fffffe0006847100 fffffe000685e000    0     1   236 004002  3   ttyin
> fffffe00005fe610 getty
>   235 fffffe00058e2880 fffffe00067dc000    0     1   235 004002  3   ttyin
> fffffe00004cac10 getty
>   230 fffffe00058e1660 fffffe000680e000    0     1   230 000000  3  sbwait
> fffffe000614cce8 zhm
>   164 fffffe00058dfd00 fffffe000683a000    0     1   164 000000  2           
> sshd
>   160 fffffe0006847be0 fffffe0006848000    0     1   160 000100  2           
> sendmail
>   157 fffffe0006847840 fffffe000684e000    0     1   157 000000  3  nanslp
> fffffc000065714c cron
>   155 fffffe00068474a0 fffffe0006852000    0     1   155 000000  3  select
> fffffc0000657d38 inetd
>   136 fffffe00058e0f20 fffffe0006818000    0     1   136 000000  3  select
> fffffc0000657d38 amd
>   130 fffffe00058e00a0 fffffe000682c000    0     1   125 000000  3  nfsidl
> fffffc0000693270 nfsiod
> <...>
> 
> The "interesting" process is ex6 -- this is a test program from the
> LinuxThreads examples directory.
> 
> Perhaps this is DES's problem on x86 too? (I don't have INVARIANTS,
> witness, etc turned on right now).

Most likely.  Hmmmm.  The only difference here is that the new process stays at
SIDL until rfork returns and then gets put in SRUN later after we've dinked
with the process. :(  We use the same trick with kthreads to ensure that they
aren't executed before the fork handler is setup to keep the thread in the
kernel.  Well, after wandering through all of the fork code, I can't see where
this is going wrong, but I'll try to throw in some more debugging stuff to see
what I can turn up.

> Drew

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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