Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests assert and crash #696

Open
yurivict opened this issue Apr 7, 2024 · 0 comments
Open

Tests assert and crash #696

yurivict opened this issue Apr 7, 2024 · 0 comments
Assignees

Comments

@yurivict
Copy link

yurivict commented Apr 7, 2024

The assert occurs here:

271│     // Act
272│     for (size_t i = 0; i < 100; i++) {
273│         auto nodeTest = std::make_shared<dht::DhtRunner>();
274│         nodeTest->run(0, clientConfig);
275│         nodeTest->put(key, dht::Value(mtu), [&](bool ok) {
276├───────────> CPPUNIT_ASSERT(ok);
277│         });
278│         nodeTest->get(key, [&](const std::vector<std::shared_ptr<dht::Value>>& vals){
279│             values.insert(values.end(), vals.begin(), vals.end());
280│             return true;
281│         },[&](bool ok){
282│             CPPUNIT_ASSERT(ok);
283│         });
284│         std::this_thread::sleep_for(5ms);
285│     }

in tests/dhtproxytester.cpp

This assert causes Abort trap:

$  work/.build/opendht_unit_tests 
.............. .....................F.F.F.F.F.Abort trap

Build was done with these cmake arguments:
-DOPENDHT_INDEX:BOOL=true -DOPENDHT_PROXY_CLIENT:BOOL=true -DOPENDHT_PROXY_SERVER:BOOL=true -DOPENDHT_PUSH_NOTIFICATIONS:BOOL=true -DCMAKE_C_COMPILER:STRING="cc" -DCMAKE_CXX_COMPILER:STRING="c++" -DCMAKE_C_FLAGS:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing " -DCMAKE_C_FLAGS_DEBUG:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing " -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DNDEBUG" -DCMAKE_CXX_FLAGS:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include " -DCMAKE_CXX_FLAGS_DEBUG:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include " -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG" -DCMAKE_EXE_LINKER_FLAGS:STRING=" -lcrypto -L/usr/local/lib -fstack-protector-strong " -DCMAKE_MODULE_LINKER_FLAGS:STRING=" -lcrypto -L/usr/local/lib -fstack-protector-strong " -DCMAKE_SHARED_LINKER_FLAGS:STRING=" -lcrypto -L/usr/local/lib -fstack-protector-strong " -DCMAKE_INSTALL_PREFIX:PATH="/usr/local" -DCMAKE_BUILD_TYPE:STRING="Release" -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=YES -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DFETCHCONTENT_FULLY_DISCONNECTED:BOOL=ON -DOPENDHT_STATIC:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DOPENDHT_TESTS_NETWORK:BOOL=OFF -GNinja

Version: 3.1.11
FreeBSD 14.0

@aberaud aberaud self-assigned this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants