usr.bin/xinstall r366697 versus: buildworld: lib/libc: install: short write to libc.so.7.debug: [_libinstall] Error code 71

From: Graham Perrin <grahamperrin_at_gmail.com>
Date: Mon, 23 Nov 2020 12:18:20 +0000
On 22/11/2020 12:00, Dimitry Andric wrote:
> …
> I'd guess it's an unintended side-effect of
> https://svnweb.freebsd.org/base?view=revision&revision=366697
> ("install(1): Avoid unncessary fstatfs() calls and use mmap() based on
> size").
>
> If you only revert usr.bin/xinstall to r366696, and then rebuild it,
> does it still occur?
>
> -Dimitry

Thank you!

Success with r366696:

----

root_at_mowa219-gjp4-8570p:~ # date ; uname -v
Sun Nov 22 14:36:10 GMT 2020
FreeBSD 13.0-CURRENT #71 r367081: Tue Oct 27 23:56:28 GMT 2020 
root_at_momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
root_at_mowa219-gjp4-8570p:~ # svn up /usr/src && portsnap auto
Updating '/usr/src':
At revision 367936.
Looking up portsnap.FreeBSD.org mirrors... 4 mirrors found.
Fetching snapshot tag from ipv4.aws.portsnap.freebsd.org... done.
Latest snapshot on server matches what we already have.
No updates needed.
Ports tree is already up to date.
root_at_mowa219-gjp4-8570p:~ # svn update -r366696 /usr/src/usr.bin/xinstall
Updating '/usr/src/usr.bin/xinstall':
U    /usr/src/usr.bin/xinstall/xinstall.c
Updated to revision 366696.
root_at_mowa219-gjp4-8570p:~ # cd /usr/src/usr.bin/xinstall/
root_at_mowa219-gjp4-8570p:/usr/src/usr.bin/xinstall # make
echo xinstall.full: /usr/lib/libc.a /usr/lib/libmd.a >> .depend
cc  -O2 -pipe -fno-common   -I/usr/src/contrib/mtree 
-I/usr/src/lib/libnetbsd -g -MD  -MF.depend.xinstall.o -MTxinstall.o 
-std=gnu99 -Wno-format-zero-length -fstack-protector-strong 
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type 
-Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter 
-Wcast-align -Wchar-subscripts -Winline -Wnested-externs 
-Wredundant-decls -Wold-style-definition -Wno-pointer-sign 
-Wmissing-variable-declarations -Wthread-safety -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments    -c 
/usr/src/usr.bin/xinstall/xinstall.c -o xinstall.o
cc  -O2 -pipe -fno-common   -I/usr/src/contrib/mtree 
-I/usr/src/lib/libnetbsd -g -MD  -MF.depend.getid.o -MTgetid.o 
-std=gnu99 -Wno-format-zero-length -fstack-protector-strong 
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type 
-Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter 
-Wcast-align -Wchar-subscripts -Winline -Wnested-externs 
-Wredundant-decls -Wold-style-definition -Wno-pointer-sign 
-Wmissing-variable-declarations -Wthread-safety -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments    -c 
/usr/src/contrib/mtree/getid.c -o getid.o
cc -O2 -pipe -fno-common -I/usr/src/contrib/mtree 
-I/usr/src/lib/libnetbsd -g -std=gnu99 -Wno-format-zero-length 
-fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k 
-W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes 
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch 
-Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline 
-Wnested-externs -Wredundant-decls -Wold-style-definition 
-Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety 
-Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable 
-Qunused-arguments    -o xinstall.full xinstall.o getid.o 
-L/usr/obj/usr/src/amd64.amd64/lib/libmd -lmd
objcopy --only-keep-debug xinstall.full install.debug
objcopy --strip-debug --add-gnu-debuglink=install.debug xinstall.full 
xinstall
gzip -cn /usr/src/usr.bin/xinstall/install.1 > install.1.gz
===> tests (all)
echo '#! /usr/libexec/atf-sh' > install_test.tmp
cat /usr/src/usr.bin/xinstall/tests/install_test.sh >>install_test.tmp
chmod +x install_test.tmp
mv install_test.tmp install_test
root_at_mowa219-gjp4-8570p:/usr/src/usr.bin/xinstall # make install
install  -s -o root -g wheel -m 555   xinstall /usr/bin/install
install  -o root -g wheel -m 444  install.debug 
/usr/lib/debug/usr/bin/install.debug
install  -o root -g wheel -m 444 install.1.gz /usr/share/man/man1/
===> tests (install)
install  -o root  -g wheel -m 555  install_test 
/usr/tests/usr.bin/xinstall/install_test
installing DIRS testsFILESDIR
install  -d -m 0755 -o root  -g wheel  /usr/tests/usr.bin/xinstall
install  -o root  -g wheel -m 444  Kyuafile 
/usr/tests/usr.bin/xinstall/Kyuafile
root_at_mowa219-gjp4-8570p:/usr/src/usr.bin/xinstall # cd /usr/src && make 
-j3 buildworld && make -j3 buildkernel KERNCONF=GENERIC-NODEBUG

…

--------------------------------------------------------------
 >>> Kernel build for GENERIC-NODEBUG completed on Sun Nov 22 22:43:02 
GMT 2020
--------------------------------------------------------------
 >>> Kernel(s)  GENERIC-NODEBUG built in 4973 seconds, ncpu: 4, make -j3
--------------------------------------------------------------
root_at_mowa219-gjp4-8570p:/usr/src # beadm create r367936a
Created successfully
root_at_mowa219-gjp4-8570p:/usr/src # beadm activate r367936a
Activated successfully
root_at_mowa219-gjp4-8570p:/usr/src # exit
logout
grahamperrin_at_mowa219-gjp4-8570p:~ % exit
Received on Mon Nov 23 2020 - 11:18:25 UTC

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