-
Notifications
You must be signed in to change notification settings - Fork 365
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
opam behavior when disk is full #2715
Comments
Sorry about it! |
On second thought, just removing the file in the handler of exceptions that are raised during write should already help a lot, shouldn't it ? |
Should help mitigate ocaml#2715, although it's not a real solution (no file is better than an incomplete file, but keeping the older version of the file when it exists would probably be a better behaviour, if not, obviously, perfect)
Might having a small permanent file created by opam init help in some cases - i.e. a small reservation of disk space? Obviously doesn't help if you have another active process which is chomping any disk space remaining, but it might be enough to ensure that config files are written back? |
I just ran into this problem. I think doing atomic writes of files (writing, fsyncing, then swapping the files) would make sense and avoid a lot of problems with low disk space. |
Problem encountered with an upgrade & repo config file in #4157 |
On opam 2.1.2 I somehow managed to hit an even weirder instance of this issue. After running out of disk space during switch creation, |
@pitag-ha also hit the same issue last week with also some sort of corruption of the file description. We have no idea what's happening there. |
The file corruption issue should be fixed by #5489 in opam 2.3, however the more general issue of having partial states kept around is more complicated to fix so i'm keeping this issue open for it. |
On 2.0, when doing
opam switch remove foo
while disk is full:~/.opam/config
is replaced by an empty fileI understand that handling a full disk is complicated, but I would like if it at least didn't made my opam install unusable. :(
The text was updated successfully, but these errors were encountered: