logo       

Re: On the logic of the file checking: msg#00039

network.bit-torrent.libtorrent

Subject: Re: On the logic of the file checking

On Apr 24, 2006, at 10:39, Echaozh Zhang wrote:
Hi everyone,

We've been so happy using libtorrent, having everything going smooth
and good, before we suddenly bumped into some strange problem.

Before we met the problem, we just download each file... then one day
the downloading is quite ok to us, so we try to seed the file. Seeding
is quite ok before we close the program and restart it. When we
restart the program with no resume data, the program crashes due to
the failure of an assertion.

// if we're not in compact mode, make sure the
// pieces are spread out and placed at their
// final position.
assert(!m_unallocated_slots.empty()); // Line 1401,
storage.cpp, version 0.9.1

We tracked the code and found that when the "do the full check part"
is about to end, it changes the state to allocating. Then the
check_files() function is again called, the assertion fails quite
reasonably: we have already downloaded the file, there is nothing
unallocated! It seems to me a flaw in the logic, though I still don't
quite follow it since I'm not really reading the compact mode code.
BTW, we're not using the compact mode.

I diff'ed the storage.cpp's of the two versions, 0.9.1 and 0.9.2, the
logic seems the same so we didn't try the newer version.

We'll be so grateful if anyone solves the myth for us,

Thanks for the report. I will try to reproduce this later today, and hopefully have a fix by tomorrow.

--
Arvid Norberg




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise