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

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

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

committed 2013/07/07

spiralvoice <spiralvoice>
Group administrator
Wed 10 Apr 2013 08:06:26 AM UTC, comment #1: 

The patch looks like a correct thing to do.

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

MLDonkey dies if the harddisk is full. Details in <http://mldonkey.sourceforge.net/forums/viewtopic.php?p=32224#32224>

Briefly:

"""
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/unix2.ml.old ./src/utils/cdk/unix2.ml
--- ./src/utils/cdk/unix2.ml.old        2013-02-04 03:19:58.000000000 +0100
+++ ./src/utils/cdk/unix2.ml    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, , ) ->
       (try
         safe_mkdir dirname;
"""

Jesús Cea <jcea>

 

(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

 

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
  •  

    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 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.13-aa77.
    Corresponding source code