mystikos icon indicating copy to clipboard operation
mystikos copied to clipboard

Failing libcxx tests (alpine & ubuntu)

Open salsal97 opened this issue 3 years ago • 6 comments

These errors are observed from built libcxx tests that fail on ALPINE Source code for this suite is here -

eg: looking for test built as /app/llvm-project/libcxx/test/libcxx/containers/sequences/deque/pop_back_empty.pass.cpp.exe

git clone -b LibOS_v10.0.1 --single-branch https://github.com/salsal97/llvm-project.git
cd llvm-project/libcxx/test/libcxx/containers/sequences/deque

Revisions -

1.1: This issue was updated to remove the tests that failed to run outside of mystikos.
1.2: Issue updated to add tests that fail when compiled in ubuntu and run in mystikos
1.3 Removed tests that failed outside of mystikos on _alpine_
1.4 updated issue with full pathname for the tests
1.5 Updated some of the failing tests that now pass

eg:

  1. /app/llvm-project/libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp.exe
  2. /app/llvm-project/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp.exe
  3. /app/llvm-project/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp.exe

Built binaries are in this container - docker pull mystikos/libcxx_11x:0.1 You can build the binaries again in a new container by following the steps in the Dockerfile in this suite.

/app/llvm-project/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp.exe: Uses a named pipe

Failing libcxx tests on UBUNTU:

Built binaries are in this container - docker pull mystikos/libcxx2_11x:0.1 You can build the binaries again in a new container by following the steps in the Dockerfile in this suite.

# runs in gdb 
/app/llvm-project/libcxx/test/libcxx/containers/sequences/deque/pop_back_empty.pass.cpp.exe
/app/llvm-project/libcxx/test/libcxx/containers/sequences/vector/pop_back_empty.pass.cpp.exe

# timeout 30
/app/llvm-project/libcxx/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp.exe
/app/llvm-project/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp.exe

# Fails to handle wide characters, file with wchars are not traversed as expected
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/member_swap.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/pointer.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/string.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_pointer.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_string.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_pointer.pass.cpp.exe
/app/llvm-project/libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_string.pass.cpp.exe

# small isolated failures (not a big group)
/app/llvm-project/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp.exe
/app/llvm-project/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp.exe

# complex number operations fail
/app/llvm-project/libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp.exe
/app/llvm-project/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp.exe
/app/llvm-project/libcxx/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp.exe
/app/llvm-project/libcxx/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp.exe

# occasional futex retry and threading issues
/app/llvm-project/libcxx/test/std/thread/futures/futures.async/async_race.pass.cpp.exe
/app/llvm-project/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp.exe
/app/llvm-project/libcxx/test/std/thread/futures/futures.promise/set_value_const.pass.cpp.exe
/app/llvm-project/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp.exe
/app/llvm-project/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until_deadlock_bug.pass.cpp.exe
/app/llvm-project/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp.exe

salsal97 avatar Apr 02 '21 20:04 salsal97

@salsal97 , can you trace down the "Can't find file" failures?

bodzhang avatar Apr 05 '21 20:04 bodzhang

Hi Bo, updated the issue with the latest failure logs. Tests that fail with no error message are either timing out (3 seconds) or have a segfault

salsal97 avatar Apr 06 '21 00:04 salsal97

the locale issues are probably looking for a localization file that is not present. This may need to be part of the test image. It may also be an environment variable that is not set to point to the file location. The environment variable inherited from the host may also not be correct for the alpine image that the test is using.

paulcallen avatar Apr 12 '21 20:04 paulcallen

line 1 and line 3 (and a few others) are with complex number calculations. There maybe bugs in MUSL's libm implementation.

Would be interesting to see if they passes when compiled with gcc instead of musl-gcc.

jxyang avatar Apr 12 '21 22:04 jxyang

Update: /app/acos.pass.cpp.exe does not work in MUSL-GCC

salsal97 avatar Apr 13 '21 20:04 salsal97

For failures like: terminate called after throwing an instance of ...

The tests throw an exception on purpose and then ignore it in a catch block. This way they tests the functionality during stack unwinding.

Unfortunately Mystikos takes the exception too literally. It decides to crash on any exception before it gives the C++ runtime a chance to handle it.

jxyang avatar Apr 26 '21 23:04 jxyang