scanoss / engine

SCANOSS Open Source Inventory Engine
GNU General Public License v2.0
34 stars 20 forks source link

Segmentation fault #40

Closed superkaiy closed 1 year ago

superkaiy commented 1 year ago

Hi, @mscasso-scanoss

Screenshot from 2022-11-11 20-55-12

mscasso-scanoss commented 1 year ago

Hi @superkaiy, thank you for reporting this. I was able to reproduce your problem. There is a bug and it will be fixed with a new release this week. I will let you know! Sorry for the inconvenience.

mscasso-scanoss commented 1 year ago

Hi @superkaiy, sorry for the delay. Please pull from master and try again (version 5.0.5). About your question, the parameter "-M" is the right way to look for more than one snippet. For example "scanoss -M5 file.c" will look for 5 snippets maximum in "file.c" Please try it and let me know if it does what you are expecting.

superkaiy commented 1 year ago

Hi @mscasso-scanoss , I updated scanoss, but still meet the exception "segmentation fault" Screenshot from 2022-11-17 09-29-09

mscasso-scanoss commented 1 year ago

Sorry to hear that. Could you share your file with me? If you can't because it is a private code, you can send me the wfp of the file.

superkaiy commented 1 year ago

Hi @mscasso-scanoss I mined it(component Flask) into my local DB with minr:

and test file: test2.py is mixed with flask/cli.py and flask/ctx.py scanner_output.wfp.txt

mscasso-scanoss commented 1 year ago

Okay, in that case please install "valgrind", run again and share the output:

valgrind scanoss -M2 file.c

superkaiy commented 1 year ago

Hi @mscasso-scanoss The debug information is attached debug.txt debug_detail.txt

mscasso-scanoss commented 1 year ago

Hi @superkaiy , please pull one more time from master and test again. I have added some defensive code, the root of the problem is your KB setup.

Attached you will see the results (there is a json inside the zip file) I got in my system. M2_test.zip

superkaiy commented 1 year ago

Hi @mscasso-scanoss I pulled the latest code(commit ID: 6187f7d68f1da4a8f9ac0f02536e39330dfb0790), and It's OK now, Thank you. I did not do any changes on KB, so I could not understand that the root of the problem is your KB setup. Screenshot from 2022-11-18 11-33-58

mscasso-scanoss commented 1 year ago

That looks nice, I'm going to close this issue, please fill free to open a new-one if you need it.

There are some missing LDB's tables in your system, but anyway this tables are not mandatory, so it actually was a bug in the engine. Thank you very much for your contribution.