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

_______________________________________________
Aptitude-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/aptitude-devel

Reply via email to