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 authentification 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 fixesPriority: 7 - High
Status: DoneAssigned 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 <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>

 

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 07 Jul 2013 10:54:02 AM UTCspiralvoiceStatusWorks For Me=>Done
      Open/ClosedOpen=>Closed
      SummaryDisk full and MLDonkey dying=>Fix handling of full disc
    Sun 07 Jul 2013 09:49:19 AM UTCspiralvoiceStatusNone=>Works For Me
    Wed 10 Apr 2013 08:06:26 AM UTCygrekAssigned toNone=>spiralvoice
    Wed 20 Feb 2013 12:41:56 AM UTCjceaCarbon-Copy-=>Added jcea
      Carbon-Copy-=>Added ygrek

    Back to the top


    Powered by Savane 3.1-cleanup