Subject: Re: ld.so musings
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Alex Hayward <xelah@ferret.lmh.ox.ac.uk>
List: port-arm32
Date: 03/19/1998 18:28:58
On Thu, 19 Mar 1998, Jason Thorpe wrote:

> On Thu, 19 Mar 1998 09:43:34 +0000 (GMT) 
>  Alex Hayward <xelah@ferret.lmh.ox.ac.uk> wrote:
> 
>  > The machine just stops. (I mean badly in terms of results, not in terms of
>  > source code, since I haven't looked at the source code and probably
>  > wouldn't get far if I did...). The first I noticed was after installing a
>  > new libc in which system called the new vfork. Thereafter man caused the
>  > system to hang.
> 
> Did you just install a new library and then it started to lose?  The whole
> point of naming the call __vfork14() (and using the symbol renaming hack)
> was so that in order to use it, programs would have to be recompiled and
> relinked before they got the address space sharing semantics (otherwise, they
> fell back on the old 4.4BSD vfork(), which only blocks the parent; no
> shared address space, no VM changes in the code path).  This was to prevent
> those programs which used vfork() unsafely (due to the broken 4.4BSD vfork()
> semantics) from losing.

I just installed the new library.

> Ah, but man(1) probably calls system(3).  Do things like make(1) work if
> they're linked against __vfork14()?

No.

When it first happened I put a whole load of printfs in to man, and then
in to system() (which is where man hung). The vfork call was reached, but
did not return (at least, didn't return in a state in which printf
worked). Keyboard hung, cursor stopped flashing, etc etc.

I've now done a sup -svo, make includes, rebuilt config, configured a
kernel, make clean && make depend and make for the new kernel, rebooted on
it, rebuilt csu, make clean && make depend && make on libc and then
statically ('cos I was still waiting for the shared c lib to build) linked
a rebuilt man with -current versions of libc, libg++ and crt0.o. The
problem was still there. 

The kernel wasn't configured with GENERIC, though, I've removed support
for all but ARM610 CPUs, and cards that I don't use.

I'll send a pr.

> ...and read current-users.  I _strongly_ suggest that ANYONE running
> -current read current-users.  Also, people should get on netbsd-bugs
> and netbsd-users...

Actually, I do read current-users, which is how I knew about the new
vfork.

-- 
alex@hayward.u-net.com; xelah@ferret.lmh.ox.ac.uk