hoprnet / hopr-core

Main repository of HOPR - this is all you need to run a node on the HOPR network!
https://hoprnet.org
GNU General Public License v3.0
14 stars 5 forks source link

Segmentation fault directly after getting results from first "crawl" #224

Closed greve closed 3 years ago

greve commented 4 years ago

Describe the bug Chat application segfaults on Linux directly after first crawl:

> crawl
> Crawling results:
    contacted nodes:: 
        16Uiu2HAmPyq9Gw93VWdS3pgmyAWg2UNnrgZoYKPDUMbKDsWhzuvb
        16Uiu2HAm6VH37RG1R4P8hGV1Px7MneMtNc6PNPewNxCsj1HsDLXW
        16Uiu2HAmCXAmPFSQBSYvNcVfREzELNDw5fVknFe4EUfp3sCqZzNu
    new nodes: 19 nodes
    total: 19 nodes
> ./start-hopr-chat.sh: line 4:  8591 Segmentation fault      (core dumped) node index.js -p switzerland 2> log.txt

with the following message in the log:

(node:9169) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

To Reproduce Did a couple of crawls afterwards, but no more segfaults.

Perhaps a code path that is only used upon first setup?

Desktop (please complete the following information):

0xjjpa commented 4 years ago

Hey @greve, thanks for pointing this one out. How did you start the application? We have seen this happening in our Docker images, but not so much in our “binary” releases. Also, do you happen to have which node version you have installed?

Thanks for reporting this!

greve commented 4 years ago

Hi @jjperezaguinaga - I started it from the shell via "./start-hopr-chat.sh".

Node.js is current version in Fedora:

node -v
v12.16.3

You're welcome and let me know if I can help in any other way!