Bug 280362 - building system failed in distributeworld stage with h_raw test
Summary: building system failed in distributeworld stage with h_raw test
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: 14.1-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-testing (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-19 08:32 UTC by ant2
Modified: 2024-08-07 14:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ant2 2024-07-19 08:32:18 UTC
-This is a duplcation of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203094
because it closed and seems to not automotically reopen after addidtional post.-

I'm experience the problem with 14-stable in 'distrbuteworld' stage of system building.

#uname -a
FreeBSD  14.1-STABLE amd64

src#git log -1
commit ae979c76443bd7c33ed9f22182b4421d2c64b619 (HEAD -> stable/14, origin/stable/14)
Date:   Thu Jun 20 12:27:43 2024 +0800
...

#cat /etc/make.conf
CPUTYPE=nehalem
MACHINE_ARCH=amd64

#cat /etc/src.conf
#--Compiler/Linker--
WITHOUT_CROSS_COMPILER="YES"

# == WITHOUT_TOOLCHAIN + WITH_LLDB
WITHOUT_CLANG="YES"
WITHOUT_CLANG_EXTRAS="YES"
WITHOUT_CLANG_FULL="YES"
WITHOUT_LLD="YES"
WITHOUT_LLVM_COV="YES"
...

===

After successfull 'buildworld' 'distributeworld' fails with error:

install -N /tank/bsdsrc/14s/src14s/etc  -s -o root -g wheel -m 555   h_memset /tank/bsdsrc/14s/distworld/tests/usr/tests/lib/libc/ssp/h_memset
install -N /tank/bsdsrc/14s/src14s/etc  -o root -g wheel -m 444  h_memset.debug /tank/bsdsrc/14s/distworld/tests/usr/lib/debug/usr/tests/lib/libc/ssp/h_memset.debug
(cd /tank/bsdsrc/14s/src14s/lib/libc/tests/ssp &&  DEPENDFILE=.depend.h_raw  NO_SUBDIR=1 make -f /tank/bsdsrc/14s/src14s/lib/libc/tests/ssp/Makefile _RECURSING_PROGS=t   PROG=h_raw  install)
install -N /tank/bsdsrc/14s/src14s/etc  -s -o root -g wheel -m 555   h_raw /tank/bsdsrc/14s/distworld/tests/usr/tests/lib/libc/ssp/h_raw
install: h_raw: No such file or directory
*** Error code 71

Stop.
make[9]: stopped in /tank/bsdsrc/14s/src14s/lib/libc/tests/ssp
*** Error code 1

Stop.
make[8]: stopped in /tank/bsdsrc/14s/src14s/lib/libc/tests/ssp
*** Error code 1

Stop.
make[7]: stopped in /tank/bsdsrc/14s/src14s/lib/libc/tests/ssp
*** Error code 1

Stop.
make[6]: stopped in /tank/bsdsrc/14s/src14s/lib/libc/tests
*** Error code 1

Stop.
make[5]: stopped in /tank/bsdsrc/14s/src14s/lib/libc
*** Error code 1

Stop.
make[4]: stopped in /tank/bsdsrc/14s/src14s/lib
*** Error code 1

Stop.
make[3]: stopped in /tank/bsdsrc/14s/src14s
*** Error code 1

Stop.
make[2]: stopped in /tank/bsdsrc/14s/src14s
       94,39 real        53,77 user        34,58 sys
*** Error code 1

Stop.
make[1]: stopped in /tank/bsdsrc/14s/src14s
*** Error code 1

Stop.
make: stopped in /tank/bsdsrc/14s/src14s

====
It seems that h_raw conditionally included(excluded) in a build process but this condition differs in 'distributeworld` target:

./lib/libc/tests/ssp/Makefile:

...
# XXX: the h_raw/h_read testcases don't cause a SIGABRT with in-tree gcc right
# now on amd64 when it trips the stack bounds specified in t_ssp.sh . This
# probably needs to be fixed as it's currently hardcoded.
.if ${COMPILER_TYPE} == "clang" && !defined(_SKIP_BUILD) && \
    (!defined(_RECURSING_PROGS) || ${PROG} == "h_raw")
.include "${SRCTOP}/lib/libclang_rt/compiler-rt-vars.mk"
_libclang_rt_ubsan=     ${SYSROOT}${SANITIZER_LIBDIR}/libclang_rt.ubsan_standalone-${C
.if exists(${_libclang_rt_ubsan})
PROGS+=         h_raw
LDADD.h_raw+=   ${SANITIZER_LDFLAGS}
.else
.if make(all)
.info Could not find runtime library ${_libclang_rt_ubsan}, skipping h_raw
.endif
.endif
.endif
...

===
Adding
WITHOUT_TESTS="YES"
to src.conf allow to pass this stage.
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2024-07-26 17:39:13 UTC
I tried to fix this in commit 4ea42d9d468b9ce25871190229b3f0cae69ac909 on stable/14, can you confirm that this is sufficient for you as well?
Comment 2 ant2 2024-08-07 14:36:02 UTC
I update source via git pull 

# git log -n 1
commit 8b400c8488f0b9e67ae269f6d8e5022a3bc7d854 (HEAD -> stable/14, origin/stable/14)
Author: Mark Johnston <markj@FreeBSD.org>
Date:   Wed Aug 7 13:38:54 2024 +0000

but cannot identify commit you specified:

# git log -n 150 |grep  4ea42d9d468b9ce25871190229b3f0cae69ac90 
#

Nevertheless I'll build the source but it take a long time because I do it inside a VM.
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2024-08-07 14:42:19 UTC
> src#git log -1
> commit ae979c76443bd7c33ed9f22182b4421d2c64b619 (HEAD -> stable/14, origin/

This problem was fixed a bit later, in commit 4ea42d9d468b9ce25871190229b3f0cae69ac909.
Comment 4 Mark Johnston freebsd_committer freebsd_triage 2024-08-07 14:45:35 UTC
(In reply to ant2 from comment #2)
Use a larger value for -n (or don't specify a limit at all) and you will see it.