jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.99k stars 96 forks source link

Panic occurs after suspension/hibernate #181

Closed cbueth closed 2 years ago

cbueth commented 3 years ago

Similar issue to #111.

$ onedriver --version
onedriver v0.11.1 32fd60e5

I saw no diffs to v0.11.2 that I thought would change the behaviour, but I have not looked into GO-FUSE.

Oct 22 09:28:01 $HOSTNAME onedriver[3402]: panic: runtime error: invalid memory address or nil pointer dereference
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: [signal SIGSEGV: segmentation violation code=0x1 addr=0xb8 pc=0x529007]
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: goroutine 72 [running]:
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: github.com/hanwen/go-fuse/v2/fs.(*rawBridge).logf(...)
Oct 22 09:28:01 $HOSTNAME onedriver[3402]:         /build/onedriver-PDB0UE/onedriver-0.11.1/vendor/github.com/hanwen/go-fuse/v2/fs/bridge.go:133
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: github.com/hanwen/go-fuse/v2/fs.(*Inode).Path(0xc001168b40, 0xc001168000, 0x1, 0x0)
Oct 22 09:28:01 $HOSTNAME onedriver[3402]:         /build/onedriver-PDB0UE/onedriver-0.11.1/vendor/github.com/hanwen/go-fuse/v2/fs/inode.go:306 +0x447
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: github.com/jstaf/onedriver/fs.(*Cache).InodePath(0xc000108080, 0xc001168b40, 0xc000156520, 0x4466ec)
Oct 22 09:28:01 $HOSTNAME onedriver[3402]:         /build/onedriver-PDB0UE/onedriver-0.11.1/fs/cache.go:140 +0x67
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: github.com/jstaf/onedriver/fs.(*Inode).Rename(0xc001168b40, 0x857b80, 0xc0000a4030, 0xc000da2740, 0x1d, 0x854080, 0xc001168b40, 0xc0010582d0, 0xb, 0x0, ...)
Oct 22 09:28:01 $HOSTNAME onedriver[3402]:         /build/onedriver-PDB0UE/onedriver-0.11.1/fs/inode.go:719 +0x68
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: github.com/jstaf/onedriver/fs.(*Cache).applyDelta(0xc000108080, 0xc001168a00, 0x0, 0x0)
Oct 22 09:28:01 $HOSTNAME onedriver[3402]:         /build/onedriver-PDB0UE/onedriver-0.11.1/fs/delta.go:231 +0x155a
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: github.com/jstaf/onedriver/fs.(*Cache).DeltaLoop(0xc000108080, 0x6fc23ac00)
Oct 22 09:28:01 $HOSTNAME onedriver[3402]:         /build/onedriver-PDB0UE/onedriver-0.11.1/fs/delta.go:53 +0x2e9
Oct 22 09:28:01 $HOSTNAME onedriver[3402]: created by main.main
Oct 22 09:28:01 $HOSTNAME onedriver[3402]:         /build/onedriver-PDB0UE/onedriver-0.11.1/main.go:119 +0x7bc

I am going to update to v0.11.2 now and will tell when it reoccurs. Also, thank you so much for your time and effort on this project!

jstaf commented 3 years ago

If you're feeling brave, can you try building from source on the current master branch (there are instructions for doing so in the readme)? I did a substantial rewrite of onedriver recently that redoes how the filesystem works internally as part of the next (as yet unreleased) version. The part of the code that caused the segfault is not present anymore. It may eliminate the crash you're seeing here. If you're still seeing crashes after building from the master branch, let me know.

cbueth commented 3 years ago

I just built from the current master branch (#188) and will observe it. For v0.11.2 it reoccurred, but let's hope not for the rewritten filesystem.

cbueth commented 2 years ago

Seems to work very fine for now, closing. Thanks!