System hangs/crashes when moving renamed files to samba mount

Support for Ubuntu and other Desktop Linux distributions
Post Reply
thebestnumberis42
Posts: 11
Joined: 12 Aug 2015, 15:21

System hangs/crashes when moving renamed files to samba mount

Post by thebestnumberis42 »

Hi rednoah,

Long time user/fan/donor/purchaser. Your software is fantastic and I will use it until my fingers fall off. I have a strange issue that I can't figure out, so hoping you could provide some insight.

Anytime I rename a file (movie, tv, anime, doesn't matter) when I transfer the renamed files to a mounted samba share (for use with greyhole) my samba shares crash and bring down all of Cinnamon, forcing a reboot. It only happens when moving the Filebot renamed files to the samba mount and nothing else. Manually renamed (aka by me) files have no problem, it's only files Filebot has renamed. I tried copying the files to another drive and deleting the originals. That worked fine. I moved the copies back to the original drive, no problems. When I moved the copies to the samba mount, it still hangs then crashes. Even after a reboot, I can't move the renamed files or their copies to my samba mount without crashing cinnamon and breaking the samba mount.

I didn't include screenshots but basically the file transfer window hangs on 10-15%. While hung accessing the samba mount either hangs itself or shows nothing instead of my mounts. Eventually I get a window saying Cinnamon has crashed and I'm forced to reboot. I'm not sure what logs I can give you that would help, since this is happening outside of Filebot, but the reason I'm posting this here is because it ONLY happens on files renamed with Filebot. If I don't use Filebot, everything is stable and perfect but I'm stuck manually renaming files myself. Obviously I would much rather use your software :)

I'm using the Filebot GUI for now, but ultimately plan to implement the AMC script.

Hopefully I provided enough details. If there's anything else you want or need let me know and I'll oblige.

Thanks again for making killer software!

System information:
Linux Mint 19.2 Cinnamon
Greyhole used for drive pooling
Installed Filebot 4.8.5 via PPA stable

Output of filebot -script fn:sysinfo

Code: Select all

russell@cabin:~$ filebot -script fn:sysinfo
FileBot 4.8.5 (r6224)
JNA Native: 5.2.0
MediaInfo: 17.12
p7zip: p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (306C3),ASM,AES-NI)
unrar: UNRAR 5.50 freeware
Chromaprint: fpcalc version 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 11.0.4
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 7 GB Max Memory / 39 MB Used Memory
OS: Linux (amd64)
HW: Linux cabin 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/russell/.filebot
Package: DEB
License: FileBot License xxxxxxx (Valid-Until: 2020-12-08)
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 23925
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: System hangs/crashes when moving renamed files to samba mount

Post by rednoah »

I've never heard of Greyhole so that might be the unique difference that breaks things for you while things are generally working for everyone else.

I'd also check smb software. Some NASes have buggy smb / xattr implementations.

xattr is probably the notable operation that happens in addition to normal move operations, and since it's a less used feature, bugs in 3rd party file system implementations are not unlikely.
:idea: Please read the FAQ and How to Request Help.
thebestnumberis42
Posts: 11
Joined: 12 Aug 2015, 15:21

Re: System hangs/crashes when moving renamed files to samba mount

Post by thebestnumberis42 »

After further debugging, it looks like org.Nemo stops responding part way through the transfer. Checking the logs I'm seeing multiple errors around memory allocation, free pointers, and seg faults. I ran a cmp on files touched and untouched by filebot and they are exactly the same. It seems that filebot is doing something to the renamed files since these errors persist even after a reboot, but I can't figure out why.

I tried using other programs to rename files and didn't get these issues, so it's something isolated with Filebot.

Is there any other information I can offer you that may help? I would really like to continue using this product.. And I'm not using a NAS. I'm running Linux Mint and transferring the files to a mounted samba share, which points to another mounted HDD within the same linux mint box.
User avatar
rednoah
The Source
Posts: 23925
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: System hangs/crashes when moving renamed files to samba mount

Post by rednoah »

My educated guess is xattr. You can view and clear xattr with the xattr script. You can disable xattr with the -no-xattr switch.

Lastly, you can specify your own custom action, and just use system tools like mv and cp to perform the operation, or better yet, SCP directly skipping the problematic SMB layer:
viewtopic.php?t=4915
:idea: Please read the FAQ and How to Request Help.
thebestnumberis42
Posts: 11
Joined: 12 Aug 2015, 15:21

