hypercore-protocol / hyperdrive-daemon

Hyperdrive, batteries included.
MIT License
156 stars 23 forks source link

error writing: Bad file descriptor after first block #31

Open edrex opened 4 years ago

edrex commented 4 years ago

Trying some preliminary tests, copying a few GB of photos/vids, and I get lots of these errors:

cp: error writing 'Photos/2020-01 Moto G4 Plus/OpenCamera/VID_20191015_140916.mp4': Bad file descriptor

The affected files all end up the same length:

~/Hyperdrive/Photos/2020-01 Moto G4 Plus/OpenCamera   
❯ ls -l                      
...
-rw-r--r-- 1 eric eric 331046416 Jan 26 09:10 VID_20191018_160345.mp4
-rw-r--r-- 1 eric eric    131072 Jan 26 09:10 VID_20191018_163612.mp4
-rw-r--r-- 1 eric eric    131072 Jan 26 09:10 VID_20191018_163944.mp4
-rw-r--r-- 1 eric eric    131072 Jan 26 09:10 VID_20191018_164541.mp4
-rw-r--r-- 1 eric eric    131072 Jan 26 09:10 VID_20191018_170649.mp4
-rw-r--r-- 1 eric eric 361363645 Jan 26 09:10 VID_20191018_170847.mp4
...

I'd like to dig deeper, and it seems like a detailed log of the FUSE driver is needed. Is there some way to get detailed logs from hyperdrive-fuse?

edrex commented 4 years ago

Oh, I should say this is on Linux. I guess it has to do with the FS access pattern of GNU cp.

mafintosh commented 4 years ago

When did you last reinstall the daemon and all deps?

Can you put here the fuse-native version, daemon version and hyperdrive-fuse version you are using?

edrex commented 4 years ago

I think I was on a really fresh node_modules

hyperdrive-daemon@1.6.3 (9bcbabc7, Jan 25)
hyperdrive-fuse@1.2.5
fuse-native@2.0.6
edrex commented 4 years ago

Any idea what's special about 131072B? edit: It's 217

I'd debug this if I knew how to make FUSE logs happen.

mafintosh commented 4 years ago

Stop your daemon and run it again with hyperdrive start —log-level trace —foreground