BiglySoftware / BiglyBT

Feature-filled Bittorrent client based on the Azureus open source project
https://www.biglybt.com
GNU General Public License v2.0
1.55k stars 153 forks source link

azmsgsync File name too long? #2556

Closed drelephant closed 2 years ago

drelephant commented 2 years ago

Using BiglyBT 3.0.0.0 on Ubuntu 18.04.6 LTS (Gnome), often over VNC.

BiglyBT crashes every now and then, I still haven't worked out what's causing it but the GUI becomes unclickable and doesn't refresh the display.

Often I can still connect from the Android app when this happens however.

Not sure if it's related but I see a lot of errors on the console about filename too long:

[01:13:50] [stderr]     FileUtil::writeResilientFile::663, FileUtil::writeResilientFile::644, MsgSyncHandler::saveMessages::6077, MsgSyncHandler::timerTick::2139, MsgSyncPlugin$3::perform::257, TimerEventPeriodic::perform::104, TimerEvent::runSupport::133, AERunnable::run::36, ThreadPool::runIt::336, ThreadPool$threadPoolWorker::run::726, AEThread2$threadWrapper::run::317
[01:13:50] [stderr] java.io.FileNotFoundException: /home/redacted/.biglybt/plugins/azmsgsync/save/IJUWO3DZIJKDUICJGJIDUICEJZJSARTFMVSFW4DLHVAVGM2XGJLUQRSHIZIU2RBSJNKTOWRSLFCDESKNLFEVUSRVKJDTGNCBK42FKUSQJNIFCN2OJJJEGWSLJJKTEUCEKI2ESR2HIVBUMTCKJVHVCTKBKJATOMSTIRFDIMSZEZZG6PJRLUp.dat.saving (File name too long)
[01:13:50] [stderr]     at java.base/java.io.FileOutputStream.open0(Native Method)
[01:13:50] [stderr]     at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
[01:13:50] [stderr]     at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
[01:13:50] [stderr]     at com.biglybt.core.util.FileHandler.newFileOutputStream(FileHandler.java:69)
[01:13:50] [stderr]     at com.biglybt.core.util.FileUtil.newFileOutputStream(FileUtil.java:2519)
[01:13:50] [stderr]     at com.biglybt.core.util.FileUtil.writeResilientFile(FileUtil.java:744)
[01:13:50] [stderr]     at com.biglybt.core.util.FileUtil.writeResilientFile(FileUtil.java:684)
[01:13:50] [stderr]     at com.biglybt.core.util.FileUtil.writeResilientFile(FileUtil.java:663)
[01:13:50] [stderr]     at com.biglybt.core.util.FileUtil.writeResilientFile(FileUtil.java:644)
[01:13:50] [stderr]     at com.vuze.plugins.azmsgsync.MsgSyncHandler.saveMessages(MsgSyncHandler.java:6077)
[01:13:50] [stderr]     at com.vuze.plugins.azmsgsync.MsgSyncHandler.timerTick(MsgSyncHandler.java:2139)
[01:13:50] [stderr]     at com.vuze.plugins.azmsgsync.MsgSyncPlugin$3.perform(MsgSyncPlugin.java:257)
[01:13:50] [stderr]     at com.biglybt.core.util.TimerEventPeriodic.perform(TimerEventPeriodic.java:104)
[01:13:50] [stderr]     at com.biglybt.core.util.TimerEvent.runSupport(TimerEvent.java:133)
[01:13:50] [stderr]     at com.biglybt.core.util.AERunnable.run(AERunnable.java:36)
[01:13:50] [stderr]     at com.biglybt.core.util.ThreadPool.runIt(ThreadPool.java:336)
[01:13:50] [stderr]     at com.biglybt.core.util.ThreadPool$threadPoolWorker.run(ThreadPool.java:726)
[01:13:50] [stderr]     at com.biglybt.core.util.AEThread2$threadWrapper.run(AEThread2.java:317)
[01:13:50] java.io.FileNotFoundException: /home/redacted/.biglybt/plugins/azmsgsync/save/IJUWO3DZIJKDUICJGJIDUICEJZJSARTFMVSFW4DLHVAVGM2XGJLUQRSHIZIU2RBSJNKTOWRSLFCDESKNLFEVUSRVKJDTGNCBK42FKUSQJNIFCN2OJJJEGWSLJJKTEUCEKI2ESR2HIVBUMTCKJVHVCTKBKJATOMSTIRFDIMSZEZZG6PJRLUp.dat.saving (File name too long)
    at java.base/java.io.FileOutputStream.open0(Native Method)
    at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
    at com.biglybt.core.util.FileHandler.newFileOutputStream(FileHandler.java:69)
    at com.biglybt.core.util.FileUtil.newFileOutputStream(FileUtil.java:2519)
    at com.biglybt.core.util.FileUtil.writeResilientFile(FileUtil.java:744)
    at com.biglybt.core.util.FileUtil.writeResilientFile(FileUtil.java:684)
    at com.biglybt.core.util.FileUtil.writeResilientFile(FileUtil.java:663)
    at com.biglybt.core.util.FileUtil.writeResilientFile(FileUtil.java:644)
    at com.vuze.plugins.azmsgsync.MsgSyncHandler.saveMessages(MsgSyncHandler.java:6077)
    at com.vuze.plugins.azmsgsync.MsgSyncHandler.timerTick(MsgSyncHandler.java:2139)
    at com.vuze.plugins.azmsgsync.MsgSyncPlugin$3.perform(MsgSyncPlugin.java:257)
    at com.biglybt.core.util.TimerEventPeriodic.perform(TimerEventPeriodic.java:104)
    at com.biglybt.core.util.TimerEvent.runSupport(TimerEvent.java:133)
    at com.biglybt.core.util.AERunnable.run(AERunnable.java:36)
    at com.biglybt.core.util.ThreadPool.runIt(ThreadPool.java:336)
    at com.biglybt.core.util.ThreadPool$threadPoolWorker.run(ThreadPool.java:726)
    at com.biglybt.core.util.AEThread2$threadWrapper.run(AEThread2.java:317)

