AW: svnserve frequently die at assertion in utf.c
Jäkel, Guido <[email protected]> Tue, 7 Jan 2025 09:47:37 +0000
| Newsgroups | gmane.comp.version-control.subversion.user |
|---|---|
| Message-ID | <[email protected]> |
Building and running the test suite non-parallel shows up a single failure
# make clean
# EXTRA_CFLAGS="-fsanitize=thread" EXTRA_LDFLAGS="$EXTRA_CFLAGS" make check
[...]
[028/122] locks-test...............................................................................................................................FAILURE
[...]
tests.log
[...]
PASS: locks-test 13: lock callback error
svn_tests: E200006: Expected error but got SVN_NO_ERROR
FAIL: locks-test 14: lock/unlock when 'write-lock' couldn't be obtained
[...]
But running it with just two threads rises the issue nearly at once:
# make -j 2 PARALLEL=2 check
[...]
[001/122] auth-test................................................................................................................................success
[002/122] authz-test...............................................................................................................................success
[003/122] bit-array-test...........................................................................................................................success
[004/122] cache-test...............................................................................................................................success
[005/122] checksum-test............................................................................................................................success
[006/122] client-test..............................................................................................................................FAILURE
[007/122] compat-test..............................................................................................................................success
[008/122] compress-test............................................................................................................................success
[009/122] config-test..............................................................................................................................success
[010/122] conflict-data-test.......................................................................................................................success
[011/122] conflicts-test...........................................................................................................................success
[012/122] crypto-test..............................................................................................................................success
[013/122] db-test..................................................................................................................................success
[014/122] diff-diff3-test..........................................................................................................................FAILURE
[015/122] dirent_uri-test..........................................................................................................................success
[016/122] dump-load-test...........................................................................................................................FAILURE
[017/122] entries-compat-test......................................................................................................................FAILURE
[018/122] error-code-test..........................................................................................................................success
[019/122] error-test...............................................................................................................................success
[020/122] filesize-test............................................................................................................................success
[021/122] fs-fs-pack-test..........................................................................................................................FAILURE
[022/122] fs-fs-private-test.......................................................................................................................FAILURE
[023/122] fs-sequential-test.......................................................................................................................success
[024/122] fs-test..................................................................................................................................FAILURE
[025/122] fs-x-pack-test...........................................................................................................................success
[026/122] hashdump-test............................................................................................................................success
[027/122] io-test....................................................................................................................FAILURE
[028/122] locks-test...............................................................................................................................FAILURE
[029/122] mergeinfo-test...........................................................................................................................FAILURE
[030/122] mtcc-test................................................................................................................................FAILURE
[031/122] op-depth-test............................................................................................................................FAILURE
[032/122] opt-test.................................................................................................................................success
[033/122] packed-data-test.........................................................................................................................success
[034/122] parse-diff-test..........................................................................................................................success
[...]
And the thread sanitizer mention about function names I observered as failed asserts in the strace sessions:
tests.log
[...]
START: checksum-test
PASS: checksum-test 1: checksum parse
PASS: checksum-test 2: checksum emptiness
PASS: checksum-test 3: zero checksum matching
PASS: checksum-test 4: zlib expansion test (zlib regression)
PASS: checksum-test 5: zero checksum cross-type matching
PASS: checksum-test 6: checksum (de-)serialization
PASS: checksum-test 7: checksum parse all zero
PASS: checksum-test 8: read from checksummed stream
PASS: checksum-test 9: reset checksummed stream
END: checksum-test
ELAPSED: checksum-test 0:00:00.651333
START: client-test
==================
WARNING: ThreadSanitizer: data race (pid=10993)
Write of size 8 at 0x7b9000006338 by thread T2 (mutexes: write M0):
#0 put_xlate_handle_node <null> (libsvn_subr-1.so+0x8105e)
#1 svn_utf_cstring_from_utf8 <null> (libsvn_subr-1.so+0x8163d)
#2 svn_path_cstring_from_utf8 <null> (libsvn_subr-1.so+0x60a93)
#3 svn_opt__arg_canonicalize_path <null> (libsvn_subr-1.so+0x5ab57)
#4 svn_client_args_to_target_array2 <null> (libsvn_client-1.so+0x20861)
#5 test_args_to_target_array <null> (client-test+0x7d31)
#6 test_thread <null> (libsvn_test-1.so.0+0x873f)
#7 <null> <null> (libtsan.so.2+0x34247)
Previous read of size 8 at 0x7b9000006338 by thread T3:
#0 put_xlate_handle_node <null> (libsvn_subr-1.so+0x80f93)
#1 svn_utf_cstring_from_utf8 <null> (libsvn_subr-1.so+0x8163d)
#2 svn_path_cstring_from_utf8 <null> (libsvn_subr-1.so+0x60a93)
#3 svn_io_dir_open <null> (libsvn_subr-1.so+0x4a089)
#4 svn_io_get_dirents3 <null> (libsvn_subr-1.so+0x4a1bd)
#5 svn_io_remove_dir2 <null> (libsvn_subr-1.so+0x4fc8a)
#6 svn_test__create_repos2 <null> (libsvn_test-1.so.0+0x5bfc)
#7 svn_test__create_repos <null> (libsvn_test-1.so.0+0x5edd)
#8 create_greek_repos <null> (client-test+0x3f74)
#9 test_foreign_repos_copy <null> (client-test+0x6e84)
#10 test_thread <null> (libsvn_test-1.so.0+0x87cf)
#11 <null> <null> (libtsan.so.2+0x34247)
Location is heap block of size 8192 at 0x7b9000006000 allocated by main thread:
#0 malloc <null> (libtsan.so.2+0x39137)
#1 <null> <null> (libapr-1.so.0+0x24171)
#2 svn_utf_initialize2 <null> (libsvn_subr-1.so+0x81704)
#3 svn_test_main <null> (libsvn_test-1.so.0+0x91b0)
#4 main <null> (client-test+0x3e0e)
Mutex M0 (0x7b90000060b0) created at:
#0 pthread_mutex_init <null> (libtsan.so.2+0x3a616)
#1 apr_thread_mutex_create <null> (libapr-1.so.0+0x23d1d)
#2 svn_utf_initialize2 <null> (libsvn_subr-1.so+0x81717)
#3 svn_test_main <null> (libsvn_test-1.so.0+0x91b0)
#4 main <null> (client-test+0x3e0e)
Thread T2 (tid=11009, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.2+0x39fe9)
#1 svn_test_main <null> (libsvn_test-1.so.0+0x9efd)
#2 main <null> (client-test+0x3e0e)
Thread T3 (tid=11010, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.2+0x39fe9)
#1 svn_test_main <null> (libsvn_test-1.so.0+0x9efd)
#2 main <null> (client-test+0x3e0e)
SUMMARY: ThreadSanitizer: data race (/var/tmp/portage/dev-vcs/subversion-1.14.5/work/subversion-1.14.5/subversion/libsvn_subr/.libs/libsvn_subr-1.so+0x8105e) in put_xlate_handle_node
==================
[...]
I interrupt the test suite after some time, the full tests.log so far is appended.
> Now, I'll try to apply this to the subversion Makefile and run the test suite...
tests.log.20250107-102905.bz2
(application/octet-stream, 561.9 KB) - not displayed