[Aptitude-devel] Bug#764046: aptitude: race condition in config file replacement leads to warnings

Paul Wise pabs at debian.org
Sun Oct 5 03:12:12 UTC 2014


Package: aptitude
Version: 0.6.11-1
Severity: normal
Usertags: warnings race-condition

I run several cron jobs each doing aptitude searches and I often get
this warning from aptitude:

E: Unable to replace /home/pabs/.aptitude/config with new configuration file - apt_init (2: No such file or directory)

Looking at the code it seems that there is a race condition when
multiple aptitude instances are running:

http://sources.debian.net/src/aptitude/0.6.11-1/src/generic/apt/apt.cc?hl=247#L247

Every instance is using ~/.aptitude/config.new instead of creating a
temporary unique filename. This means that one process can rename
the .new file before another process gets a chance to do that, which
means the .new file disappears, rename fails and a warning is given.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20141005/d9308d8d/attachment.sig>


More information about the Aptitude-devel mailing list