Alo Sarv
lead developer

Donate via

Latest Builds

version 0.3
tar.gz tar.bz2
Boost 1.33.1 Headers
MLDonkey Downloads Import Module Development
Payment completed
Development in progress.
Developer's Diary

Monday, February 28, 2005

Downloads completing working (almost) properly now ;)

Seems I fell asleep last night before I even got to blog post; sorry about that. To make up for that, here's a post of two-days-worth fixes and improvements.

I guess the most important improvement is that it's now possible to actually complete downloads successfully, w/o crashing or corrupting or anything else. I admit - completing stuff is still somewhat flacky - it generally shouldn't crash anymore. The problem, however, is, that when PartData is destroyed, the object is deleted before ed2k clients handle the events, so there's a LOT of calls being made into already-freed memory space, so basically, it still SHOULD crash. The problem is rather generic though, e.g. object posting EVT_DESTROY, and the owner handling it and deleting the object, while "watchers" or "users" cleaning up their stuff. I'm currently looking into possible solutions, one of which involves setting the object owner to receive the event as the last handler (boost::signals allows setting the order of handlers).

There were also a ton of bugs in chunks verification and final rehashes, all of which should be fixed now. Note that if you had any previous downloads, final rehashes may fail, but hydranode recovers from them smoothly and re-downloads corrupt chunks (the reason being that for a cpl days here, the chunk-hashes verification code wasn't operating at all, so data downloaded during that may have errors in it).

SharedFile is now also somewhat smarter. Namely, it will self-destruct if it detects that the physical file it pointed to disappeared. This check is only done when someone attempts to read from the file, so it comes w/o any additional performance overhead. Also, moving file from temp to incoming is also now done in WorkThread. There we have a small optimization still to make - namely, when temp and incoming are on same partition, the moving could be done in-place in main thread, since it's (nearly) instantanous.

I also updated MSVC compatibility, however, the compiler is again crashing, on four files in ed2k module. The symtoms seem somewhat similar to what we already know of from gcc 3.3.5 problems, however, there are still no definate solutions. Current recommendation is use gcc 3.4 (this includes darwin too, where 3.3.5 is default compiler apparently).

Not posting change-log tonight, it's way too long - just browse the CVS list archives if you'r interested in the gory details.

Madcat, ZzZz

PS: Had hydranode running all-nighters, and later some more 5-10h sessions w/o crashing. It's still dependant on the server it's connected to, and download speed slowly drops because mules drop us from queues since we don't do reasks, but in general, it seems relativly stable.

Update: Received additional information from MultiIndex library author regarding the compilers crashing problems, so we just might get the dead compilers back to life tomorrow (too tired to test it right now) :)

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?