bug#79299: nproc-quota test failure

Bruno Haible via GNU coreutils Bug Reports <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Organization GNU
Message-ID <12130891.GK2ZErXSoo@nimes>
Today's CI run produces a
  FAIL: tests/nproc/nproc-quota
on CentOS 7 and on Alpine Linux.

Here are the two relevant log file portions.


CentOS 7:

FAIL: tests/nproc/nproc-quota
=============================

++ initial_cwd_=/work/coreutils-2025-08-24/build
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /work/coreutils-2025-08-24/build gt-nproc-quota.sh.XXXX
+++ case $# in
+++ destdir_=/work/coreutils-2025-08-24/build
+++ template_=gt-nproc-quota.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ destdir_slash_=/work/coreutils-2025-08-24/build/
+++ case $template_ in
++++ unset TMPDIR
+++ d=/work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl
+++ case $d in
+++ :
+++ test -d /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl
++++ ls -dgo /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl
+++ perms='drwx------ 2 4096 Aug 24 06:57 /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl'
+++ case $perms in
+++ :
+++ echo /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl
+++ return
++ test_dir_=/work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl
++ cd /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl
++ case $srcdir in
++ srcdir=../..
++ builddir=..
++ export srcdir builddir
++ gl_init_sh_nl_='
'
++ IFS=' 	
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ saved_IFS=' 	
'
++ IFS=:
++ new_PATH=
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /work/coreutils-2025-08-24/build/src/.
++ new_PATH=/work/coreutils-2025-08-24/build/src
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /usr/local/sbin/.
++ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/sbin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /usr/local/bin/.
++ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/sbin:/usr/local/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /usr/sbin/.
++ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/sbin:/usr/local/bin:/usr/sbin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /usr/bin/.
++ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /sbin/.
++ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /bin/.
++ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ IFS=' 	
'
++ PATH=/work/coreutils-2025-08-24/build/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ export PATH
++ trap remove_tmp_ EXIT
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ case $path_dir_ in
+ abs_path_dir_=/work/coreutils-2025-08-24/build/./src
+ case $abs_path_dir_ in
+ PATH=/work/coreutils-2025-08-24/build/./src:/work/coreutils-2025-08-24/build/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ create_exe_shims_ /work/coreutils-2025-08-24/build/./src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ nproc
+ require_built_ nproc
+ skip_=no
+ for i in '"$@"'
+ case " $built_programs " in
+ test no = yes
+ test yes = yes
+ local i
+ for i in '$*'
+ env nproc --version
nproc (GNU coreutils) 2025-08-24
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Giuseppe Scrivano.
+ require_root_
+ uid_is_privileged_
++ id -u
+ my_uid=0
+ case $my_uid in
+ NON_ROOT_USERNAME=nobody
++ id -g nobody
+ NON_ROOT_GID=99
+ grep '^[ ]*chroot' ../../tests/nproc/nproc-quota.sh
chroot $ROOT /nproc --version ||
+ nonroot_has_perm_
+ require_built_ chroot
+ skip_=no
+ for i in '"$@"'
+ case " $built_programs " in
+ test no = yes
++ chroot --skip-chdir --user=nobody / env PATH=/work/coreutils-2025-08-24/build/./src:/work/coreutils-2025-08-24/build/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin rm --version
++ sed -n '1s/.* //p'
+ local rm_version=2025-08-24
+ case ":$rm_version:" in
+ ROOT=cgroup
+ mkdir -p cgroup/proc/self
+ mkdir -p cgroup/sys/fs/cgroup/foo
+ touch cgroup/sys/fs/cgroup/cgroup.controllers
+ echo 0::/foo
+ echo 'max 100000'
+ nproc=/work/coreutils-2025-08-24/build/src/nproc
++ ldd /work/coreutils-2025-08-24/build/src/nproc
++ grep -o '/[^ ]*'
+ cp --parents /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2 cgroup
+ cp /work/coreutils-2025-08-24/build/src/nproc cgroup
+ chroot cgroup /nproc --version
nproc (GNU coreutils) 2025-08-24
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Giuseppe Scrivano.
+ unset OMP_NUM_THEADS
+ unset OMP_THREAD_LIMIT
++ nproc
+ ncpus=4
++ nproc --all
+ test 4 = 4
+ echo 'max 100000'
++ chroot cgroup /nproc
+ test 4 -eq 4
+ echo '1000000 1'
++ chroot cgroup /nproc
+ test 4 -eq 4
+ echo '100000 0'
++ chroot cgroup /nproc
+ test 4 -eq 4
+ echo '100000 100000'
++ OMP_NUM_THREADS=4
++ chroot cgroup /nproc
+ test 4 -eq 4
+ echo '40000 100000'
++ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ echo '50000 100000'
++ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ echo '100000 100000'
++ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ echo '140000 100000'
++ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ echo '1 1000000'
++ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ test 4 -gt 1
+ echo '150000 100000'
++ chroot cgroup /nproc
+ test 4 -eq 2
+ fail=1
+ echo '150000 100000'
++ OMP_THREAD_LIMIT=10
++ chroot cgroup /nproc
+ test 4 -eq 2
+ fail=1
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ test '' = yes
+ cd /work/coreutils-2025-08-24/build
+ chmod -R u+rwx /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl
+ rm -rf /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.qFEl
+ exit 1
FAIL tests/nproc/nproc-quota.sh (exit status: 1)


Alpine Linux:

FAIL: tests/nproc/nproc-quota
=============================