How can I fix these errors and hopefully stop biglybt from freezing up?

parg commented 2 years ago

Doesn't seem very long to me, do you have some lame file system?

I can't see how that error can be related to BiglyBT freezing. The usual cause of that is low Java VM memory, do you have a lot of active downloads? Check https://github.com/BiglySoftware/BiglyBT/wiki/Diagnostics for some info.

drelephant commented 2 years ago

It's ext4 with encrypted /home, don't think that should make a difference though? I just ticked the box for encrypted home folder when installing ubuntu.

Definitely getting that error though, even from the command line: touch '/home/redacted/.biglybt/plugins/azmsgsync/save/IJUWO3DZIJKDUICJGJIDUICEJZJSARTFMVSFW4DLHVAVGM2XGJLUQRSHIZIU2RBSJNKTOWRSLFCDESKNLFEVUSRVKJDTGNCBK42FKUSQJNIFCN2OJJJEGWSLJJKTEUCEKI2ESR2HIVBUMTCKJVHVCTKBKJATOMSTIRFDIMSZEZZG6PJRLUp.dat.saving'

touch: cannot touch '/home/redacted/.biglybt/plugins/azmsgsync/save/IJUWO3DZIJKDUICJGJIDUICEJZJSARTFMVSFW4DLHVAVGM2XGJLUQRSHIZIU2RBSJNKTOWRSLFCDESKNLFEVUSRVKJDTGNCBK42FKUSQJNIFCN2OJJJEGWSLJJKTEUCEKI2ESR2HIVBUMTCKJVHVCTKBKJATOMSTIRFDIMSZEZZG6PJRLUp.dat.saving': File name too long

But I know ext4 is meant to allow 255 byte names and unlimited path size, so it's very odd.

edit: hmm, actually it's ecryptfs, didn't realize it would be different: stat -f -c %T /home/redacted/ ecryptfs

Edit: according to https://unix.stackexchange.com/a/32834/52247 if filename encryption is enabled, there is usually a limit of ~140 characters. Damn.

I just tested and the max filename length I could use is 143 chars.

Is there any way I can prevent biglybt from trying to write such long named files?

I have only about 10 active downloads?

parg commented 2 years ago

I've fixed things if you join the beta program

drelephant commented 2 years ago

OK great, just joined.

Thanks again!!