Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I/O error: Access denied (Win 8.1 x64, NTFS) #2904

Closed
Shmong opened this issue Apr 22, 2015 · 61 comments
Closed

I/O error: Access denied (Win 8.1 x64, NTFS) #2904

Shmong opened this issue Apr 22, 2015 · 61 comments
Labels
Not an issue User error, problem unrelated to qBittorrent, feature already implemented, etc

Comments

@Shmong
Copy link

Shmong commented Apr 22, 2015

I have an error when downloading new torrent over current one, like TV-series.
I've started the new download, after deleting previous one, started with administrator priveleges, etc etc... but each time i see the error after hash-check.
qBitTorrent checking pre-last file on ~97-99% then start check in the last file (it's not completely downloaded before by qBit) and then i see an error.
If i using uTorrent instead - everything be OK. I've reinstalled the system from Server 2012 (it has the same error). HDD is not the reaso, cause uTorrent is allright and i've checked all of them (actually i'ts 3 different HDD)

@chrishirst
Copy link
Contributor

See:

#2750
#2901

and
#2853

@Shmong
Copy link
Author

Shmong commented Apr 22, 2015

Tried to limit all connections to minimal values (half-opened, on torrent etc) - no effect.
All limited to 5.
Ver: 3.1.12
Qt: 4.8.6
Lib: 0.16.19.0
Boost: 1.55.0

@chrishirst
Copy link
Contributor

(actually i'ts 3 different HDD)

As a RAID?
Mapped to a drive?
Mounted in a folder?
Or connected via a network URN?

@sledgehammer999
Copy link
Member

Can you check the reported system RAM usage while it is close to error out?
PS: When I say "system" I mean the memory used by all apps, because this includes memory used/reserved by the OS itself.

@bloodybunny
Copy link

Or set the Disk writh cache size to 1.000 MiB or under and see if the problem persists.

@Shmong
Copy link
Author

Shmong commented Apr 23, 2015

Chrishirst, No, just tried 3 different HDDs to write on, no RAID, just AHCI mode.
Sledgehammer999, checked... >11 Gb of 16Gb is free in that moment.
image
Balloon in tray says: I/O Error occured. For torrent "x" file "x:\path"
I've deleted file names and labels for safety ))

bloodybunny: I'll try.
UPD: No result. Same error on 99%

@sledgehammer999
Copy link
Member

Sorry for the late response, but I don't now any Russian.
How big is the torrent and what is the size of the last file that isn't checked?

@Shmong
Copy link
Author

Shmong commented Apr 27, 2015

It's never too late )))
On Image summary is 8,4 GB... last file with 99% is 1,4 GB and it's skipped to the next file with the same size and stuck on it with I/O Error.

@sledgehammer999
Copy link
Member

Last file is 1,4GB... But what is the total torrent size?
EDIT: Now I understood what you're saying. Total torrent size is 8,4GB.
EDIT2: Can you try with the 64bit versions to see if the problem persists? Link to forum thread: http://qbforums.shiki.hu/index.php/topic,1645.0.html

@Shmong
Copy link
Author

Shmong commented Apr 29, 2015

Checked. The same result. 3.2.0 alpha.

@sledgehammer999
Copy link
Member

@arvidn any idea on what to look for here? On what to investigate?

@sledgehammer999
Copy link
Member

@arvidn: I/O error: is used by qbt when it has received a libtorrent::file_error_alert. "Access denied" is what is returned by the message() of that alert.

@crazechkahu
Copy link

Shmong,do you fix the problem?Can you help Russian student(me) ? =))

@ghost
Copy link

ghost commented Apr 12, 2017

Since I have a feeling it may be connected, I also get a similar Access Is Denied error (at least, from what I can tell, given it's in Russian).

Appears to only occur with torrents I transferred over from uTorrent back when I switched, although within uTorrent they were completed with no errors. I tried poking here and there to see if I could figure out what may be the issue, but it appears random (only a few of the ones transferred from uTorrent, and all are located within the same external drive as the ones that don't send errors).

I tested moving the affected file (as it's only ever one or two within a torrent, not every file) to another folder and letting it redownload, which worked for one torrent that was throwing errors; it redownloaded the affected file successfully - although another file within that torrent began throwing errors. I eventually managed to get that torrent to Completed by repeating that process, however redownloading has not worked for any other downloads.

The torrents themselves will get seeds and begin downloading, but will only go up a few KiB and then spring the error, and slowly work their way down to nothing (although sometimes they just sit around a few KiB for hours before doing so, while still springing the error and seemingly not downloading anything, despite changing my Downloaded amount) before stalling out.

I would post my RAM usage, but my computer is terrible so most of my usage stats are close to max at all times; despite this torrents can upload and download fine, with the exception of the few afflicted torrents.

If this is unrelated to this open issue I can move it to its' own issue.

@Richard-L
Copy link

Richard-L commented Jun 1, 2020

Bump.

I've been googling for hours on this problem to find this issue. I get the impression this is not a widespread problem and thus not pressing enough issue. It still means I cannot use qBittorrent, sadly.

Running as admin, I get the error when adding previously unselected files to be downloaded from the torrent. The download location is set to an external USB drive. After the error, I have to force re-check to make it work again. But I cannot add any files.

Have there been any ideas on this in the past couple of years?

Thanks

@arvidn
Copy link
Contributor

arvidn commented Jun 1, 2020

Is there a way in qbt to "clear error" on a torrent? I would expect stopping and starting again would do that, but perhaps it doesn't.

My suspicion is that your disk error happens for some reason. the torrent is stopped with an error. In order to resume the torrent, the error has to be cleared (by calling torrent_handle::clear_error()). presumably the only way (you've found) where qbt does that, is to do a recheck.

If starting the torrent would also clear the error first, at least you could just do that instead. However, the underlying disk error is a different question. To have a chance of understanding that, we would need more information from the error message in the log.

@FranciscoPombal
Copy link
Member

Is there a way in qbt to "clear error" on a torrent? I would expect stopping and starting again would do that, but perhaps it doesn't.

My suspicion is that your disk error happens for some reason. the torrent is stopped with an error. In order to resume the torrent, the error has to be cleared (by calling torrent_handle::clear_error()). presumably the only way (you've found) where qbt does that, is to do a recheck.

If starting the torrent would also clear the error first, at least you could just do that instead. However, the underlying disk error is a different question. To have a chance of understanding that, we would need more information from the error message in the log.

@glassez ping, what do you say about this?

@glassez
Copy link
Member

glassez commented Jun 3, 2020

@glassez ping, what do you say about this?

Only the following for the start:

To have a chance of understanding that, we would need more information from the error message in the log.

@Richard-L
Copy link

I've since had to move to another client as because of this issue I cannot use qbitorrent. Thus also not able to provide a log very conveniently, sorry. If you show me how to easily generate a log I can look into this again.

@xavier2k6
Copy link
Member

@Richard-L if on windows, logs are found here -> %LOCALAPPDATA%\qBittorrent\logs

@xavier2k6
Copy link
Member

xavier2k6 commented Jun 3, 2020

@glassez here's a possible example of the error:

(C) 2020-06-02T15:38:49 - Could not move torrent: INFO_REDACTED. Reason: INFO_REDACTED storage move failed. partfile_move (partfile): Access is denied
(C) 2020-06-02T15:39:39 - Could not move torrent: INFO_REDACTED. Reason: INFO_REDACTED storage move failed. partfile_move (partfile): Access is denied
(C) 2020-06-02T15:39:43 - Could not move torrent: INFO_REDACTED. Reason: INFO_REDACTED storage move failed. partfile_move (partfile): Access is denied

This was from setting 3 torrents to my main C drive via set location & then back to the drive E where the files had previously being downloading.......

@Richard-L
Copy link

@xavier2k6 thank you, I have the log now.

How can I send this to someone privately?

@FranciscoPombal
Copy link
Member

@Richard-L it would be better to just censor/redact the parts you find sensitive and post here.

@Richard-L
Copy link

Richard-L commented Jun 3, 2020

qbittorrent.log

@FranciscoPombal okay, I have added some ######. I hope it's still useful.

Is it possible the problem stems from when people "rename" the torrent since they want their own name of the destination sub-folder? I had done that in the "add torrent" dialogue. The name I'd chosen is unedited in the log.

@arvidn
Copy link
Contributor

arvidn commented Jun 3, 2020

it looks like the call to CreateFile() failed with an access denied error. Is the file on a read-only drive? Does the qbt process have access to the file? Is it opened and locked by some other process perhaps?

@FranciscoPombal
Copy link
Member

Or, could the path be too big (in case you haven't lifted the MAX_PATH restriction in Windows)?

@Richard-L
Copy link

@arvidn @FranciscoPombal thank you for your assistance.

I've done some tests and the problem only occurs if I use the "rename" function available when adding torrents. If I leave the folder name provided by the torrent itself, it all works fine.

Can you reproduce this error?

@glassez
Copy link
Member

glassez commented Jun 4, 2020

Can you reproduce this error?

Can you provide complete "steps to reproduce"?

@Richard-L
Copy link

@glassez

  1. Open qBittorrent
  2. Add Torrent from file
  3. Set Location on external USB drive
  4. Use the "rename" function for destination folder:
    image
  5. Deselect all files in torrent and click OK (it will immediately prompt "torrent has finished")
  6. In the "Content" tab, add a checkmark to selected items in the torrent. This is when the error happens.

@thalieht
Copy link
Contributor

thalieht commented Jun 5, 2020

I can reproduce but rename is irrelevant for me and at step 6:

  1. Check one file and let it download a bit and then check the root folder to select everything

On a usb flash drive i get the same error Access denied
On an internal HD i get error: The system cannot find the path specified
Both are trying to access a file inside a non existing .unwanted folder for me.

Official 4.2.5

@Richard-L
Copy link

Unfortunately I'm unable to reproduce it.

Oh no.....

Guess I'll have to not use the rename feature then, although his will create quite a bit of room for error in my case.

@ghost
Copy link

ghost commented Jun 6, 2020

Couldn't reproduce it on windows 10 with qBt 4.2.5 as well as latest master.

@Richard-L
Copy link

@glassez @An0n666 I've tried on a Win10 machine and I also cannot reproduce the problem there.

Could you please try on a Win7-x64? It looks like the problem is to do with that.

@FranciscoPombal
Copy link
Member

@Richard-L

@glassez @An0n666 I've tried on a Win10 machine and I also cannot reproduce the problem there.

Could you please try on a Win7-x64? It looks like the problem is to do with that.

I'll repeat my question:

Or, could the path be too big (in case you haven't lifted the MAX_PATH restriction in Windows)?

IIRC the restriction can only be lifted in Windows 10 version >= 1607. But to be honest, even if the problem is something else, you shouldn't be using Windows 7 at this point, it has been EOL for nearly half a year already.

@Richard-L
Copy link

@FranciscoPombal Win7 is still officially supported by qBittorrent, right? Win10 deleted my %userprofile% files after a WindowsUpdate several times and I lost too much important data because of it.

I did have the long path restriction fix checkbox ticked when installing both times, but as you say this is only available on Win10. I assume you mean that option?

While I don't think my desired path is overly long, indeed I cannot reproduce the problem with a shorter path closer to root level. Is this path fix possible for Win7?

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Jun 6, 2020

@Richard-L

@FranciscoPombal Win7 is still officially supported by qBittorrent, right?

Only in the sense that "its dependencies still happen to work on Windows 7, for now". Windows 7 is EOL and has received no security updates for nearly half a year. Additionally, no developer/contributor (that I know of, at least) is running Windows 7 and testing on it. Furthermore, unexpected problems may arise from boost, Qt, etc as less effort is put into making sure they work well on an obsolete OS.

Win10 deleted my %userprofile% files after a WindowsUpdate several times and I lost too much important data because of it.

True, there was one well-documented case of a Windows Update that deleted some users' data. Solutions for stuff like this are:

  • Don't use Windows, use Linux
  • Backup your data, have a proper backup scheme in place (you should be doing this regardless)

I did have the long path restriction fix checkbox ticked when installing both times, but as you say this is only available on Win10. I assume you mean that option?

Yes.

While I don't think my desired path is overly long, indeed I cannot reproduce the problem with a shorter path closer to root level.

"I don't think my desired path is overly long" is not precise enough. It's either too long or it isn't. The standard path length limit in Windows is 260 characters, including the invisible terminating NUL (which is 1 character). So, taking that into account plus the initial C:\ (which is 3 characters), it means the paths may not exceed 256 characters in length. Count the characters to make sure. https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation

From what you describe, the problem does seem to be too long file paths.

Is this path fix possible for Win7?

No. At least not on qBittorrent's side. Honestly, just move to a non-obsolete OS.

@mishrasumitranjan
Copy link

mishrasumitranjan commented Aug 6, 2020

Hello,
I seem to be facing the same issue as mentioned here.
Most of my downloads go to external hard-drive. Whenever I start a torrent which has some files completed (downloaded with uTorrent earlier, but there are no partial data files), it downloads for a few seconds then stalls with an I/O Error (file_open error: Access is denied). Although, the files are not open anywhere.
I have tried starting qBittorrent as Admin and provided full control to all users for the download folder. But I still see the problem all the time. Force Recheck and Force Reannounce have no effect. Neither does restarting the client.

An Example -
F-Drive is the external hard-drive.
v01-03 were bundled in a previous torrent and have been downloaded with uTorrent. An updated torrent with v01-03 & v04.txt was added to qBittorrent with the same download location as the previous torrent. The client checked the file status and found that previously v01-03 was downloaded.
On starting the torrent, The following error appeared:

<Date-Time> - File error alert. Torrent: "<Torrent Name> ". File: "F: \<Torrent Name> \<Torrent Name> v04.txt". Reason: <Torrent Name> file_open (F: \<Torrent Name> \<Torrent Name> v04.txt) error: Access is denied

@arvidn
Copy link
Contributor

arvidn commented Aug 7, 2020

I would expect long file names not to be the only reason to get this error (and names are supposed to be truncated as well). Perhaps there's a character encoding issue in the file names, or some other invalid character in it.

@mishrasumitranjan
Copy link

All the characters are in English and there are usually 2-3 pairs of round brackets in the name. All the affected file names were between 25-50 characters long with the folder name being the same. I download them 1 level below the main directory with the folder name being 5 characters long. So the an example of the final path would be-
F:\abcde\<25-50 characters>\<25-50 characters>.txt

@xavier2k6
Copy link
Member

Whenever I start a torrent which has some files completed (downloaded with uTorrent earlier, but there are no partial data files), it downloads for a few seconds then stalls with an I/O Error (file_open error: Access is denied).

Do they have the uTorrent extension attached to them, is uTorrent closed? etc.

@glassez
Copy link
Member

glassez commented Aug 7, 2020

All the characters are in English and there are usually 2-3 pairs of round brackets in the name.

Well, brackets are forbidden in NTFS filenames.

@FranciscoPombal
Copy link
Member

All the characters are in English and there are usually 2-3 pairs of round brackets in the name.

Well, brackets are forbidden in NTFS filenames.

I assume by "round brackets" they meant "parenthesis" (( and )), which are allowed.

@mishrasumitranjan @Richard-L please post example torrents/hashes that can be used to reproduce the problem.

@glassez
Copy link
Member

glassez commented Aug 7, 2020

I assume by "round brackets" they meant "parenthesis", which are allowed.

So the an example of the final path would be-
F:\abcde\<25-50 characters>\<25-50 characters>.txt

@mishrasumitranjan
Copy link

mishrasumitranjan commented Aug 7, 2020

@xavier2k6 They were completed files. No partial data or uTorrent extension remaining. uTorrent was also closed at the time. Since I thought that might be what is causing the issue.

@glassez I meant 'Parenthesis'. Angle brackets were a way to say 'put anything 25-50 characters long here'.
Since they are not supported in NTFS, they don't appear in torrents either and I use default names of the torrents.

@FranciscoPombal Here is a zip containing two files. The one numbered 3 is the older. The one numbered 4 is an update and contains one file more.
Files.zip

@FranciscoPombal
Copy link
Member

@mishrasumitranjan

Well, the paths are not especially long and they definitely don't contain any weird characters, not even characters NTFS on Windows disallows, so that is not the problem.

Can you reproduce the problem when not using an external drive? Can you reproduce it using any (sample size of 2 is acceptable here) external drive?

@mishrasumitranjan
Copy link

mishrasumitranjan commented Aug 9, 2020

@FranciscoPombal
Turns out I had never really tried that on local drive. I was able to reproduce the issue on my local drive in 3 out of 4 tries.
Since I download most of the stuff to external drive I assumed it might be related to that.
Additionally, the issue has no relation to sequential download option. And usually a few pieces are downloaded before the torrent stalls. The number of pieces downloaded before the stall seems to be more on local drive as compared to external drive.

@FranciscoPombal
Copy link
Member

@mishrasumitranjan

I've had no problem with these torrents when doing the following:

  1. Completing the first one and stopping it (and removing it)
  2. Adding the second one to download the extra file (I point it at the same save location, it rechecks, starts, downloads the remaining file and exits).

It should also be no problem doing step 1 with a different client other than qBittorrent, but in this case the torrent should be removed from the other client and that client closed before doing step 2.

There's probably something wrong with your system, permission-wise.

@mishrasumitranjan
Copy link

New torrents and torrents previously downloaded with qBittorrent do not have any issues downloading.
Only the ones previously downloaded in uTorrent had the issue
However, I tested one torrent by removing all previous iterations from uTorrent, then closing the client and starting the download in qBittorrent. And it worked.
I hope the issue is solved. Anyways, I'll test a few more and get back to you.

@FranciscoPombal
Copy link
Member

@mishrasumitranjan

New torrents and torrents previously downloaded with qBittorrent do not have any issues downloading.
Only the ones previously downloaded in uTorrent had the issue
However, I tested one torrent by removing all previous iterations from uTorrent, then closing the client and starting the download in qBittorrent. And it worked.

So the issue only happens when uTorrent is also running? If so, I don't think there is anything we can do.

@mishrasumitranjan
Copy link

@FranciscoPombal Yes, I think so.
I haven't encountered the issue since and have tried multiple torrents.
I guess I assumed that since the torrents were stopped in uTorrent, the files would no longer be affected by that.
Thanks a lot for all the help!

@FranciscoPombal
Copy link
Member

Alright, issue appears to be due to uTorrent interfering, so this is not an issue with qBittorrent. In #2904 (comment), we can also see that uTorrent is running in the background, so most likely OPs problem is the same. Thus, we can consider this solved.

There is an unrelated reproducible issue mentioned in #2904 (comment) - @thalieht can you still reproduce? If so, I'll close this one and open a new ticket to focus on that specific issue.

@FranciscoPombal FranciscoPombal added the Not an issue User error, problem unrelated to qBittorrent, feature already implemented, etc label Aug 10, 2020
@thalieht
Copy link
Contributor

@thalieht can you still reproduce?

Latest qBt version is still 4.2.5 and since i mentioned the problem involves the .unwanted folder for me, i have no reason to try to reproduce. Just assume it still happens (for me).

@FranciscoPombal
Copy link
Member

@thalieht

Latest qBt version is still 4.2.5 and since i mentioned the problem involves the .unwanted folder for me, i have no reason to try to reproduce. Just assume it still happens (for me).

Wasn't the .unwanted folder feature removed recently? Can you reproduce this in current master, or some commit after the removal of that feature?

@xavier2k6
Copy link
Member

Wasn't the .unwanted folder feature removed recently? Can you reproduce this in current master, or some commit after the removal of that feature?

Yes it was

@thalieht Hopefully, you'll be able to confirm with below?!

Windows test build of 4.3.0(Alpha1) with listed libraries:

qBittorrent master   | 4.3.0 +git 4d1c5a8
libtorrent-rasterbar | 1.2.8 +git 6b7b624
Qt                   | 5.15.0
OpenSSL              | 1.1.1g
zlib                 | 1.2.11
Boost                | 1.73

Download Link

@thalieht
Copy link
Contributor

Thanks @xavier2k6. I don't get I/O errors with this build.

/Offtopic
Not a good idea to show the following msg in the logs when adding a torrent considering the default option for it is off.

Download first and last piece first: Off, torrent: 'Torrent Name'

@FranciscoPombal
Copy link
Member

Alright, looks like everything is resolved then. Thanks!

@qbittorrent qbittorrent locked as resolved and limited conversation to collaborators Aug 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Not an issue User error, problem unrelated to qBittorrent, feature already implemented, etc
Projects
None yet
Development

No branches or pull requests