# qutebrowser session corrupted when no space left to write



## serpent7776 (Aug 30, 2019)

Not sure where this belongs, so creating it here.

I recently had issue with www/qutebrowser. When I quit it, it should write session file, but there was no space left to save it. This resulted in my session file being trulcated to zero size. 
I opened issue on Github, but the author said it already does the proper write-then-move, which should address this kind of issues.

Do you have any idea what might have happened?


----------



## Phishfry (Aug 31, 2019)

Just a wild guess on my part but:


serpent7776 said:


> there was no space left to save it.


Maybe it is locked and that message is bogus. Not running root user right?
Also HAL and dbus are needed for some gui applications I have noticed.
The session stuff specifically uses dbus.


----------



## serpent7776 (Sep 1, 2019)

There actually was no space left, because I checked it with `df -H` and it reported negative free space.
The browser was running as normal user, not root.
I'm running dbus in my ~/.xinitrc with `dbus-launch`, but I don't think I'm using HAL.

Also in the github issue it was stated that:


> Maybe the underlying syscalls work differently on BSD somehow - IIRC BSD isn't a supported Qt platform


----------



## Crivens (Sep 1, 2019)

If they use syscalls instead of libc for such things they might have some trouble elsewhere... Having a file system fill up is not that strange a thing. Maybe some autotests might be in order, for qt?


----------



## serpent7776 (Sep 1, 2019)

Crivens said:


> Maybe some autotests might be in order, for qt?


Do you mean I should write a test or run some existing test?
Also I'm using UFS for my /usr.


----------



## Crivens (Sep 1, 2019)

serpent7776 said:


> Do you mean I should write a test or run some existing test?
> Also I'm using UFS for my /usr.


No, I mean the QT team should implement some auto tests checking for this case. They already do some pivot stuff (write new file, exchange with old file, remove old), but it seems not to work correctly. Blaming this on syscalls is, well, they should know what they are doing. And for the original topic - when your file system is full, what do you expect? That somehow a file can be written?


----------



## serpent7776 (Sep 1, 2019)

Crivens said:


> No, I mean the QT team should implement some auto tests checking for this case


You mean they don't have it? That's a bit weird I guess.



Crivens said:


> And for the original topic - when your file system is full, what do you expect?


I expect existing file not to be truncated and left intact.


----------

