Saving files failing with Stale File Handle: OSError: [Errno 116] Stale file handle:

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Linphi
Newbie
Newbie
Posts: 3
Joined: October 15th, 2022, 3:17 pm

Saving files failing with Stale File Handle: OSError: [Errno 116] Stale file handle:

Post by Linphi »

Here's a pastebin log: https://pastebin.com/n5mSXm6E

Since recently Sabnzbd is failing to save files with "Stale File Handle" errors. However I tried to write files on the OS level with the sabnzbd user and it all works fine, no other process on this machine seems to have an issue with the file system (smb export from Truenas).
Any ideas what the issue is here and why it is just Sabnzbd somehow being unable to write files?
User avatar
sander
Release Testers
Release Testers
Posts: 8826
Joined: January 22nd, 2008, 2:22 pm

Re: Saving files failing with Stale File Handle: OSError: [Errno 116] Stale file handle:

Post by sander »

Interesting read on https://stackoverflow.com/questions/201 ... linux-mean

TLDR: directory was deleted, and then recreated. And if you point to the old inode, you get that error.
Linphi
Newbie
Newbie
Posts: 3
Joined: October 15th, 2022, 3:17 pm

Re: Saving files failing with Stale File Handle: OSError: [Errno 116] Stale file handle:

Post by Linphi »

I tried to mount the directory though NFS instead to rule out samba - same issue, though slightly different error message.
Sabnzbd is actually able to create files and directories but most of them end up with 0 bytes for some reason. So it can’t be any permission issue.
If I try to modify those files from the terminal I don’t have any issues there… somehow something to do with how it handles files?
Clueless right now why it doesn’t work. Everything looks normal, can mount the same filesystem on my MacBook and create/copy files just fine over the network.
Plex accesses the same filesystem over the same mount and also has no issues there.
User avatar
sander
Release Testers
Release Testers
Posts: 8826
Joined: January 22nd, 2008, 2:22 pm

Re: Saving files failing with Stale File Handle: OSError: [Errno 116] Stale file handle:

Post by sander »

/mnt/media/downloads/incomplete/ ... can't you put Incomplete on a local disk (and keep Complete on the TrueNAS)?
Linphi
Newbie
Newbie
Posts: 3
Joined: October 15th, 2022, 3:17 pm

Re: Saving files failing with Stale File Handle: OSError: [Errno 116] Stale file handle:

Post by Linphi »

Yes, I've done that now and that seems to work fine... it worked flawlessly over the network for years, so not sure what the current issue is with it. But should be no issue to keep it this way now.
User avatar
sander
Release Testers
Release Testers
Posts: 8826
Joined: January 22nd, 2008, 2:22 pm

Re: Saving files failing with Stale File Handle: OSError: [Errno 116] Stale file handle:

Post by sander »

Great it works.

Having Incomplete aka Temporary Download Folder on a non-local disk can give problems: SAB does a lot of writing and reading to that directory: all separate articles (typically 1500 articles per 1GB), combining them, unrar, and par2-repair if needed. A perfect remote disk can handle that, but in practice things happen.

So safer to have Incomple on a locak disk.
Post Reply