aMule Bug Tracker - aMule
View Issue Details
0001743aMuleUtilitiespublic2015-01-07 01:462016-04-17 04:00
morph 
GonoszTopi 
normalminoralways
resolvedfixed 
LinuxDebiansid
SVN 
2.3.22.3.2 
10920
Any
0001743: crash when importing part files
Hello,
in Debian was reported this bug: http://bugs.debian.org/774637 [^]

```
I recently tried to import a part file through the aMule import option. After
choosing the proper folder (which holds the *.part, *.part.met, *.part.met.bak
files only) I am queried for whether aMule should delete the original files
after import. Regardless of whether I answer 'Yes' or 'No', aMule crashes
immediately after that. The original files are never removed and the 'imported'
file gets added the the download list, but the parts already downloaded are not
recognised (the download starts from 0%). I include a backtrace generated by
the crash.

I also remembered that I used the import function a couple of months ago
without any problems on aMule 2.3.1-11. I installed that version from Debian
snapshot repository and tried it but the behaviour was the same, so the problem
probably lies in one of the libraries mentioned in the backtrace and not in
aMule itself. I also tried to downgrade those libraries, but I failed probably
due to other dependencies.
```

so it happens both with 2.3.1 and with git snapshot at commitid=1a369e47 .

Attached is the gdb session of the crash.

Regards,
Sandro
enable "Preallocate disk space for new files"
try to import a partfile
There is also a race condition in the partfile name creation process...
No tags attached.
? amule_bts774637.gdb (17,186) 2015-01-07 01:46
https://bugs.amule.org/file_download.php?file_id=363&type=bug
Issue History
2015-01-07 01:46morphNew Issue
2015-01-07 01:46morphFile Added: amule_bts774637.gdb
2015-01-19 22:47GonoszTopiNote Added: 0003648
2015-01-19 22:47GonoszTopiAssigned To => GonoszTopi
2015-01-19 22:47GonoszTopiReproducibilitysometimes => always
2015-01-19 22:47GonoszTopiStatusnew => confirmed
2015-01-19 22:47GonoszTopiTarget Version => 2.3.2
2015-01-19 22:47GonoszTopiSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4#r4
2015-01-19 22:47GonoszTopiAdditional Information Updatedbug_revision_view_page.php?rev_id=6#r6
2016-04-17 04:00GonoszTopiFixed in Revision => 10920
2016-04-17 04:00GonoszTopiNote Added: 0003688
2016-04-17 04:00GonoszTopiStatusconfirmed => resolved
2016-04-17 04:00GonoszTopiResolutionopen => fixed
2016-04-17 04:00GonoszTopiFixed in Version => 2.3.2

Notes
(0003648)
GonoszTopi   
2015-01-19 22:47   
Importing fails (crashes) if the "Preallocate disk space for new files" option is enabled in the preferences. I'm working on a fix that takes into consideration the value of the above preference setting.

As a workaround until it's fixed, importing is possible by temporarily disabling disk space preallocation.
(0003688)
GonoszTopi   
2016-04-17 04:00   
The current approach won't take into account the "Preallocate disk space for new files" setting for imported partfiles. See the commit note on https://github.com/amule-project/amule/commit/393acf5ce78dfdabd7316c44a78511db1c7bae74 [^]