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

segfault with gcc 7.3 #11

Closed
ekg opened this issue Feb 12, 2019 · 1 comment
Closed

segfault with gcc 7.3 #11

ekg opened this issue Feb 12, 2019 · 1 comment

Comments

@ekg
Copy link
Contributor

ekg commented Feb 12, 2019

I tried to run the test benchmark, and ran into a segfault:

-> % ./Bootest 100000000 4 -check -bench            
key file generated 
Construct a BooPHF with  100000000 elements  
for info, total work write each  : 1.000    total work inram from level -1991486788 : -1991486787.000  total work raw : 25.000 
[Building BooPHF]  100  %   elapsed:   0 min 4  sec   remaining:   0 min 0  sec[1]    2339 segmentation fault (core dumped)  ./Bootest 100000000 4 -check -bench

I've traced the segfault here:

#0  0x00005555555656f5 in void boomphf::mphf<unsigned long, boomphf::SingleHashFunctor<unsigned long> >::pthread_processLevel<bfile_iterator>(std::vector<unsigned long, std::allocator<unsigned long> >&, std::shared_ptr<bfile_iterator>, std::shared_ptr<bfile_iterator>, int) ()
#1  0x0000555555565a9d in void* boomphf::thread_processLevel<unsigned long, boomphf::SingleHashFunctor<unsigned long>, file_binary, bfile_iterator>(void*) ()
#2  0x00007ffff7bbd6db in start_thread (arg=0x7ffff50bd700) at pthread_create.c:463
#3  0x00007ffff6fa788f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

This is my gcc version:

-> % g++ --version
g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0

Probably it's unrelated, but I also see a lot of warnings of this type:

BooPHF.h:1026:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
``
@rizkg
Copy link
Owner

rizkg commented Feb 12, 2019

Thanks for reporting this !
It turns out the usage of Bootest was updated at some point and not propagated in the Readme. You should now use bootest like this :

./Bootest 100000000 4 1.0 -check -bench

Usage is :

./Bootest <nelem> <nthreads> <gamma>  [options]

The extra argument is to specify the gamma value ( gamma = 1.0 --> slower but less memory required, higher values will be faster with more mermory usage).
The Readme and proper Bootest error report have now been updated accordingly in bc7dfa0.

@rizkg rizkg closed this as completed Feb 12, 2019
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