Re: newfs silently fails if random is not ready (?)

From: Conrad Meyer <cem_at_freebsd.org>
Date: Tue, 4 Sep 2018 13:37:59 -0700
Hi Lev,

Newfs just uses arc4random(3) to generate its FSID and generation
numbers.  arc4random(3) is seeded from getentropy(3) -> getrandom(2)
-> read_random_uio(9), which is what produces the "random:
read_random_uio unblock wait" messages.

Is newfs tripping on a raise()/abort() in arc4random(3) /
getentropy(3)?  Is your program that runs newfs checking for non-zero
exit status?  Do you see any newfs cores when this happens?

Thanks,
Conrad

On Tue, Sep 4, 2018 at 1:08 PM, Lev Serebryakov <lev_at_freebsd.org> wrote:
> Hello FreeBSD,
>
>  I have problems with diskless install when kernel doesn't have tmpfs and
> random device takes long time to unlock.
>
>  Looks like newfs used to create in-memory /etc (on /dev/md0) silently fail
> to create FS.
>
>  I've added '-XL' options to mdmfs and it looks like this:
>
> da0: quirks=0x2<NO_6_BYTE>
> arc4random: no preloaded entropy cache
> arc4random: no preloaded entropy cache
> *** Figure out our NFS root path ***
> *** handle_remount /conf ***
> *** templates are base default ***
> *** handle_remount /conf/base/etc ***
> *** handle_remount /conf/base/var ***
> *** handle_remount /conf/default/etc ***
> *** handle_remount /conf/default/var ***
> *** create_md etc with size 20480 ***
> DEBUG: running: /sbin/mdconfig -a -t swap -s 10485760B
> DEBUG: running: /sbin/newfs -U /dev/md0
> random: read_random_uio unblock wait
> random: read_random_uio unblock wait
> random: unblocking device.
> DEBUG: running: /sbin/mount /dev/md0 /etc
> mount: /dev/md0: No such file or directory
> mdmfs: mount exited with error code 1
>
>  "/dev/md0" is here, but it is empty, without any FS.
>
>  I could run "/sbin/newfs -U /dev/md0" later by hands and it works.
>
> --
> Best regards,
>  Lev                          mailto:lev_at_FreeBSD.org
>
> _______________________________________________
> freebsd-fs_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe_at_freebsd.org"
Received on Tue Sep 04 2018 - 18:46:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:18 UTC