Page 1 of 1

Disk error on creating file error started appearing for me again

Posted: January 24th, 2019, 1:25 am
by MikeC
I've recently started getting the "Disk error on creating file" error again. I'm running version 2.3.7 [7a8df5e], I can't recall if it just started with a particular update, so sorry about that.

My setup is a Raspberry Pi3 with latest Raspbian updates etc. I have an external HDD connected via USB. HDD is formatted with exfat filesystem (so I can move it between my Mac/Linux/Windows, when needed, and still use it without any issues). It is mounted with "/dev/sda1 /dl exfat defaults 0 1"

Back to the error:
I read a few of the previous posts on this, I clicked on the wrench and then on the refresh next to Download folder speed, result was (I did this after restarting the download, not sure if you wanted me to do it when things were in a paused state, I also did it when things were paused later on and got much the same figures):

Code: Select all

Download folder speed 21.9 MB/s  (/dl/pi/incomplete)
Complete folder speed 21.5 MB/s  (/dl/pi/staging)
My Download and Complete folders are on the same HDD (/dl). I don't have any symbolic links, all configs are pointing directly to the external drive.
Not sure if it helps, it seems to happen at the beginning of a download, I'm not sure if it is something with that download or the previous one that was extracting.
I enabled Debug Logging, I then added a few of the 100MB Test File downloads and the error occurred.

I'm not sure if it's related but a few days ago I saw in sabnzbd that the system was out of memory, which I hadn't seen before. When I did the test downloads at one stage I couldn't get to the webui which I hadn't had before (around 2019-01-24 06:06:00 in logs) and got a 500 Internal Server Error. The server encountered an unexpected condition which prevented it from fulfilling the request.

I will email the log file to you as with a link to this forum post.

Re: Disk error on creating file error started appearing for me again

Posted: January 25th, 2019, 3:26 am
by safihre
It seems you added the test download multiple times?
The directory is somehow deleted while it is still decoding.

Indeed the 500 error was also a MemoryError.
Maybe try to reduce the speed a bit on the poor Pi :)

Re: Disk error on creating file error started appearing for me again

Posted: January 25th, 2019, 4:53 am
by MikeC
How is the best way for me to handle this - just email the whole log to you as it is now? Will have all the occurrences of the disk errors and memory errors in it as well, I have turned logging back down earlier today but after the error occurred a few times.
What I have been tinkering with as a workaround is an API call to just clear the error and resume the downloader every 5 min - not ideal but it worked, once I figured out what silly mistakes I was doing in the script.

Re: Disk error on creating file error started appearing for me again

Posted: January 25th, 2019, 6:56 am
by safihre
I would need to have the Debug log for real downloads, now it seems you tried to download the test-download multiple times right?

Re: Disk error on creating file error started appearing for me again

Posted: January 25th, 2019, 7:05 am
by MikeC
Yes, correct. I have sent you an email now with the full log for the past few days. I had some failures with Disk Error earlier today. I've emailed it to you with "MikeC Debug Log TopicID: 117837" in the subject line.

Re: Disk error on creating file error started appearing for me again

Posted: January 27th, 2019, 3:45 am
by safihre
Looking at your log, could you enable "Make Windows compatible" in Config > Switches (enable Advanced Settings).
Its trying to create a file named
"gfrtcojzgbsdsnddg5tggm3b3dinlg" yEnc (1+1)
But maybe this is not supported on your filesystem.

Re: Disk error on creating file error started appearing for me again

Posted: January 27th, 2019, 3:50 am
by MikeC
Thanks for the update. Just checked and that setting is enabled. I've disabled that and see if it makes any difference.

Re: Disk error on creating file error started appearing for me again

Posted: January 27th, 2019, 4:20 am
by safihre
Strange, it should be ON. But then these filenames shouldn't happen.

Re: Disk error on creating file error started appearing for me again

Posted: January 27th, 2019, 4:22 am
by safihre
Oh.. I see where this goes wrong in the code..

Re: Disk error on creating file error started appearing for me again

Posted: January 27th, 2019, 4:26 am
by MikeC
I misunderstood/misread what you said. I've now enabled the option again.
safihre wrote: January 27th, 2019, 4:22 am Oh.. I see where this goes wrong in the code..
Ah, cool !!

Re: Disk error on creating file error started appearing for me again

Posted: January 27th, 2019, 5:22 am
by safihre
You can update your misc.py with this one?
https://github.com/sabnzbd/sabnzbd/blob ... bd/misc.py

I always wondered why we don't sanitize filenames (only Folders) if "Make Windows compatible" is enabled.
This is fixed now.

Re: Disk error on creating file error started appearing for me again

Posted: January 27th, 2019, 5:32 am
by MikeC
Done. Thanks.
I have downloaded and replaced my misc.py in the /usr/share/sabnzbdplus/sabnzbd folder (where I found that file) on my system. I saw there was a pyc file but reading online sounds like that will be created on compile when needed (so it sounds like to me anyway) so I have also renamed that to -old as well like I did with the misc file.
I've disabled my cron workaround and will monitor things over next few days. The error normally happened at least once a day so I should be able to report back reasonably soon if it reoccurs.

Re: Disk error on creating file error started appearing for me again

Posted: January 27th, 2019, 8:06 am
by safihre
It depends also on your source, if they include files with "bad" filenames.

Re: Disk error on creating file error started appearing for me again

Posted: February 7th, 2019, 12:38 am
by MikeC
I just wanted to give some feedback. Since I replaced that file 10 or so days ago .... I haven't had the problem reoccur so seems like it has definitely sorted out the problem for me. Cool !!

Re: Disk error on creating file error started appearing for me again

Posted: February 7th, 2019, 2:12 am
by safihre
Great.
It will be part of next SABnzbd release.