[Aptitude-devel] Bug#906695: Bug#906695: aptitude: apt doesn't call fsync on the file extended_states
Mikulas Patocka
mikulas at twibright.com
Sun Aug 19 21:40:50 BST 2018
On Sun, 19 Aug 2018, Axel Beckert wrote:
> Control: tag -1 + moreinfo
>
> ,Hi Mikulas
>
> Mikulas Patocka wrote:
>> Package: aptitude
> ^^^^^^^^
>> * What led up to the situation?
>>
>> apt doesn't call fsync when writing the file extended_states - so that if
> ^^^
>> If you strace aptitude, you can see that it writes the file
> ^^^^^^^^
>> I had my file extended_states corrupted when the system crashed while
>> doing unattended upgrades.
> ^^^^^^^^^^^^^^^^^^^
>> apt should call fsync before closing the file handle
> ^^^
>
> You've mentioned three different package managing tools: apt, aptitude
> and unattended-upgrades.
>
> Since you've straced aptitude, I assume you meant aptitude where you
> wrote apt. But then again unattended-upgrades uses apt, not aptitude.
>
> Please clarify!
>
> Regards, Axel
All of the apt tools should use fsync (because the machine may crash when
the user is using any of them).
In my case, unattended-upgrades corrupted the file extended_states when
the machine crashed, but unattended-upgrades will not write the file if
there are no upgrades being done, so stracing it doesn't show the bug.
Mikulas
More information about the Aptitude-devel
mailing list