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 Feb 20 00:41:56 2013  
Category: Bug fixesPriority: 7 - High
Status: DoneAssigned to: spiralvoice <spiralvoice>
Open/Closed: Closed

Sun Jul 7 10:54:02 2013, comment #2:

committed 2013/07/07

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

The patch looks like a correct thing to do.

ygrek <ygrek>
Project Member
Wed Feb 20 00:41:56 2013, 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
  • -unavailable- added by spiralvoice (Updated the item)
  • -unavailable- added by ygrek (Posted a comment)
  • -unavailable- added by jcea (Submitted the item)
  • -unavailable- added by jcea
  • -unavailable- added by jcea

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

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Jul 7 10:54:02 2013spiralvoiceStatusWorks For Me=>Done
      SummaryDisk full and MLDonkey dying=>Fix handling of full disc
    Sun Jul 7 09:49:19 2013spiralvoiceStatusNone=>Works For Me
    Wed Apr 10 08:06:26 2013ygrekAssigned toNone=>spiralvoice
    Wed Feb 20 00:41:56 2013jceaCarbon-Copy-=>Added jcea
      Carbon-Copy-=>Added ygrek

    Back to the top

    Powered by Savane 3.1-cleanup1