botan: MacOS 10.15: system RNG test crashes
MacOS Catalina 10.15.3, Xcode-11.3.1, current Botan master.
Builds OK, but fails RSA tests:
. . . . .
rsa_kem:
RSA/KDF1-18033(SHA-1) KEM ran 6 tests in 23.70 msec all ok
RSA/KDF1-18033(SHA-256) KEM ran 6 tests in 38.40 msec all ok
RSA/KDF1-18033(SHA-512) KEM ran 3 tests in 20.54 msec all ok
RSA/KDF2(SHA-1) KEM ran 6 tests in 28.22 msec all ok
RSA/KDF2(SHA-256) KEM ran 6 tests in 35.69 msec all ok
RSA/KDF2(SHA-512) KEM ran 3 tests in 19.77 msec all ok
rsa_keygen:
Abort trap: 6
Here’s the crash data:
Thread 4 Crashed:
0 libsystem_kernel.dylib 0x00007fff657767fa __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff65833bc1 pthread_kill + 432
2 libsystem_c.dylib 0x00007fff656fda1c abort + 120
3 libcorecrypto.dylib 0x00007fff6546dd78 cc_abort + 9
4 libcorecrypto.dylib 0x00007fff65496cdb cc_try_abort + 9
5 libcorecrypto.dylib 0x00007fff6542792c ccrng_cryptographic_generate + 538
6 botan-test 0x0000000105690175 Botan_Tests::(anonymous namespace)::System_RNG_Tests::run() + 1317
7 botan-test 0x00000001056a3c8d Botan_Tests::(anonymous namespace)::run_a_test(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 157
8 botan-test 0x00000001056a65b8 std::__1::__packaged_task_func<std::__1::__bind<Botan_Tests::Test_Runner::run_tests(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, unsigned long, unsigned long, unsigned long)::$_1&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>, std::__1::allocator<std::__1::__bind<Botan_Tests::Test_Runner::run_tests(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, unsigned long, unsigned long, unsigned long)::$_1&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&> >, std::__1::vector<Botan_Tests::Test::Result, std::__1::allocator<Botan_Tests::Test::Result> > ()>::operator()() + 40
9 botan-test 0x00000001056a6072 std::__1::packaged_task<std::__1::vector<Botan_Tests::Test::Result, std::__1::allocator<Botan_Tests::Test::Result> > ()>::operator()() + 82
10 libbotan-2.13.dylib 0x0000000105dfc606 Botan::Thread_Pool::worker_thread() + 550
11 libbotan-2.13.dylib 0x0000000105dfce4e void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (Botan::Thread_Pool::*)(), Botan::Thread_Pool*> >(void*) + 62
12 libsystem_pthread.dylib 0x00007fff65833e65 _pthread_start + 148
13 libsystem_pthread.dylib 0x00007fff6582f83b thread_start + 15
Here’s the complete log: botan-test-fail.txt
Here’s how it was configured: conf-out.txt
The build output: make-out.txt
Tests: test-out.txt
Running tests in (what I think is) a single-thread mode points at a crash in system_rng test:
. . . . .
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff657767fa __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff65833bc1 pthread_kill + 432
2 libsystem_c.dylib 0x00007fff656fda1c abort + 120
3 libcorecrypto.dylib 0x00007fff6546dd78 cc_abort + 9
4 libcorecrypto.dylib 0x00007fff65496cdb cc_try_abort + 9
5 libcorecrypto.dylib 0x00007fff6542792c ccrng_cryptographic_generate + 538
6 botan-test 0x000000010c17b175 Botan_Tests::(anonymous namespace)::System_RNG_Tests::run() + 1317
7 botan-test 0x000000010c18ec8d Botan_Tests::(anonymous namespace)::run_a_test(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 157
8 botan-test 0x000000010c18cf6f Botan_Tests::Test_Runner::run_tests(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, unsigned long, unsigned long, unsigned long) + 303
9 botan-test 0x000000010c18bf2a Botan_Tests::Test_Runner::run(Botan_Tests::Test_Options const&) + 6602
10 botan-test 0x000000010c02c225 main + 3765
11 libdyld.dylib 0x00007fff6562f7fd start + 1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- Fix a crash in System_RNG on macOS 10.15 See #2268 — committed to randombit/botan by randombit 4 years ago
Oh very interesting OK that is enough of a hint that I think I know what the problem is. Can you try applying 83836813a47c953562af0a47e7fbb61b89209187 and see if that helps?
Fix merged to master
Awesome thanks for reporting and the help with diagnosis.