Closed stffrdhrn closed 4 years ago
As of yesterday, fixes are applied
# test finish: 2020-01-24T15:45:53+00:00
# test time(s): 8449
# test for file: tests.sum
# summary
328 FAIL
4834 PASS
35 UNSUPPORTED
19 XFAIL`
Running from chroot we can fix many tests, but a few tests start to fail.
i.e. Fail in chroot but not expected to fail in real environment.
+++ log/test--20200126-062828.log 2020-01-26 18:16:30.854599314 +0900
+# test start: 2020-01-26T06:28:28+00:00
+FAIL: dirent/tst-scandir
+FAIL: elf/tst-prelink-cmp
+FAIL: elf/tst-unused-dep
+FAIL: elf/tst-unused-dep-cmp
+FAIL: io/tst-fts
+FAIL: io/tst-fts-lfs
+FAIL: posix/tst-spawn3
+# test finish: 2020-01-26T09:16:30+00:00
+# test time(m): 168
+# test wrapper: /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot
+ 317 FAIL
+ 4844 PASS
+ 36 UNSUPPORTED
sysdeps/unix/sysv/linux/getdents.c
Both code call __readdir
and it sets ERRNO
EOVERFLOW
fts_children: Value too large for defined data type
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Bad file descriptor
These all look like qemu related issues. Will not investigate further until running native in linux.
# failures
FAIL: malloc/tst-dynarray-at-fail - crashing qemu
FAIL: malloc/tst-dynarray-fail - limit cannot find upper AS limit
FAIL: malloc/tst-malloc-thread-fail - crashing qemu qemu: uncaught target signal 6 (Aborted) - core dumped
FAIL: malloc/tst-malloc-usable-tunables
FAIL: malloc/tst-mallocfork2 - 5 procs deadlock in futex wait after a random number of loops
Need to fix these.
# failures
## Checks
-FAIL: elf/check-abi-libc - missing mcount (fixed)
-FAIL: elf/check-textrel - build-glibc/libc.so.dyn: *** text relocations used - non pcrel eh_frame relocations missing _EH_DATA_ macro in GCC (fixed)
-FAIL: elf/check-execstack - no PT_GNU_STACK entry in build-glibc/libc.so.phdr files (needed to add exec stack note in gcc linux.h) (fixed)
-FAIL: elf/check-localplt - Missing required PLT reference: libc.so: _Unwind_Find_FDE (needed to update localpld.data config) (fixed)
## Tests
-FAIL: elf/tst-ldconfig-bad-aux-cache - (fixed now)
-FAIL: elf/tst-pldd - (fixed now)
-FAIL: elf/tst-absolute-sym - fixed missing absolute handling in ld-machine
-FAIL: elf/tst-absolute-zero - fixed missing absolute handling in ld-machine
~FAIL: elf/tst-rtld-preload - works when running alone, environment issue (ignore)
-FAIL: elf/tst-ptrguard1 - fixed test wrapper quoting issue
-FAIL: elf/tst-stackguard1 - fixed test wrapper quoting issue
After fixing the check-textrel issue results are looking better:
# test finish: 2020-02-16T01:43:38+00:00
# test time(m): 170
# test for file: tests.sum
# test wrapper: /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot
# summary
296 FAIL
4865 PASS
36 UNSUPPORTED
19 XFAIL
After fixing the elf
directory tests we here:
# test time(m): 252
# test for file: tests.sum
# test wrapper: /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot
# summary
283 FAIL
4867 PASS
11 UNRESOLVED
36 UNSUPPORTED
19 XFAIL
209 are still math/
failures due to some bad rounding inside the glibc/gcc emulation code.
Now looking into NPTL test failures.
We have 28 failures in NPTL (threading library)
# failures
FAIL: nptl/tst-audit-threads - dl-runtime.c: 80: _dl_fixup: Assertion
FAIL: nptl/tst-create-detached - pthread_create: Resource temporarily unavailable
FAIL: nptl/tst-stack4 - dl-tls.c: 481: _dl_allocate_tls_init: Assertion
# fixed
FAIL: nptl/tst-initializers1 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-c11 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-c89 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-c99 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-gnu11 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-gnu89 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-gnu99 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-thread_local1 - fixed missing libstdc++ from gcc
FAIL: nptl/tst-tls6 - alignment issue - fixed binutils tpoff (dyamic arg)
# fixed, but not sure why
FAIL: nptl/tst-cancel24 - passing now
FAIL: nptl/tst-minstack-throw - passing now
FAIL: nptl/tst-rwlock15 - passing now
FAIL: nptl/tst-thread-exit-clobber - passing now
# python3 needed!
FAIL: nptl/test-cond-printers - needs python3
FAIL: nptl/test-condattr-printers - needs python3
FAIL: nptl/test-mutex-printers - needs python3
FAIL: nptl/test-mutexattr-printers - needs python3
FAIL: nptl/test-rwlock-printers - needs python3
FAIL: nptl/test-rwlockattr-printers - needs python3
# qemu doesn't support Futex Priority Inversion
FAIL: nptl/tst-cond-except - pthread_mutex_init failed: Operation not supported
FAIL: nptl/tst-cond24 - pthread_mutex_init failed: Operation not supported
FAIL: nptl/tst-cond25 - pthread_mutex_init failed: Operation not supported
FAIL: nptl/tst-robust-fork - pthread_mutex_init failed: Operation not supported
# qemu reports Clone invalid argument (flags is 0)
FAIL: nptl/tst-align-clone.out: clone failed: Invalid argument
FAIL: nptl/tst-getpid1.out: clone failed: Invalid argument
# test finish: 2020-02-23T00:03:53+00:00
# test time(m): 0
# test for file: nptl/subdir-tests.sum
# test wrapper: /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot
# summary
28 FAIL
328 PASS
3 UNSUPPORTED
1 XFAIL
After fixing more elf
and nptl
issues, bugs in binutils gdb related to tpoff and ie if statement results are getting better.
Still some remaining
# failures
FAIL: nptl/tst-audit-threads - dl-runtime.c: 80: _dl_fixup: Assertion
FAIL: nptl/tst-create-detached - pthread_create: Resource temporarily unavailable
FAIL: nptl/tst-stack4 - dl-tls.c: 481: _dl_allocate_tls_init: Assertion
But in summary
# test finish: 2020-03-08T05:08:33+00:00
# test time(m): 168
# test for file: tests.sum
# test wrapper: /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot
# summary
258 FAIL
4903 PASS
36 UNSUPPORTED
19 XFAIL
This one is interesting:
FAIL: nptl/tst-audit-threads - works with LD_BIND_NOW=1, fails because PLT is too large and overruns instruction 16-bit immediate.
Example plt:
.plt
75e70: 19 80 00 0b l.movhi r12,0xb
75e74: 85 8c 95 64 l.lwz r12,-27292(r12)
75e78: 44 00 60 00 l.jr r12
75e7c: a9 60 ff f0 l.ori r11,r0,0xfff0
75e80: 19 80 00 0b l.movhi r12,0xb
75e84: 85 8c 95 68 l.lwz r12,-27288(r12)
75e88: 44 00 60 00 l.jr r12
75e8c: a9 60 ff fc l.ori r11,r0,0xfffc
75e90: 19 80 00 0b l.movhi r12,0xb
75e94: 85 8c 95 6c l.lwz r12,-27284(r12)
75e98: 44 00 60 00 l.jr r12
75e9c: a9 61 00 08 l.ori r11,r1,0x8 < r0 changed to r1 from overflow
Test nptl/tst-stack4
looks like a race condition, adding printf avoids the issue. Also debug/strace avoids the issue.
After I figured that out I looked on Google and found this.
Looking at remaining uninvestigated failures, nothing seems to stand out that we need to look into. Most look like qemu related.
# TODO investigate
FAIL: debug/tst-longjmp_chk2 - Didn't expect signal from child: got `Aborted'
FAIL: stdio-common/tst-vfprintf-width-prec
FAIL: stdlib/tst-strtod-underflow - same as FP issues, no underflow exception
FAIL: timezone/tst-tzset - cpu-exec.c:700: cpu_exec: Assertion `!have_mmap_lock()' failed.
# Fixed
-FAIL: stdlib/tst-makecontext - infinite unwind loop, added nop before __startcontext
-FAIL: support/tst-support_capture_subprocess - problem with syscall fixed b180b6c124bc69efecb3abe41b871076256369da
# Qemu related
-FAIL: libio/tst-vtables - qemu error causing left right diff
-FAIL: io/tst-lockf - locking up doing setlock possible qemu issue
-FAIL: misc/tst-clone2 - clone failed: Invalid argument
-FAIL: misc/tst-clone3 - clone failed: Invalid argument
-FAIL: misc/tst-mlock2 - mlock2.c:46: mlock2 (0): Function not implemented (works on linux)
-FAIL: posix/test-errno - getpeername: errno is: 22 (Invalid argument) expected: 9 (Bad file descriptor) *and more* (works on linux)
-FAIL: posix/tst-posix_spawn-setsid - child session ID matched parent one (works on linux)
-FAIL: posix/tst-spawn2 - tst-spawn2.c:44: posix_spawn: Success (works on linux)
-FAIL: posix/tst-spawn4 - tst-spawn4.c:47: not true: status == ENOEXEC (works on linux)
-FAIL: misc/test-errno-linux - errno is: 12 (Cannot allocate memory) expected one of LIST (22)(works on linux)
-FAIL: misc/tst-memfd_create - tst-memfd_create.c:45: not true: flags >= 0(works on linux)
# Looks ok, but glibc fails?
-FAIL: gmon/tst-gmon-gprof - extra stack `+f3 1`, looks ok same in [csky](https://libc-alpha.sourceware.narkive.com/vECsdSUq/rfc-patch-v3-00-12-port-c-sky-to-glibc)
-FAIL: gmon/tst-gmon-pie-gprof - extra stack `+f3 1`, looks ok same in **csky**
-FAIL: gmon/tst-gmon-static-gprof - extra stack `+f3 1`, looks ok same in **csky**
Some of these, when running on linux still fail see:
::::::::::::::
misc/test-errno-linux.out
::::::::::::::
FAIL: epoll_create1: errno is: 38 (Function not implemented) expected one of LIST (22)
FAIL: epoll_ctl: errno is: 38 (Function not implemented) expected one of LIST (9)
FAIL: epoll_wait: errno is: 38 (Function not implemented) expected one of LIST (9)
::::::::::::::
misc/tst-clone2.out
::::::::::::::
::::::::::::::
misc/tst-clone3.out
::::::::::::::
Expected status 2, got 1
Now I am looking at issues in support, the remaining issue is:
FIXED See: b180b6c124bc69efecb3abe41b871076256369da
This case starts a subprocess and captures its output, in some cases it ends with raise(SIGTERM)
. After a few tries the raise
fails. This can be reproduced every time after a certain number of processes run. It happens in both full linux and linux-user mode.
The raise
call will unmask signals, raise the signal, then remask signals. In this case it remasks TERM right away.
But why is it masking TERM, it usually doesn't but in this last case it masks TERM and fails.
108 mmap2(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x301ec000
108 mprotect(0x301e6000, 8192, PROT_READ) = 0
108 mprotect(0xa000, 8192, PROT_READ) = 0
108 mprotect(0x30028000, 8192, PROT_READ) = 0
108 mmap2(NULL, 8, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x301f0000
108 rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [ILL TRAP ABRT BUS FPE USR1 USR2 TERM STKFLT IO PWR RT_2 RT_4 RT_8 RT_9 RT_12], 8) = 0
108 getpid() = 108
108 gettid() = 108
108 tgkill(108, 108, SIGTERM) = 0
108 rt_sigprocmask(SIG_SETMASK, [ILL TRAP ABRT BUS FPE USR1 USR2 TERM STKFLT IO PWR RT_2 RT_4 RT_8 RT_9 RT_12], NULL, 8) = 0
108 exit_group(0) = ?
Remaining issues are 9 below. I am running each on native linux from now (not chroot/qemu-user).
## Malloc
FAIL malloc/tst-malloc-usable-tunables - malloc_usable_size: expected 7 but got 12
Other than the known issues with audit-threads and math underflow there is now just 1 last issue:
This seems to be that malloc-usable-tunables
runs with GLIBC_TUNABLES=glibc.malloc.check=3
while other tests run with MALLOC_CHECK_=3
.
This fails in chroot environment but works in native linux, it doesn't make much sense why this is, the _sbrk in elf/dl-tunables.c
fails when trying to strdup the GLIBC_TUNABLES env string. It seems like some issue with qemu linux-user environment?
-(STRIKE) Seeing that malloc-usable-static is failing on native linux, there might be more failures that fail on native linux but passed on the chroot (qemu linux-user) environment.-
# GLIBC_TUNABLES=glibc.malloc.check=1 /home/shorne/work/gnu-toolchain/build-gl
ibc/malloc/tst-malloc-usable-static-tunables
(OK!)
All failures are now explained, We now need to:
math
underflow related issues (but will ask about this during upstreaming)nptl/tst-audit-threads
Current test summary
Details (Unknown)
mq_notify not implemented
libgcc_s.so.1 must be installed for pthread_cancel to work
Exception "Underflow" not set