mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-users] [patch #7954] Disk full and MLDonkey dying


From: Jesús Cea
Subject: [Mldonkey-users] [patch #7954] Disk full and MLDonkey dying
Date: Wed, 20 Feb 2013 00:41:58 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0

URL:
  <http://savannah.nongnu.org/patch/?7954>

                 Summary: Disk full and MLDonkey dying
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: jcea
            Submitted on: Wed 20 Feb 2013 12:41:56 AM GMT
                Category: Bug fixes
                Priority: 7 - High
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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; 
"""




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7954>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]