bugtexinfo - GNU documentation system - Bugs: bug #46481, install-info can...


You are not allowed to post comments on this tracker with your current authentication level.

bug #46481: install-info can "corrupt" dir file if interrupted.

Submitted by:  Pedrum Mohageri <pd5rm>
Submitted on:  Thu 19 Nov 2015 09:48:09 PM UTC  
Category:  install-info Release:  6.0
Priority:  7 - High Severity:  3 - Normal
Item Group:  bug Privacy:  Public
Open/Closed:  Open Assigned to:  None
Status:  None

Thu 19 Nov 2015 09:48:09 PM UTC, original submission:

I use Arch and the package manager bailed out on several packages during the install. I traced this to a failed install-info call to add entries for package to the 'dir' that info use.

After strace'ng the code, I observe it will do a open with O_TRUNC flag, and then write out some data. If the process is killed between the open and write, it will leave 0 byte dir file which can't written to by subsequent install-info calls. You should consider replacing this with a 'write to temp/rename temp to dir' changeover that's atomic.

While this is rare occurrence, I've seen numerous failures like this reported on Redhat and Arch forums.

Strace results:
open("dir", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcf1c842000
write(3, "This is the file .../info/dir, w"..., 867) = 867

Pedrum Mohageri <pd5rm>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pd5rm (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.4