-CURRENT on VBox is broken (was: Re: buildworld fails with "Zero byte read from file, skipping rest) of line"

From: Jeremie Le Hen <jlh_at_FreeBSD.org>
Date: Fri, 7 Feb 2014 15:17:14 +0100
On Wed, Jan 15, 2014 at 12:36:53PM +0100, Jeremie Le Hen wrote:
> On Wed, Jan 15, 2014 at 12:40:35PM +0400, Gleb Smirnoff wrote:
> > J> > 
> > J> > Can you try to reproduce this with unmapped I/O turned off in boot loader?
> > J> 
> > J> I've never heard of that.  Can you please point me to the right
> > J> code/doc?
> > 
> > In loader prompt:
> > 
> > OK set vfs.unmapped_buf_allowed=0
> > OK boot
> 
> No, unfortunately I still have the same problem without unmapped bufs.

Ok, I'm back to try to try building world on VirtualBox with a recent
-CURRENT.

So, on a new workstation, I've installed a new VirtualBox, downloaded
the latest i386 snapshot and installed it:
FreeBSD-11.0-CURRENT-i386-20140203-r261419-disc1.iso

Things started to be shady when I tried to build and install
ports-mgmt/pkg:

% install -s -o root -g wheel -m 555   pkg-static /usr/ports/ports-mgmt/pkg/work/stage/usr/local/sbin/pkg-static
% strip: /usr/ports/ports-mgmt/pkg/work/stage/usr/local/sbin/pkg-static: File format not recognized

So I tried to disallow VFS unmapped bufs as you advised me and this
seems to have solved the problem (but maybe by chance, see below).


Now I'm still running with vfs.unmapped_buf_allowed=0, I installed all
the ports I need for basic development.  I fetched freebsd-src from
GitHub and tried to build world...  And now it's started to be very
wacky: it failed, multiple times, but never at the same place (I removed
/usr/obj/* between each run).

There is at least something consistent, it always fails with the same
error ".../.depend: Zero byte read from file, skipping rest of line.":

% [jlh_at_freefall ~/www/wacky_buildworld_on_vbox]$ grep -B 1 -A 5 'warning: Zero byte read from file' *                                                                                                                                 
% typescript.fail1.txt-TMP=_depend$$;  sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.So:/' < .depend  > $TMP;  mv $TMP .depend
% typescript.fail1.txt:make[4]: "/usr/obj/usr/src/kerberos5/lib/libheimbase/.depend" line 3: warning: Zero byte read from file, skipping rest of line.
% typescript.fail1.txt-make[4]: "/usr/obj/usr/src/kerberos5/lib/libheimbase/.depend" line 3: Need an operator
% typescript.fail1.txt-make[4]: "/usr/obj/usr/src/kerberos5/lib/libheimbase/.depend" line 4: Need an operator
% typescript.fail1.txt-make[4]: Fatal errors encountered -- cannot continue
% typescript.fail1.txt-make[4]: stopped in /usr/src/kerberos5/lib/libheimbase
% typescript.fail1.txt-*** Error code 1
% --
% typescript.fail2.txt-TMP=_depend$$;  sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.So:/' < .depend  > $TMP;  mv $TMP .depend
% typescript.fail2.txt:make[3]: "/usr/obj/usr/src/tmp/usr/src/kerberos5/lib/libvers/.depend" line 3: warning: Zero byte read from file, skipping rest of line.
% typescript.fail2.txt-make[3]: "/usr/obj/usr/src/tmp/usr/src/kerberos5/lib/libvers/.depend" line 3: Need an operator
% typescript.fail2.txt-make[3]: "/usr/obj/usr/src/tmp/usr/src/kerberos5/lib/libvers/.depend" line 4: Need an operator
% typescript.fail2.txt-make[3]: Fatal errors encountered -- cannot continue
% typescript.fail2.txt-make[3]: stopped in /usr/src/kerberos5/lib/libvers
% typescript.fail2.txt-*** Error code 1
% --
% typescript.fail3.txt-echo libroken.so.11: /usr/obj/usr/src/tmp/usr/lib/libcrypt.a >> .depend
% typescript.fail3.txt:make[4]: "/usr/obj/usr/src/kerberos5/lib/libroken/.depend" line 3: warning: Zero byte read from file, skipping rest of line.
% typescript.fail3.txt-make[4]: "/usr/obj/usr/src/kerberos5/lib/libroken/.depend" line 3: Need an operator
% typescript.fail3.txt-make[4]: "/usr/obj/usr/src/kerberos5/lib/libroken/.depend" line 4: Unknown directive
% typescript.fail3.txt-make[4]: Fatal errors encountered -- cannot continue
% typescript.fail3.txt-make[4]: stopped in /usr/src/kerberos5/lib/libroken
% typescript.fail3.txt-*** Error code 1
% --
% typescript.fail4.txt-echo asn1_compile: /usr/lib/libc.a /usr/obj/usr/src/tmp/usr/src/kerberos5/tools/asn1_compile/../../lib/libroken/libroken.a /usr/obj/usr/src/tmp/usr/src/kerberos5/tools/asn1_compile/../../lib/libvers/libvers.a /usr/obj/usr/src/tmp/legacy/usr/lib/libegacy.a >> .depend
% typescript.fail4.txt:make[3]: "/usr/obj/usr/src/tmp/usr/src/kerberos5/tools/asn1_compile/.depend" line 3: warning: Zero byte read from file, skipping rest of line.
% typescript.fail4.txt-make[3]: "/usr/obj/usr/src/tmp/usr/src/kerberos5/tools/asn1_compile/.depend" line 3: Need an operator
% typescript.fail4.txt-make[3]: "/usr/obj/usr/src/tmp/usr/src/kerberos5/tools/asn1_compile/.depend" line 4: Need an operator
% typescript.fail4.txt-make[3]: Fatal errors encountered -- cannot continue
% typescript.fail4.txt-make[3]: stopped in /usr/src/kerberos5/tools/asn1_compile




Any idea how to debug this?

-- 
Jeremie Le Hen

Scientists say the world is made up of Protons, Neutrons and Electrons.
They forgot to mention Morons.
Received on Fri Feb 07 2014 - 13:27:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:46 UTC