aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: aMule (various versions tested) crashes when downloading a "large" file  (Read 15488 times)

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75

Hello to everyone and, first of all, thank you for your great work! I've cross-compiled aMule to use it on a BCM6348 (mips) based router. The cross-compilation stage was quite straightforward and I hadn't found any particular issue. I have to add that, despite of the hw limitations (as said, I use it on a router), aMule is rock solid, even for prolonged use (I execute the aMule daemon on the router and control it on every client by aMuleGUI).
I have only a problem which cause I haven't still been able to find despite of my many attempts: when I try to download a file which size is above 1Gb (I don't know if this is the exact limit but I can say that I've flawlessy downloaded a file worth 930Mb while I haven't succeeded in downloading one 1,3Gb worth), the part file could be completely allocated and it even manages to download some megabytes of it but after a while (always under the 100Mb barrier) aMule crashes.
It's important to point out that, when it starts crashing when downloading that file and even if I start amuled again, as soon as it starts downloading the "big" file, it crashes again and again after having downloaded only a few kbytes of the file while, if I stop those downloads, it works flawlessy as always.
Just to be clear: I've compiled aMule 2.2.2, aMule SVN-20081004, aMule 2.2.3 and the latest SVN (9536) but, no matter what version I use, aMule still crashes if it starts downloading those files. I'm rather confident that this isn't an aMule bug but something else...
Here are the dependencies I've used:

bison 2.4  (on the aMule wiki it's shown as a required dependency though, if I remember well, I've compiled the older versions without it with no problems at all)
libiconv 1.12
cryptopp 5.5.2                       
gettext 0.16.1
glib 2.18.0 (to succesfully compile it, I had to set these environment variables: ac_cv_func_nonposix_getpwuid_r=no; ac_cv_func_posix_getpwuid_r=yes; ac_cv_func_posix_getgrgid_r=yes; glib_cv_uscore=no; glib_cv_stack_grows=yes)
wxGTK 2.8.10
zlib 1.2.3

Obviously, apart from the fact that the 1Gb barrier doesn't define a large file, when a switch to enable large file support was available in the various configure scripts, I had used it. My toolchain might be ok cause I've cross compiled a lot of stuff ( just a couple of examples: tar, wget, mediatomb, esniper...) for my router and everything works fine (as said, even aMule is rock solid apart from this annoying issue). I hope that someone here would like to give me a suggestion. Thanks to everyone and have a good day! :)
« Last Edit: March 26, 2009, 03:51:14 PM by GuybrushThreepwood »
Logged

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: aMule (various versions tested) crashes when downloading a big file
« Reply #1 on: March 25, 2009, 10:05:04 AM »

Hello again! :) I've posted the description of the issue that I'm experiencing here in the compilation problems board because I'm rather confident that the problem resides there but, if someone among the moderators thinks that it's better to post it elsewhere, just move the thread to the appropriate place so that it could be more visible. Thanks! :)
Logged

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: aMule (various versions tested) crashes when downloading a big file
« Reply #2 on: March 26, 2009, 03:50:24 PM »

According to the fact that no one has still replied, I'm starting to fear that I've choosen the wrong board. As I don't like to open the same thread on more boards at the same time, I would be grateful to someone among the moderators if  he/she would like to move this thread in a more appropriate place. Thank you very much! :)
« Last Edit: March 26, 2009, 03:52:26 PM by GuybrushThreepwood »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292

Hi,

It seems Freddy77 found the problem:
Last fix was due to a problem in uClibc setrlimit which limited file size to 1GB so any access beyond this limit caused a SIGXFSZ. I removed UnlimitResource(RLIMIT_FSIZE) calls in amule.cpp and is working.
Logged

freddy77

  • Developer
  • Full Member
  • *****
  • Karma: 20
  • Offline Offline
  • Posts: 113

Well, I have to say I found the patch in another site but I though that recent uClib don't have this problem... The simple solution is to remove the line

UnlimitResource(RLIMIT_FSIZE);

in function SetResourceLimits from src/amule.cpp (or just comment it).

A better solution would be to use syscall setrlimit64 if uClib and linux is detected.

I think a

#if !defined(__UCLIBC__)  || !defined(__linux__)
     UnlimitResource(RLIMIT_FSIZE);
#endif

would be a safe start.
Logged

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75

Hi and, first of all, thank you very much for your replies and excuse me for the late reply but I've been very busy in the last days. I didn't know that it was a rather common issue... The size limit was exactly the one that I had guessed! ;) I've found this patch too:

http://trac.nslu2-linux.org/optware/browser/trunk/sources/amule/amule-1gb-uclibc-mipsel.patch?rev=5903

