Segment fault encountered while running hsbench
my environment is Xeon(R) Gold 6148 with centos 7.6
when i runing hsbench ,i encountered segment fault: [root@localhost hsbench-samples]# sh run_bench.sh /home/hyperscan-master/build/bin/hsbench \n*** Snort literals against HTTP traffic, block mode.\n run_bench.sh: line 20: 74950 Segmentation fault (core dumped) taskset 1 ${HSBENCH_BIN} -e pcre/snort_literals -c corpora/alexa200.db -N \n*** Snort PCREs against HTTP traffic, block mode.\n run_bench.sh: line 23: 74954 Segmentation fault (core dumped) taskset 1 ${HSBENCH_BIN} -e pcre/snort_pcres -c corpora/alexa200.db -N
\n*** Teakettle synthetic patterns against Gutenberg text, streaming mode.\n run_bench.sh: line 27: 74959 Segmentation fault (core dumped) taskset 1 ${HSBENCH_BIN} -e pcre/teakettle_2500 -c corpora/gutenberg.db
I download hsbench sample from https://01.org/sites/default/files/downloads/hyperscan/hsbench-samples.tar.bz2 , and use its scripte run_bench.sh to start test.
Has anyone encountered a similar problem ? any advices are welcome.
hi, all, i found that i need to cmake the project by add -DCMAKE_BUILD_TYPE=Debug, and then the hsbench test is OK.
In hsbench src code, in main function, there are:
#if !defined(RELEASE_BUILD) grey = make_unique<Grey>(); #endif
I think that 'grey' is the reason that cause the segmentation fault. Can someone help me with this issue?
Hi @rejohn,
Which version of Hyperscan did you use? It'll be good if you can show us your full CMake compile command and the GDB trace.
Hi @xiangwang1 , Thank you for you reply. I use the master branch of Hyperscan , and the CMake complie command is : #mkdir hs_build #cd hs_build #cmake .. #make -j8 and then run hsbench from ./bin directory. The hsbench sample is from https://01.org/sites/default/files/downloads/hyperscan/hsbench-samples.tar.bz2.
I think it should be easy to reproduce.
Thanks. This is due to a change in our release 5.2 which replaced hs_compile_multi() with hs_compile_multi_int() at https://github.com/intel/hyperscan/blob/4cebdaa435f1f52e96450e066937b3835b9b7047/tools/hsbench/engine_hyperscan.cpp#L431
We'll fix it shortly in our bugfix release.
@rejohn We've already fixed this in our latest release.