threefoldtech / 0-db-fs

Apache License 2.0
2 stars 1 forks source link

core: segmentation fault on wrong zdb response #14

Open maxux opened 3 years ago

maxux commented 3 years ago

A segmentation fault occurred in production test, but this machine have no gdb, no way to install stuff and is running musl based system. This make debugging really difficult.

Branch more-debug use libunwind to get a backtrace on crash and try to figure out what happen. This could be related to #13 aswell.

maxux commented 3 years ago

Segmentation fault backtrace:

0x564d7be7d7cc: (sighandler+0x3b)
0x7f794e974304: (sigwaitinfo+0x8)
0x564d7be7f1ee: (zdbfs_fuse_write+0x1fa)
0x7f794e90880b: (fuse_reply_err+0xa46)
0x7f794e90a695: (fuse_lowlevel_notify_retrieve+0x75a)
0x564d7be80ff8: (zdbfs_fuse_session_loop+0x256)
0x564d7be81259: (main+0x1e9)
0x7f794e94b1ef: (_init+0x1a6)

I'm checking, at least it's not fixed by fuse fix

maxux commented 3 years ago

This segmentation fault was caused most likely by a wrong zdb response. This issue were fixed in zdb via https://github.com/threefoldtech/0-db/commit/a575594dc0babcf5e459355bec9898e0ff891f52

I keep this issue open, zdfs should not segfault on zdb error, I'll try to figure out where the fault was and avoid crashing. But issue should be fixed for production PoC.

sasha-astiadi commented 3 years ago

is dependant on https://github.com/threefoldtech/0-db-fs/issues/3