kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
505 stars 41 forks source link

Error: signal 11 #81

Closed 1N50MN14 closed 3 years ago

1N50MN14 commented 3 years ago

I've encountered the following error (I'm on 1.6.4-pre):

Error: signal 11:
/home/am/dev/dfv/platform/database/main/node_modules/lmdb-store/build/Release/lmdb-store.node(+0x2c017)[0x7f47acc0e017]
/lib/x86_64-linux-gnu/libc.so.6(+0x37840)[0x7f47af47d840]
/home/am/dev/dfv/platform/database/main/node_modules/lmdb-store/build/Release/lmdb-store.node(+0x48050)[0x7f47acc2a050]
/home/am/dev/dfv/platform/database/main/node_modules/lmdb-store/build/Release/lmdb-store.node(+0x4805e)[0x7f47acc2a05e]
/home/am/dev/dfv/platform/database/main/node_modules/lmdb-store/build/Release/lmdb-store.node(+0x4805e)[0x7f47acc2a05e]
/home/am/dev/dfv/platform/database/main/node_modules/lmdb-store/build/Release/lmdb-store.node(+0x2fa09)[0x7f47acc11a09]
/home/am/dev/dfv/platform/database/main/node_modules/lmdb-store/build/Release/lmdb-store.node(+0x1f7c8)[0x7f47acc017c8]
/home/am/n/bin/node[0xbe369b]
/home/am/n/bin/node[0xbe4c46]
/home/am/n/bin/node(_ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE+0x16)[0xbe52c6]
/home/am/n/bin/node[0x13ff259]

It could be caused by something I did, just wondering what signal 11 means...

kriszyp commented 3 years ago

Signal 11 is a segmentation fault. And that is certainly a lousy backtrace (and I am not sure how to improve these backtraces). Do you have any ideas how to reproduce this?

1N50MN14 commented 3 years ago

I haven't been able to reproduce it, unfortunately, and I'm not sure what were the exact operation(s) right before the error either. I'll add some logging and keep an open shell throughout the day in case it comes up again..

kriszyp commented 3 years ago

I have realized that trying to print backtraces with a signal handler is probably just complicating the situation. It is better to let linux do a core dump, as we can actually debug the core dump. I published v1.6.5 with the debugging symbols enabled for building (you would need to compile with npm run recompile) and with the signal handler removed. If you run into this again (with that version), hopefully you should get a core dump, and maybe we could gdb that and take a look at a real stack trace.

1N50MN14 commented 3 years ago

Sounds like a good plan! I'll upgrade to 1.6.5 both locally and in production. Closing this issue for now because it might take a while before or even if this error happens again, otherwise I'll report the stack trace.