and tried to apply it instead of commenting the call to UnlimitResources: I haven't still found some spare time to test the newly compiled SVN9540 but I would keep you updated. Thanks again! :)
« Last Edit: March 30, 2009, 10:46:22 PM by GuybrushThreepwood »
Logged

freddy77

  • Developer
  • Full Member
  • *****
  • Karma: 20
  • Offline Offline
  • Posts: 113

I haven't still found some spare time to test the newly compiled SVN9540 but I would keep you updated. Thanks again! :)

I have a mips router too and I can confirm it works :)
Logged

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75

Yes, it works perfectly. Commenting these two lines:

Code: [Select]
//      rl.rlim_cur = rl.rlim_max;
//      setrlimit(resType, &rl);

in src/amule.cpp was enough and everything works as expected now! ;) Just another couple of slightly OT questions: what does it means when, though there are updated informations in the logfile, they aren't showed by aMuleGUI (it keeps giving the "Loading" message, nothing more)? I remember that everything was fine with the older SVN versions... What can make the obfuscated connection attempt fail on all the servers? I can connect to them all only without obfuscation (according to the logfile; I don't know how to verify if this is true or false). The version that I'm currently using is SVN 9546. Thanks again! :)
« Last Edit: April 01, 2009, 11:15:22 PM by GuybrushThreepwood »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

Now that's something different. It simply kills ALL calls to UnlimitResource.
Please check if it works with unpatched 9546 (or later) as well.

Regarding SVN: we have two SVN branches available for download at the moment: "trunk" and "RELEASE-2_2_X" (which is a beta for the coming 2.2.4). Freddy77s Mips optimizations and the remote access to the log are both in trunk only, so you really should be using that.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75

Now that's something different. It simply kills ALL calls to UnlimitResource.
Please check if it works with unpatched 9546 (or later) as well.

Hi and thanks for your reply. :) The last SVN that I've compiled without patching amule.cpp was the 9536 and it didn't work. Has something related to that issue changed in the meantime? I know that I've done something different from what suggested by Freddy77: I tought that, rather than commenting the call to UnlimitResource, it was better to follow the other way but I don't know if I'm right or wrong. By the way, let me know if it's important to you and I would recompile SVN 9548 from the trunk branch without patching amule.cpp then let you know the results.

Regarding SVN: we have two SVN branches available for download at the moment: "trunk" and "RELEASE-2_2_X" (which is a beta for the coming 2.2.4). Freddy77s Mips optimizations and the remote access to the log are both in trunk only, so you really should be using that.

Yes, I've already guessed something like that. In fact, yesterday I've compiled the SVN 9548 from the trunk branch and the logfile visualization in aMuleGUI started to work again. Anyway, thanks for confirming this to me! :)  What about the problems with the obfuscation?
« Last Edit: April 04, 2009, 12:54:42 AM by GuybrushThreepwood »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule (various versions tested) crashes when downloading a "large" file
« Reply #10 on: April 05, 2009, 09:49:16 PM »

The last SVN that I've compiled without patching amule.cpp was the 9536 and it didn't work. Has something related to that issue changed in the meantime?
Well, it should work in trunk and NOT in 2.2.X, so if you compiled 9536 2.2.X it can't work.

Quote
What about the problems with the obfuscation?
Try getting a good server list.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: aMule (various versions tested) crashes when downloading a "large" file
« Reply #11 on: April 06, 2009, 11:40:25 PM »

Well, it should work in trunk and NOT in 2.2.X, so if you compiled 9536 2.2.X it can't work.

I'm quite sure that it was the trunk 9536 that didn't work...

Try getting a good server list.

Any suggestion? I used the gruk.org server list but it hasn't been updated for a long time and now I'm using the peerates one. By what I know, they should be the best ones, aren't they? Thanks again! :)
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule (various versions tested) crashes when downloading a "large" file
« Reply #12 on: April 09, 2009, 09:21:12 PM »

See here.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: aMule (various versions tested) crashes when downloading a "large" file
« Reply #13 on: April 10, 2009, 04:04:41 PM »

Thanks for the suggestion: it's a very well done guide. Unfortunately, apart from the fact that I already know those notions, as said I already use the peerates server list (I update it on a daily basis) and the bluetack ipfilter too. Even the options already are as suggested, everything seems to be fine but it continues to say that it can't establish obfuscated connections to neither of the servers in the serverlist.
« Last Edit: April 10, 2009, 04:07:09 PM by GuybrushThreepwood »
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: aMule (various versions tested) crashes when downloading a "large" file
« Reply #14 on: April 10, 2009, 06:17:43 PM »

It could very well be a cpu-specific bug, as much as I tried avoiding those.

Someone's gonna have to look into that... Or write a test unit for it.
Logged
Pages: [1] 2