Existing configuration file gets corrupted if there is no free disk space available #11834

Open
opened 2026-02-21 21:59:51 -05:00 by deekerman · 3 comments
Owner

Originally created by @moonburnt on GitHub (Mar 10, 2021).

Please provide the following information

qBittorrent version and Operating System

Qbittorrent 4.3.3 (64-bit), Manjaro Linux

If on linux, libtorrent-rasterbar and Qt version

Qt: 5.15.2
Libtorrent: 1.2.11

What is the problem

Running out of free disk space cause qbittorrent's configuration file (in $HOME/.config/qBittorrent/) to break - the very next time you launch program, your settings will be reset to defaults. Doesnt seem to affect downloads - just configuration.
It kinda feels like configuration file gets autosaved each X seconds/minutes regardless if there has been any changes to it. And this process doesnt check if its possible to write data on disk. Thus, if its not - configuration is getting corrupted.

What is the expected behavior

Before saving configuration file, check if its possible to do so. If not - send error message and dont overwrite existing configuration.

Steps to reproduce

  • Install qbittorrent from repo
  • Set its download directory to be on the same partition as $HOME
  • Change some qbittorrent's settings (say, size and amount of data columns) to be non-default
  • Restart qbittorrent and try to download something large, to run out of disk space and get io error notification
  • Shutdown qbittorrent, free some space, run it again
  • Your qbittorrent's settings will be reverted to defaults

Extra info(if any)

I fully understand that this whole case is like a metaphor to shooting yourself in leg. Yet, say, firefox doesnt seem to behave like that in case of similar emergency. Thus I've considered it to be a bug

Originally created by @moonburnt on GitHub (Mar 10, 2021). **Please provide the following information** ### qBittorrent version and Operating System Qbittorrent 4.3.3 (64-bit), Manjaro Linux ### If on linux, libtorrent-rasterbar and Qt version Qt: 5.15.2 Libtorrent: 1.2.11 ### What is the problem Running out of free disk space cause qbittorrent's configuration file (in $HOME/.config/qBittorrent/) to break - the very next time you launch program, your settings will be reset to defaults. Doesnt seem to affect downloads - just configuration. It kinda feels like configuration file gets autosaved each X seconds/minutes regardless if there has been any changes to it. And this process doesnt check if its possible to write data on disk. Thus, if its not - configuration is getting corrupted. ### What is the expected behavior Before saving configuration file, check if its possible to do so. If not - send error message and dont overwrite existing configuration. ### Steps to reproduce - Install qbittorrent from repo - Set its download directory to be on the same partition as $HOME - Change some qbittorrent's settings (say, size and amount of data columns) to be non-default - Restart qbittorrent and try to download something large, to run out of disk space and get io error notification - Shutdown qbittorrent, free some space, run it again - Your qbittorrent's settings will be reverted to defaults ### Extra info(if any) I fully understand that this whole case is like a metaphor to shooting yourself in leg. Yet, say, firefox doesnt seem to behave like that in case of similar emergency. Thus I've considered it to be a bug
Author
Owner

@flakyton commented on GitHub (Mar 13, 2021):

The same issue here. I'm not sure it is a disk space issue, but I've observed the configuration got reset to default after upgrading to 4.3.3. After I have updated configuration manually to match the previous one, it got reset back after the restart. The tell is that created $HOME/.config/qBittorrent/qBittorrent_new.conf is a bare bones empty configuration.

@flakyton commented on GitHub (Mar 13, 2021): The same issue here. I'm not sure it is a disk space issue, but I've observed the configuration got reset to default after upgrading to 4.3.3. After I have updated configuration manually to match the previous one, it got reset back after the restart. The tell is that created `$HOME/.config/qBittorrent/qBittorrent_new.conf` is a bare bones empty configuration.
Author
Owner

@ghost commented on GitHub (Jul 23, 2022):

@Chocobo1 does https://github.com/qbittorrent/qBittorrent/pull/15419 fix this issue?

@ghost commented on GitHub (Jul 23, 2022): @Chocobo1 does https://github.com/qbittorrent/qBittorrent/pull/15419 fix this issue?
Author
Owner

@Chocobo1 commented on GitHub (Jul 23, 2022):

@Chocobo1 does https://github.com/qbittorrent/qBittorrent/pull/15419 fix this issue?

No.
However qbt do have some mechanism to deal with this problem. Although I'm not sure if that (mechanism) is sufficient or reliable.

@Chocobo1 commented on GitHub (Jul 23, 2022): >@Chocobo1 does https://github.com/qbittorrent/qBittorrent/pull/15419 fix this issue? No. However qbt do have some mechanism to deal with this problem. Although I'm not sure if that (mechanism) is sufficient or reliable.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#11834
No description provided.