+ initial_cwd_=/work/coreutils-2025-08-24/build
+ testdir_prefix_
+ printf gt
+ pfx_=gt
+ mktempd_ /work/coreutils-2025-08-24/build gt-nproc-quota.sh.XXXX
+ destdir_=/work/coreutils-2025-08-24/build
+ template_=gt-nproc-quota.sh.XXXX
+ MAX_TRIES_=4
+ destdir_slash_=/work/coreutils-2025-08-24/build/
+ unset TMPDIR
+ d=/work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx
+ :
+ test -d /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx
+ ls -dgo /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx
+ perms='drwx------ 2 4096 Aug 24 06:57 /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx'
+ :
+ echo /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx
+ return
+ test_dir_=/work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx
+ cd /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx
+ srcdir=../..
+ builddir=..
+ export srcdir builddir
+ gl_init_sh_nl_='
'
+ IFS=' 	
'
+ expr 1 + 128
+ eval 'trap '"'"'Exit 129'"'"' 1'
+ trap 'Exit 129' 1
+ expr 2 + 128
+ eval 'trap '"'"'Exit 130'"'"' 2'
+ trap 'Exit 130' 2
+ expr 3 + 128
+ eval 'trap '"'"'Exit 131'"'"' 3'
+ trap 'Exit 131' 3
+ expr 13 + 128
+ eval 'trap '"'"'Exit 141'"'"' 13'
+ trap 'Exit 141' 13
+ expr 15 + 128
+ eval 'trap '"'"'Exit 143'"'"' 15'
+ trap 'Exit 143' 15
+ saved_IFS=' 	
'
+ IFS=:
+ new_PATH=
+ IFS=' 	
'
+ test -d /work/coreutils-2025-08-24/build/src/.
+ new_PATH=/work/coreutils-2025-08-24/build/src
+ IFS=' 	
'
+ test -d /usr/local/bin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin
+ IFS=' 	
'
+ test -d /usr/sbin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin
+ IFS=' 	
'
+ test -d /usr/bin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin
+ IFS=' 	
'
+ test -d /sbin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
+ IFS=' 	
'
+ test -d /bin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ IFS=' 	
'
+ PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ export PATH
+ trap remove_tmp_ EXIT
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ abs_path_dir_=/work/coreutils-2025-08-24/build/./src
+ PATH=/work/coreutils-2025-08-24/build/./src:/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ create_exe_shims_ /work/coreutils-2025-08-24/build/./src
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ nproc
+ require_built_ nproc
+ skip_=no
+ test no '=' yes
+ test yes '=' yes
+ local i
+ env nproc --version
nproc (GNU coreutils) 2025-08-24
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Giuseppe Scrivano.
+ require_root_
+ uid_is_privileged_
+ id -u
+ my_uid=0
+ NON_ROOT_USERNAME=nobody
+ id -g nobody
+ NON_ROOT_GID=65534
+ grep '^[ ]*chroot' ../../tests/nproc/nproc-quota.sh
chroot $ROOT /nproc --version ||
+ nonroot_has_perm_
+ require_built_ chroot
+ skip_=no
+ test no '=' yes
+ chroot --skip-chdir '--user=nobody' / env 'PATH=/work/coreutils-2025-08-24/build/./src:/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' rm --version
+ sed -n '1s/.* //p'
+ local 'rm_version=2025-08-24'
+ ROOT=cgroup
+ mkdir -p cgroup/proc/self
+ mkdir -p cgroup/sys/fs/cgroup/foo
+ touch cgroup/sys/fs/cgroup/cgroup.controllers
+ echo 0::/foo
+ echo 'max 100000'
+ nproc=/work/coreutils-2025-08-24/build/src/nproc
+ ldd /work/coreutils-2025-08-24/build/src/nproc
+ grep -o '/[^ ]*'
+ cp --parents /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1 cgroup
cp: warning: source file '/lib/ld-musl-x86_64.so.1' specified more than once
+ cp /work/coreutils-2025-08-24/build/src/nproc cgroup
+ chroot cgroup /nproc --version
nproc (GNU coreutils) 2025-08-24
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Giuseppe Scrivano.
+ unset OMP_NUM_THEADS
+ unset OMP_THREAD_LIMIT
+ nproc
+ ncpus=4
+ nproc --all
+ test 4 '=' 4
+ echo 'max 100000'
+ chroot cgroup /nproc
+ test 4 -eq 4
+ echo '1000000 1'
+ chroot cgroup /nproc
+ test 4 -eq 4
+ echo '100000 0'
+ chroot cgroup /nproc
+ test 4 -eq 4
+ echo '100000 100000'
+ OMP_NUM_THREADS=4 chroot cgroup /nproc
+ test 4 -eq 4
+ echo '40000 100000'
+ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ echo '50000 100000'
+ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ echo '100000 100000'
+ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ echo '140000 100000'
+ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ echo '1 1000000'
+ chroot cgroup /nproc
+ test 4 -eq 1
+ fail=1
+ test 4 -gt 1
+ echo '150000 100000'
+ chroot cgroup /nproc
+ test 4 -eq 2
+ fail=1
+ echo '150000 100000'
+ OMP_THREAD_LIMIT=10 chroot cgroup /nproc
+ test 4 -eq 2
+ fail=1
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ test  '=' yes
+ cd /work/coreutils-2025-08-24/build
+ chmod -R u+rwx /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx
+ rm -rf /work/coreutils-2025-08-24/build/gt-nproc-quota.sh.QObx
+ exit 1
FAIL tests/nproc/nproc-quota.sh (exit status: 1)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.