FileBot + qBitTorrent = HDD freeze (fix included)

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Tyrel
Posts: 3
Joined: 25 Feb 2015, 21:50

FileBot + qBitTorrent = HDD freeze (fix included)

Post by Tyrel »

It took me days to figure this one out, thought I should get it to your attention (hint at devs) and also spare some hours of WTF to some other poor fellas... so:

Environment:
  • PC base:
    Asrock D1800-B ITX
    Windows 8.1 64bit
  • HDDs:
    Source (torrent downloads go here): HGST 7200rpm 500GB notebook hard drive (don't know the exact type from the top of my head)
    Target (Filebot copies the completed downloads here): USB 3.0 external - Seagate Expansion Desk 2TB
  • Typical files:
    1+ GB .mkv movies.
Symptoms:
  • The files copied over by Filebot cmd that is invoked by qBitTorrent actually do get copied and are there, BUT if you try to access them they completely freeze the external hard drive. It cannot read the files and also locks up as if the files were corrupted beyond reason.
  • Trying to access such corrupted files from the network can cause extreme issues in the Windows Explorer of the remote computer (that tries to read the shared file), causing it to hang so much even the start menu disappears.
  • Not all Filebot copied files get f'ed up, only about 75% of them.
qBitTorrent command:

Code: Select all

filebot.launcher.exe -script fn:amc --output "TARGET_PATH" --log-file amc.log --action copy --conflict override -non-strict --def music=n subtitles=en artwork=n exludeList=amc.txt "%f/%n"
Possible reason:
I think that when Filebot is invoked by qBitTorrent the download isn't exactly finished yet. It may have theoretically reached 100% but I think that all portions of the file are not yet written on the HDD, which causes Filebot to start copying a file that is missing some bits here and there...

Fix:
1. Create a bat file containing the following:

Code: Select all

timeout 60
filebot.launcher.exe -script fn:amc --output "TARGET_PATH" --log-file amc.log --action copy --conflict override -non-strict --def music=n subtitles=en artwork=n exludeList=amc.txt %1
2. Set qBitTorrent 'on completion' command to:

Code: Select all

BAT_FILE_WITH_PATH "%f/%n"
This will insert a 60sec delay between qBitTorrent download completion and the actual Filebot invoke, which should be enough time for qBitTorrent to completely write the downloaded file to the HDD.

Lesson:
I think the reason behind this is Java, but Filebot can create some seriously f'ed up files... this is not nice.

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

Re: FileBot + qBitTorrent = HDD freeze (fix included)

Post by rednoah »

In the end it's just data, so if Windows freezes it's a Windows bug, FileBot can't (or rather shouldn't be able to) do anything that messes with the OS.

Is the external drive using NTFS filesystem? Is the target folder a local filesystem or a remote filesystem?

Have you tried -no-xattr? Extended Attributes are known to mess with badly implemented SAMBA / NTFS software.
:idea: Please read the FAQ and How to Request Help.
Post Reply