(Yikes, my message turned out to be a bit long, sorry)
I did a little poking around.
I'm running -current as of last Saturday:
# uname -a
FreeBSD panic.localdomain 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sat Oct
21 22:20:11 PDT 2000 [EMAIL PROTECTED]:/usr/obj/usr/local/cvs
up/current/src/sys/PANIC i386
On Mon, Oct 23, 2000 at 12:27:25AM +0000, Bigbear wrote:
> i update my system from 4.1 to current, when system boot, it hangs when:
> start elf ldconfig: /usr/lib /usr/lib/compat /usr/X11R6/lib
> why?
I am also having this problem. If you interrupt it (with ^\ to send
SIGQUIT), ldconfig generates a core. Then ldconfig will hang while
setting a.out ldconfig path:
^Csetting a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout
This can be interrupted too, and then it hangs while starting sshd.
Interrupting sshd allows the boot to procede.
I got a core from each program during the hang, and here's what I
found:
Here's the backtrace from the core obtained from ldconfig (rebuilt
with -g) the first time around:
(starting elf ldconfig)
(gdb) bt
#0 0x8054340 in read ()
#1 0x804c966 in mktemp ()
#2 0x804ca33 in arc4random_stir ()
#3 0x804cad9 in arc4random ()
#4 0x804c791 in mktemp ()
#5 0x804c692 in mkstemp ()
#6 0x804886a in write_elf_hints ()
#7 0x8048818 in update_elf_hints ()
#8 0x8048c61 in main ()
#9 0x8048139 in _start ()
And the second time around:
(setting a.out ldconfig path)
(gdb) bt
#0 0x8054340 in read ()
#1 0x804c966 in mktemp ()
#2 0x804ca33 in arc4random_stir ()
#3 0x804cad9 in arc4random ()
#4 0x804c791 in mktemp ()
#5 0x804c692 in mkstemp ()
#6 0x8049590 in buildhints ()
#7 0x8048e39 in main ()
#8 0x8048139 in _start ()
And from sshd:
(gdb) bt
#0 0x28208784 in read () from /usr/lib/libc.so.4
#1 0x282081ce in __sread () from /usr/lib/libc.so.4
#2 0x281f67a6 in __srefill () from /usr/lib/libc.so.4
#3 0x281f23bd in fread () from /usr/lib/libc.so.4
#4 0x281217c1 in RAND_SSLeay () from /usr/lib/libcrypto.so.1
#5 0x28121869 in RAND_SSLeay () from /usr/lib/libcrypto.so.1
#6 0x281212cc in RAND_bytes () from /usr/lib/libcrypto.so.1
#7 0x28146099 in DSA_OpenSSL () from /usr/lib/libcrypto.so.1
#8 0x28146151 in BN_rand () from /usr/lib/libcrypto.so.1
#9 0x280e4561 in BN_is_prime_fasttest () from /usr/lib/libcrypto.so.1
#10 0x280e3e03 in BN_generate_prime () from /usr/lib/libcrypto.so.1
#11 0x280da4a8 in RSA_generate_key () from /usr/lib/libcrypto.so.1
#12 0x8059437 in getsockname ()
#13 0x804c35b in getsockname ()
#14 0x804b76d in getsockname ()
Running ldconfig manually, 'top' shows ldconfig sleeping on 'rndblk':
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
...
228 root 46 0 216K 104K rndblk 0:00 0.00% 0.00% ldconfig
More investigation:
# fstat /dev/urandom
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME
root ldconfig 228 3 / 7973 crw-r--r-- urandom r /dev/urandom
# ps auxw | grep ldconfig
root 228 0.0 0.4 216 104 d0 I 2:18AM 0:00.00 ldconfig -elf /usr/lib
This commit from Peter Wemm on Oct 18 might shed some light:
>
> peter 2000/10/18 03:39:18 PDT
>
> Modified files:
> sys/dev/random randomdev.c
> Log:
> Attempt to fix the random read blocking. The old code slept at
> priority "0" and without PCATCH, so it was uninterruptable. And
> even when it did wake up after entropy arrived, it exited after the
> wakeup without actually reading the freshly arrived entropy. I
> sent this to Mark before but it seems he is in transit.
> Mark: feel free to replace this if it gets in your way.
>
> Revision Changes Path
> 1.16 +14 -15 src/sys/dev/random/randomdev.c
Maybe this is a related problem (except now random read blocking is
interruptable?)
--
Brian O'Shea
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message