# mldonkey downloads stuck at 100%

## Fourbissime

Hi.

Everything is in the title. A part of my downloads are stuck at 100% and don't commit. Did it happen to anyone here ?

```
--Buildinfo--

Version:    MLNet Multi-Network p2p client version 2.7.5

Networks:    Global Shares  Gnutella  G2  Fasttrack  FileTP  BitTorrent  Donkey (SUI)

Ocaml version:    3.08.3 - C compiler version: 3.4.6 - C++ compiler version: 3.4.6

Build on:    Linux i686 2.6.16-gentoo-r7 (little endian) with glibc 2.3.6

Configure args:    --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --sysconfdir=/etc/mldonkey --sharedstatedir=/var/mldonkey --localstatedir=/var/mldonkey --enable-checks --enable-pthread --disable-batch --disable-gd --disable-gui --build=i686-pc-linux-gnu

Features:    threads zlib-1.2.3 bzip2-1.0.3 no-gd iconv check-bounds

```

I found this bug report, saying it is due to a bad behaviour in the hash algorithm. Anyone tried this patch ? Or is it already in 2.7.5 ebuild ?

----------

## Fourbissime

*bump*

no one ?

----------

## gentoonewb39

I have no idea about an actual solution for your problem but if it is an mldonkey bug try to emerge the untested version by running this command

```
echo net-p2p/mldonkey >> /etc/portage/package.keywords && emerge mldonkey
```

----------

## Fourbissime

I am already running the latest version available in portage : 2.7.5

The patch has been posted on may the 31th, 2006. I guess this is still to young to appear in any releases yet ...

----------

## spiralvoice

Do you still have the problems with 2.7.7?

----------

## spiralvoice

*bump*

----------

## spiralvoice

ping  :Wink: 

----------

## dmvianna

I have the same problem. I've just updated mldonkey from 2.6.4-r2 to 2.7.7 . The files that are stuck at 100% appeared while using the 2.6.4-r2 version.

----------

## spiralvoice

In the meantime I had an IRC conversation with a user which also had that problem.

It turned out that he downloaded a fake file. He wanted a 700MB holiday movie,

but the file was really something different, a 3GB Wikipedia ISO image, he downloaded

the first 700MB of it, got 100% of these 700MB, and the file was stuck...

Please open HTML interface, click in the stuck file and open the Toth File History

link and check if its the file you are downloading.

Next write down the EDK link of that file, like

ed2k://|file|this_is_the_file_name|12345678|CCCCCCCCCCCCCCCCCCCCCCCCCCCCC|/

12345678 is the filesize, CCCCCCCCCCCCCCCCCCCCCCCC the hash.

Close MLDonkey and search for the hash value in files.ini, you will find a

it twice, once near the top looking like

 *Quote:*   

>   {     file_size = 12345678
> 
>      file_name = "./shares/temp/urn_ed2k_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
> 
>      file_bitmap = 330131113010
> ...

 

and then later a bigger area

 *Quote:*   

> file_swarmer = "./shares/temp/urn_ed2k_CCCCCCCCCCCCCCCCCCCCCCCCCCCC"
> 
> ...
> 
>      file_chunks = 330131113010
> ...

 

file_md4s are the chunk hashes, do you have data in there?

How does file_chunks look like?

If file_md4s is empty you are downloading a fake file, you started a download

with hash CCCCCCCCCCCCCCCCCCCCCC and size 12345678 while the real

file with hash CCCCCCCCCCCCCCCCCCCCCC has a different filesize, MLDonkey

ignores chunk hashes if the filesize does not match, it does however start to

download data without chunk hashes available, which should be improved.

----------

## spiralvoice

MLDonkey 2.6.5 was updated to gather sources from sources by asking

for edk_hash+filesize, 2.6.4 only asked for edk_hash.

Thats the reason you received sources for this (maybe) fake file.

Do all files you have get stuck at 100% or only particular files?

----------

## dmvianna

Only particular ones. 

[EDIT] The toth file history always gives me the wrong file. So how is it again, am I downloading the wrong stuff?

[EDIT 2] Some of the file that are not fully downloaded yet have tot histories pointing to wrong files. Some are OK.

----------

## spiralvoice

 *dmvianna wrote:*   

> Only particular ones.

 

So MLDonkey is able to finish files on your system? This rules out wrong permissions and similar errors. 

 *dmvianna wrote:*   

> [EDIT] The toth file history always gives me the wrong file. So how is it again, am I downloading the wrong stuff?

 

Yes, you are downloading wrong stuff, these files will never finish, you can cancel them.

 *dmvianna wrote:*   

> [EDIT 2] Some of the file that are not fully downloaded yet have tot histories pointing to wrong files. Some are OK.

 

Cancel the wrong files.

After canceling the wrong files, do you still have files at 100%?

If yes, please analyse files.ini like I have written above for these files.

----------

## dmvianna

No 100% files left. But is the current mldonkey release still vulnerable to that kind of thing?

----------

## spiralvoice

 *dmvianna wrote:*   

> But is the current mldonkey release still vulnerable to that kind of thing?

 

No, see my comment above:

 *spiralvoice wrote:*   

> MLDonkey 2.6.5 was updated to gather sources from sources by asking
> 
> for edk_hash+filesize, 2.6.4 only asked for edk_hash.
> 
> Thats the reason you received sources for this (maybe) fake file. 

 

I do not understand why 2.6.4 is still the only stable version in portage.

The patch mentioned above was committed to MLDonkey CVS on 2005/09/17...

2.7.7 should be made stable asap, bug reports already exists:

https://bugs.gentoo.org/show_bug.cgi?id=138373

This new version will not prevent starting such fakes downloads but

it will not get sources for these files anymore from servers, so

it avoids downloading them, they will stay at 0%.

----------

