bugWeeChat - Bugs: bug #36383, Config files occasionally...

 
 

bug #36383: Config files occasionally truncated (zero-length) after crash.

Submitter:  Mateusz Poszwa <f8l>
Submitted:  Thu 03 May 2012 01:44:49 PM UTC
   
 
Category:  config file Severity:  3 - Normal
Item Group:  other Status:  Fixed
Privacy:  Public Assigned to:  flashcode
Originator Name:  Open/Closed:  Closed
Release:  * 0.3.7 IRC nick:  f8l
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 03 May 2012 01:44:49 PM UTC, original submission:  

Contents of ~/.weechat/weechat.conf and other config files are sometimes disappear after a power outage or other crash.
This was probably caused by the fact that some filesystems are unable rename a file atomically if the rename doesn't overwrite another file.

More information about overwrite-by-rename: http://btrfs.ipv5.de/index.php?title=FAQ#What_are_the_crash_guarantees_of_overwrite-by-rename.3F

I attach a simple patch that may fix the problem.

Mateusz Poszwa <f8l>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by flashcode (Updated the item)
  • -email is unavailable- added by f8l (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-06-03 flashcode Open/ClosedOpen Closed
    2012-05-03 flashcode Item GroupNone other
        StatusNone Fixed
        Assigned toNone flashcode
    2012-05-03 f8l Attached File- Added 0001-Make-config_file_write_internal-perform-an-overwrite.patch, #25772

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code