Re: System hangs/crashes when moving renamed files to samba mount

Post by thebestnumberis42 »

The issue isn’t with filebot doing the actual move or copy. After renaming files manually with the GUI, I close filebot then drag-n-drop the files from my desktop directory to the samba mount. This is what fails. I’ve tried using cp and mv too but they also crash cinnamon. I wish I didn’t have to use smb, but I do. I’ll look into the xattr script. If filebot is changing xattrs, wouldn’t the files before and after renaming be different? Using cmp, diff and comm, all results show the files before and after renaming being exactly the same.
User avatar
rednoah
The Source
Posts: 23925
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: System hangs/crashes when moving renamed files to samba mount

Post by rednoah »

xattr is a file system feature (not to be confused with file format features such as ID3 tagging for mp3 files) :arrow: viewtopic.php?t=324
:idea: https://en.wikipedia.org/wiki/Extended_file_attributes


Clear xattr from files:

Code: Select all

filebot -script fn:xattr --action clear /path/to/files
:idea: viewtopic.php?f=4&t=5#p5394
:idea: Please read the FAQ and How to Request Help.
thebestnumberis42
Posts: 11
Joined: 12 Aug 2015, 15:21

Re: System hangs/crashes when moving renamed files to samba mount

Post by thebestnumberis42 »

That makes sense. I guess my confusion is around what filebot is doing when renaming the files. Is it changing xattrs? If other programs or me manually renaming files doesn’t cause issues when I manually mv/cp why would anything renamed with Filebot?
User avatar
rednoah
The Source
Posts: 23925
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: System hangs/crashes when moving renamed files to samba mount

Post by rednoah »

thebestnumberis42 wrote: 13 Dec 2019, 23:50 That makes sense. I guess my confusion is around what filebot is doing when renaming the files. Is it changing xattrs? If other programs or me manually renaming files doesn’t cause issues when I manually mv/cp why would anything renamed with Filebot?
xattr would be the only significant difference I can think of. Just try. You have files that break things? Try it. Confirm it breaks things. Then clear xattr. Try again. See if it made a difference.

If the lack of xattr makes it work, then we know the cause, and the work around is then to delete all xattr, and configure filebot to not write xattr in the future.
:idea: Please read the FAQ and How to Request Help.
vbm
Posts: 3
Joined: 28 Feb 2020, 05:51

Re: System hangs/crashes when moving renamed files to samba mount

Post by vbm »

Definitely a problem with xattr.

I am having the same issue and when I try to use the cli to move a file renamed by FileBot I get the following error before the terminal hangs and I am forced to hard reset my Ubuntu box: "mv: setting attribute 'user.net.filebot.filename' for 'user.net.filebot.filename': Invalid argument".

Getting rid of user.net.filebot.filename and user.net.filebot.metadata with setfattr -x solves the problem.

Is there a way to prevent the GUI from using xattrs?

Thanks,

V
User avatar
rednoah
The Source
Posts: 23925
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: System hangs/crashes when moving renamed files to samba mount

Post by rednoah »

vbm wrote: 28 Feb 2020, 06:50 Is there a way to prevent the GUI from using xattrs?
Yes, you can permanently disable xattr via system properties:
viewtopic.php?t=324

Code: Select all

filebot -script fn:properties --def useExtendedFileAttributes=false
:idea: Please read the FAQ and How to Request Help.
vbm
Posts: 3
Joined: 28 Feb 2020, 05:51

Re: System hangs/crashes when moving renamed files to samba mount

Post by vbm »

Thanks. When I do "filebot -script fn:properties --def useExtendedFileAttributes=false" I get

Code: Select all

Script not found: properties
java.io.FileNotFoundException: Script not found: properties
        at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:55)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:119)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:115)

Failure (°_°)
Am I doing something wrong?
User avatar
rednoah
The Source
Posts: 23925
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: System hangs/crashes when moving renamed files to samba mount

Post by rednoah »

Maybe that one's new. Try upgrading to the latest beta revision of FileBot.
:idea: Please read the FAQ and How to Request Help.
vbm
Posts: 3
Joined: 28 Feb 2020, 05:51

Re: System hangs/crashes when moving renamed files to samba mount

Post by vbm »

Thanks. Starting the GUI with "filebot -no-xattr" works.
Post Reply