patchmldonkey, a multi-networks file-sharing client - Patches: patch #7954, Fix handling of full disc


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

patch #7954: Fix handling of full disc

Submitted by:  Jesús Cea <jcea>
Submitted on:  Wed 20 Feb 2013 12:41:56 AM UTC  
Category:  Bug fixes Priority:  7 - High
Status:  Done Assigned to:  spiralvoice <spiralvoice>
Open/Closed:  Closed

Sun 07 Jul 2013 10:54:02 AM UTC, comment #2:

committed 2013/07/07

spiralvoice <spiralvoice>
Project AdministratorIn charge of this item.
Wed 10 Apr 2013 08:06:26 AM UTC, comment #1:

The patch looks like a correct thing to do.

ygrek <ygrek>
Project Member
Wed 20 Feb 2013 12:41:56 AM UTC, original submission:

MLDonkey dies if the harddisk is full. Details in <>


Nobody helped Sad.

I bited the bullet and dived into the OCaml (ouch!, I am a C/Python guy Smile. I found the issue and solved it with two lines of code.

The problem is this: Periodically, MLDonkey does a fake write to verify that it cat write to the harddisk. It catches some failures there, but doesn't catch this one: DISK FULL.

So, if the disk is full, the write will fail, the failure is not going to be recognized as "temporal" but "terminal", and mldonkey simply dies.

But the HardDisk is suppose to not be full ever. MLDonkey will stop downloading with the free space is below 50MB. But a) some other program could be writing to the same partition at the same time and b) the free space check is done once per minute, so if the download speed is high, you could not notice the diskfull until it already full.

The patch is quite simple. In production for two weeks now, no side effects:

$ diff -u ./src/utils/cdk/ ./src/utils/cdk/
--- ./src/utils/cdk/ 2013-02-04 03:19:58.000000000 +0100
+++ ./src/utils/cdk/ 2013-02-04 03:21:47.000000000 +0100
@@ -224,6 +224,8 @@
| Unix.Unix_error (Unix.EACCES, , ) ->
lprintf_nl "can not create files in directory %s, check rights..." dirname;
exit 73
+ | Unix.Unix_error (Unix.ENOSPC,_,_) ->
+ lprintf_nl "Directorio %s lleno..." dirname;
| Unix.Unix_error (Unix.ENOENT, , ) ->
safe_mkdir dirname;

Jesús Cea <jcea>


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 spiralvoice (Updated the item)
  • -email is unavailable- added by ygrek (Posted a comment)
  • -email is unavailable- added by jcea (Submitted the item)
  • -email is unavailable- added by jcea
  • -email is unavailable- added by jcea

    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.




    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-07 spiralvoice StatusWorks For Me => Done
        Open/ClosedOpen => Closed
        SummaryDisk full and MLDonkey dying => Fix handling of full disc
    2013-07-07 spiralvoice StatusNone => Works For Me
    2013-04-10 ygrek Assigned toNone => spiralvoice
    2013-02-20 jcea Carbon-Copy- => Added jcea
        Carbon-Copy- => Added ygrek

    Back to the top

    Powered by Savane 3.3