bugmldonkey, a multi-networks file-sharing client - Bugs: bug #13198, *.ini files ought to be more crash...

 
 

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

bug #13198: *.ini files ought to be more crash resistant

Submitter:  Rolf Leggewie <leggewie>
Submitted:  Thu 26 May 2005 11:52:53 AM UTC
   
 
Category:  Core Severity:  4 - Important
Item Group:  Program malfunction Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  2.5.30.15 Release: 
Operating System:  Linux Binaries Origin:  Downloaded from third-party page
CPU type:  Intel x86

Jump to the original submission

Wed 27 Sep 2006 12:16:39 AM UTC, comment #8: 

Just wanted to say thank you.  This is really working beautifully now due to the backups.

Rolf Leggewie <leggewie>
Tue 21 Feb 2006 08:39:02 AM UTC, comment #7: 

Closing this patch, MLDonkey makes ini files backups by default now. Also HDD space will be checked with patch #4917 so ini files will not get corrupt if HDD is full.

spiralvoice <spiralvoice>
Group administrator
Sat 27 Aug 2005 03:51:39 PM UTC, comment #6: 

Maybe .ini.old should be fsync()ed before rename ?
It's not foolproof (I think page cache can still delay the commit to filesystem, and down to platters), but it could help.

pango <mlpango>
Group Member
Tue 23 Aug 2005 02:18:32 PM UTC, comment #5: 

"MLD is usually started from /etc/init.d/mldonkey_server"
This is part of the Debian package and maintained by Sylvian.

"Almost all the time after a clean shutdown of the computer, MLD will refuse to restart on the next reboot"
This is a known bug of the Debian package.

"The most common error seems to be that there are leftover ~/*.tmp files and MLD dies more or less quietly"
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=323948
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=283930

"Another thing that has occurred in the past was that an ~/mlnet.pid file was still around again preventing a restart."
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295854
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=280551

.tmp files are leftovers if the core was not able to save its
ini files properly and indicate unstable system hardware or
the core was killed with -9 before it could properly stop itself.

The problems you mention ae related to the MLDonkey package,
the daemon itself can´t do much about it. But with the newly
ini backup feature with its 10 generations you will be better
prepared for overwritten ini files in the future.

If you don´t object I would like to close this bug.
Please open another bug with your compilation problem if it is
still present in current MLDonkey 2.6.3

spiralvoice <spiralvoice>
Group administrator
Tue 23 Aug 2005 09:00:28 AM UTC, comment #4: 

I have not yet had the time to test the patch.  Unfortunately, I also failed to compile MLD.

Anyway, I'd like to comment further on issues I was having.  I use Debian testing and thus MLD is usually started from /etc/init.d/mldonkey_server.  Almost all the time after a clean shutdown of the computer, MLD will refuse to restart on the next reboot.  The most common error seems to be that there are leftover ~/*.tmp files and MLD dies more or less quietly.  Another thing that has occurred in the past was that an ~/mlnet.pid file was still around again preventing a restart.  The problem is that I do not see any output on the console indicating the problem, neither are there any entries in ~/log.  Thus I always have to manually start MLD from the command line to get to see the error messages. 

Error reporting in case things go wrong is definitely something that could be improved to make troubleshooting easier.

Rolf Leggewie <leggewie>
Wed 17 Aug 2005 12:23:11 AM UTC, comment #3: 

Patch #4297 introduces a tar.gz backup of all ini files in
directory old_files on core shutdown. Per default the last 10
backup generations are kept so recovering from these crash
situations will be less painful.
I would close this bug report having this patch, any objections?


4297: Create ini file backups on shutdown
Note: file_sources.ini is never saved, it makes no sense to keep this file.

New options:

  • backup_options_format, default "tar.gz", "zip" can also be used


  • backup_options_delay, default 0

How often (in hours) should a backup of the ini files be written into old_config.
A value of zero means that a backup is written only when the core shuts down.

  • backup_options_generations, default 10

Define the total number of options archives in old_config.

Command save got two new parameters:

  • "save all" saves options, sources and creates a ini file backup
  • "save backup" speaks for itself;-)


spiralvoice <spiralvoice>
Group administrator
Thu 26 May 2005 02:33:26 PM UTC, comment #2: 

Let me first clarify that by "it" I usually meant "the power outage" not "MLD".  Upon rereading I realized, that my text begs for that misunderstanding.  I do not think that MLD is at fault, that is why I filed as RFE because I hope there is a way to make MLD handle such situations out of its control more elegantly.  One suggestion might be to not rely on the huge files.ini but on a dir where there is one file for each download.  There might be other things that improve handling crash situations.  I opened this RFE to discuss these things.

MLD is automatically restarted via /etc/init.d/mldonkey-server upon restart.  That script is from the Debian package.

Of course, MLD did not delete the files itself.  The problem is that apparently all files were open when the crash occured.  The computer automatically restarted and fsck'ed the ext2 partition.  I assume that failed and so it booted nonetheless and mounted the partition unchecked (there was entry to that effect in dmesg).  MLD got started and oldconfig apparently was overwritten with the corrupt files.

Currently, the ini files are non-existant, not even default ones.  MLD stops shortly after being started.

Once I realized the problem this morning, I shut down the computer and booted into a rescue system and fsck'ed the data partition from there.  Apparently, the only affected files were the *.ini files for MLD.  Before confirming for e2fsck to fix the problems, I aborted the program and tried to back them up because I figured they'd be toast after e2fsck was done.  It was already too late :-(  The files were already irrecoverable before e2fsck fixed things.

I do not think this whole thing is really a program malfunction but an RFE as requested earlier.  It appears that MLD kept all ini files open at the time of the crash.  Otherwise they would not have become corrupted I guess.

Anonymous
Thu 26 May 2005 01:35:56 PM UTC, comment #1: 

"wiped out all *.ini files from /home/mldonkey and /home/mldonkey/oldconfig"

The core itself deletes no files from oldconfig, only when inis
are saved files are overwritten, but this happens through ini.tmp
files which are moved, this takes place during a fraction of a second.

How did you restart MLDonkey after the power outage?
Did the ini files just vanish or were they replaced by default ones?

spiralvoice <spiralvoice>
Group administrator
Thu 26 May 2005 11:52:53 AM UTC, original submission:  

Hi,

thanks to the major construction works in the vincinity we experienced another power outage last night.  Unfortunately, this also meant that MLD was shut down uncleanly. 

What this report/request is about is that it wiped out all *.ini files from /home/mldonkey and /home/mldonkey/oldconfig in the process.  I guess I do not have to tell you that getting MLD back running will be a major pain (all prios, configs, etc.).  Fortunately, I do have backups from a couple of days ago.  Everything changed in the meantime will of course be lost and I will have to spend some time on fixing things up.

My request is: Please make MLD handle such a crash more elegantly.  It should not wipe everything out.

Regards and keep up the good work

Rolf

Rolf Leggewie <leggewie>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-02-21 spiralvoice StatusIn Progress Fixed
    Open/ClosedOpen Closed
2005-08-17 spiralvoice StatusNone In Progress
2005-05-26 spiralvoice Severity3 - Normal 4 - Important
    Item GroupFeature request Program malfunction

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code