MLDonkey Forum Index
Homepage •  Bugs •  Tasks •  Patches •  SF.net Project Page •  ChangeLog •  German forum •  Links •  Wiki •  Downloads
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Disk full and MLDonkey dying

 
Post new topic   Reply to topic    MLDonkey Forum Index -> Problems with MLDonkey Client (in general, and ed2k, kad, overnet)
View previous topic :: View next topic  
Author Message
jcea
neophyte


Joined: 19 Dec 2010
Posts: 6

PostPosted: Mon Dec 20, 2010 2:46 pm    Post subject: Disk full and MLDonkey dying Reply with quote

Hi all.

In my configuration I have "hdd_coredir_stop_core = false" and "hdd_temp_stop_core = false", but MLDonkey dies repeatly when the disk is full. I have two cases: (the disk full is the Temp/Incoming one)

1. When launching mldonkey with the disk full, the program stops inmediately with the following error in the log: "2010/12/19 23:08:11 write() : No space left on device for directory /home/amuled/disco/Incoming".

2. When during operation the Temp/Incoming disk become full, mldonkey starts printing warning every minute about it. After a while, it shutdowns. The log is something like this:

"""
2010/12/19 22:35:29 [cInt] WARNING: Directory /home/amuled/disco/Temp is full, MLDonkey queues all downloads
2010/12/19 22:36:29 [cInt] WARNING: Directory /home/amuled/disco/Temp is full, MLDonkey queues all downloads
2010/12/19 22:37:29 [cInt] WARNING: Directory /home/amuled/disco/Temp is full, MLDonkey queues all downloads
2010/12/19 22:38:30 [cInt] WARNING: Directory /home/amuled/disco/Temp is full, MLDonkey queues all downloads
2010/12/19 22:39:29 [cInt] WARNING: Directory /home/amuled/disco/Temp is full, MLDonkey queues all downloads
2010/12/19 22:40:12 write() : No space left on device for directory /home/amuled/disco/Incoming
2010/12/19 22:40:13 [cCO] Options correctly saved
2010/12/19 22:40:13 [cCO] Sources correctly saved
2010/12/19 22:40:13 [cCO] Tar: skipping bittorrent.ini, error Gzip.Error("error during compression")
2010/12/19 22:40:13 [cCO] Exception Failure("Tar: skipped bittorrent.ini due to backup errors") while options backup
2010/12/19 22:40:13 [cCO] Options backup as .tar.gz correctly saved
2010/12/19 22:40:13 [dMain] Core stopped
"""

I would like to mldonkey to be able to survive disk full conditions, and recovers gracefully when I free diskspace.

Any idea?.
Back to top
View user's profile Send private message
jcea
neophyte


Joined: 19 Dec 2010
Posts: 6

PostPosted: Mon Dec 20, 2010 2:49 pm    Post subject: Reply with quote

I found strange that in both cases the error is trying to write to "/home/amuled/disco/Incoming" (the disk is shared with Temp, and completelly full).

What is trying to store, if the downloads are queued? (the disk is full)

Does mldonkey survive Temp disk full, but not Incoming disk full?. The configuration option names would suggest it... Does it make sense?.
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 594

PostPosted: Wed Dec 22, 2010 10:01 pm    Post subject: Reply with quote

Looks like it can only happen when mldonkey rescans shared directory - it occasionly performs check whether incoming directory is writeable. Try running with higher verbosity (set verbosity 'verb share') and manually triggerring scan with reshare to confirm this. If it is indeed the cause - setting share_scan_interval to zero could qualify as a temporary workaround.
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
jcea
neophyte


Joined: 19 Dec 2010
Posts: 6

PostPosted: Sat Dec 25, 2010 1:15 am    Post subject: Reply with quote

Current status: Temp/Incoming partition full. mldonkey died.

I launch the daemon again, it shutdowns inmediately with:

"""
2010/12/25 02:08:15 [cO] Starting MLDonkey 3.0.6 ...
2010/12/25 02:08:15 [cO] Language EN, locale UTF-8, ulimit for open files 1024
2010/12/25 02:08:15 [cO] MLDonkey is working in /home/amuled/.mldonkey
2010/12/25 02:08:15 write() : No space left on device for directory /home/amuled/.mldonkey
"""

Nothing new in the logfile.

I edit "downloads.ini" and change ' verbosity = "verb share"'. I launch the client again and I get NO extra information, at all. Same error, same "non log".

I am making some free space now, and I will run the client with that verbose configuration. Let's see what happen when the free space is over again.

"""
Back to top
View user's profile Send private message
jcea
neophyte


Joined: 19 Dec 2010
Posts: 6

PostPosted: Mon Feb 04, 2013 1:50 am    Post subject: Reply with quote

Two years after, mldonkey 3.1.3.

I still have this is issue when disk is full.

Running mldonkey under "strace", I see this:

"""
open("/home/amuled/disco/Incoming/tmp_alcbtks_mld.tmp", O_WRONLY|O_CREAT, 0600) = 5
write(5, "mldonkey accesstest - this file "..., 47) = -1 ENOSPC (No space left on device)
close(5) = 0
unlink("/home/amuled/disco/Incoming/tmp_alcbtks_mld.tmp") = 0
"""

Then, mldonkey log the write failure and dies.

In my "download.ini" I have:

"""
(* Mininum free space in MB on temp_directory, minimum 50 *)
hdd_temp_minfree = 50

(* If true core shuts down when free space on temp dir is below hdd_temp_minfree,
otherwise all downloads are paused and a warning email is sent. *)
hdd_temp_stop_core = false

(* Mininum free space in MB on core directory, minimum 20 *)
hdd_coredir_minfree = 50

(* If true core shuts down when free space on core dir is below hdd_coredir_minfree,
otherwise all downloads are paused and a warning email is sent. *)
hdd_coredir_stop_core = false
"""

So mldonkey should stop downloading with free space is <50MB, but instead of it, it exhaust free space on disk and then dies.
Back to top
View user's profile Send private message
jcea
neophyte


Joined: 19 Dec 2010
Posts: 6

PostPosted: Wed Feb 20, 2013 12:36 am    Post subject: Reply with quote

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:

Code:

$ 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;
Back to top
View user's profile Send private message
mstm
neophyte


Joined: 11 Nov 2012
Posts: 38

PostPosted: Wed Feb 20, 2013 9:46 am    Post subject: Reply with quote

Thanks jcea Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MLDonkey Forum Index -> Problems with MLDonkey Client (in general, and ed2k, kad, overnet) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Sourceforge.net Logo