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: Out of memory crashes after Ubuntu Kernel update  (Read 9676 times)

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3830
  • Engines screaming
Out of memory crashes after Ubuntu Kernel update
« on: January 08, 2011, 06:22:55 PM »

We are getting lots of out of memory crashes since a recent Kernel update, mostly in Ubuntu 10.10 Maverick. I'd like to join the facts in this thread since they are scattered across several threads in 3 boards (don't get me started on our forum structure...  ::)). First post will be updated with new facts.

- Same with 2.2.6 and SVN
- Problem occurs since 2.6.35-23.41, 2.6.35-22 worked (here here)
- There's also a report for Fedora 12 2.6.32.23-170.fc12.x86_64
- Problem is related to high traffic (here)
- Kad is not involved
- interesting info here
- not related to 32/64 bit (below)
- related to download limit! Setting download to max works around the problem. (Maybe explains why not more people complain.  ;) )

This patch fixes the problem. It has to be applied to wxWidgets, not to aMule! If you have the problem please try and post your results here.

Better: Use wxWidgets 2.8.12 which ships with Kry's patch.
« Last Edit: March 30, 2011, 09:33:07 PM by Stu Redman »
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

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3830
  • Engines screaming
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #1 on: January 08, 2011, 06:26:43 PM »

Here is a patch (for current SVN) for you to try. It simply adds a log entry to the upload thread with sizes of various queues and the total number of sockets. Let's see if something hits the roof here when an oom crash occurs.

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

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3830
  • Engines screaming
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #2 on: January 10, 2011, 09:49:06 PM »

Anybody getting the crash in a 32 bit system ?

Please run aMule with gdb and check if it it crashes before wasting all the memory or after.
« Last Edit: January 10, 2011, 09:52:30 PM by Stu Redman »
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

Olhado

  • Newbie
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 26
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #3 on: January 11, 2011, 10:04:43 PM »

I can't run any more tests right now, but I'm 100% sure that turning off the download speed limit resolves the problem. My aMule has been running all day with no crashes  :)

BTW, I'm on a 32 bit system.
Logged

Olhado

  • Newbie
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 26
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #4 on: January 21, 2011, 01:00:54 AM »

I've compiled the latest SVN with the patch you provided and it seems that something did hit the roof. Here's the last minute before my system became unresponsive and I had to do a hard reset:

Code: [Select]
2011-01-21 00:46:02: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 43
 2011-01-21 00:46:04: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 44
 2011-01-21 00:46:07: UBT: t 1 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 45
 2011-01-21 00:46:09: UBT: t 1 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 45
 2011-01-21 00:46:12: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 45
 2011-01-21 00:46:14: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 47
 2011-01-21 00:46:17: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 47
 2011-01-21 00:46:19: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 48
 2011-01-21 00:46:22: UBT: t 1 CQ 4 CQF 0 TCQ 1 TCQF 0 SO 6 EMS 48
 2011-01-21 00:46:24: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 48
 2011-01-21 00:46:27: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 47
 2011-01-21 00:46:29: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 49
 2011-01-21 00:46:32: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 50
 2011-01-21 00:46:34: UBT: t 1 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 49
 2011-01-21 00:46:37: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 47
 2011-01-21 00:46:39: UBT: t 1 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 46
 2011-01-21 00:46:42: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 49
 2011-01-21 00:46:44: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 46
 2011-01-21 00:46:47: UBT: t 1 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 45
 2011-01-21 00:46:49: UBT: t 1 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 45
 2011-01-21 00:46:52: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 45
 2011-01-21 00:46:54: UBT: t 1 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 47
 2011-01-21 00:46:57: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 45
 2011-01-21 00:46:59: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 45
 2011-01-21 00:47:02: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 6 EMS 48
 2011-01-21 00:47:04: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 31 SO 6 EMS 47
 2011-01-21 00:47:06: UBT: t 2 CQ 0 CQF 0 TCQ 0 TCQF 130 SO 6 EMS 48
 2011-01-21 00:47:09: UBT: t 6 CQ 0 CQF 0 TCQ 0 TCQF 225 SO 6 EMS 51
 2011-01-21 00:47:11: UBT: t 6 CQ 0 CQF 0 TCQ 0 TCQF 315 SO 6 EMS 51
 2011-01-21 00:47:14: UBT: t 9 CQ 0 CQF 0 TCQ 0 TCQF 409 SO 6 EMS 52
 2011-01-21 00:47:16: UBT: t 9 CQ 0 CQF 0 TCQ 0 TCQF 504 SO 6 EMS 52
 2011-01-21 00:47:19: UBT: t 16 CQ 0 CQF 0 TCQ 0 TCQF 604 SO 6 EMS 52
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #5 on: January 21, 2011, 02:01:38 AM »

Olhado, try disabling the download limit (set it to 0) and see if the crash persists.

By the way we should merge all threads about this problem and maybe post a sticky/known bug disclaimer?
Logged

Olhado

  • Newbie
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 26
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #6 on: January 21, 2011, 10:23:16 AM »

Olhado, try disabling the download limit (set it to 0) and see if the crash persists.

I've already tried that. The problem disappears completely after I disable the download limit.
Logged

Olhado

  • Newbie
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 26
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #7 on: February 02, 2011, 08:48:31 PM »

The Ubuntu kernel has been updated to version -25 a few days ago and I can't reproduce the crash anymore. The download limit is set, there are big and popular files in the queue, but aMule keeps running. Can anyone else confirm this?
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #8 on: February 02, 2011, 11:20:50 PM »

Well indeed IMO there are several changes will could fix this bug.

I'm putting my mule under load again and I'll see what happens.
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #9 on: February 02, 2011, 11:24:36 PM »

Well, as soon as I hit the Post button amule went OOM again. :( So it is reproducible for me:

Code: [Select]
Linux crysis 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux

Olhado, add a lot of files and set the download limit to something like 8Kb/s and let me know if you can reproduce it.
Logged

Olhado

  • Newbie
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 26
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #10 on: February 05, 2011, 12:20:41 PM »

Well, I ran into the crash even without changing any settings, so yes, it's still there, but it seems to have gotten less frequent - my aMule has been running for three days (not continuously) before it finally crashed.

I can run aMule with gdb and do some more testing but someone would have to tell me what to do (at least roughly) since I've never done this before.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3830
  • Engines screaming
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #11 on: February 05, 2011, 12:30:49 PM »

The next thing to try now is Kry's wx patch.
Btkaos, did you try it?
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

Olhado

  • Newbie
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 26
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #12 on: February 05, 2011, 01:23:17 PM »

I'll try it as soon as I can.

In the meantime, here's another log - this time I let aMule crash completely:
Code: [Select]
2011-02-05 13:06:42: UBT: t 1 CQ 0 CQF 0 TCQ 1 TCQF 0 SO 8 EMS 71
 2011-02-05 13:06:46: UBT: t 1 CQ 2 CQF 2 TCQ 0 TCQF 0 SO 8 EMS 74
 2011-02-05 13:06:51: UBT: t 1 CQ 0 CQF 0 TCQ 2 TCQF 0 SO 8 EMS 71
 2011-02-05 13:06:56: UBT: t 0 CQ 0 CQF 0 TCQ 2 TCQF 0 SO 8 EMS 70
 2011-02-05 13:07:01: UBT: t 0 CQ 0 CQF 0 TCQ 2 TCQF 0 SO 8 EMS 70
 2011-02-05 13:07:06: UBT: t 0 CQ 0 CQF 0 TCQ 1 TCQF 0 SO 8 EMS 67
 2011-02-05 13:07:11: UBT: t 0 CQ 0 CQF 0 TCQ 1 TCQF 0 SO 8 EMS 63
 2011-02-05 13:07:17: UBT: t 0 CQ 0 CQF 0 TCQ 1 TCQF 0 SO 8 EMS 65
 2011-02-05 13:07:22: UBT: t 0 CQ 1 CQF 0 TCQ 0 TCQF 0 SO 8 EMS 66
 2011-02-05 13:07:27: UBT: t 1 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 8 EMS 61
 2011-02-05 13:07:31: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 0 SO 8 EMS 53
 2011-02-05 13:07:36: UBT: t 0 CQ 1 CQF 0 TCQ 0 TCQF 0 SO 8 EMS 51
 2011-02-05 13:07:42: UBT: t 0 CQ 0 CQF 0 TCQ 0 TCQF 33 SO 8 EMS 50
 2011-02-05 13:07:47: UBT: t 2 CQ 0 CQF 0 TCQ 0 TCQF 126 SO 9 EMS 49
 2011-02-05 13:07:52: UBT: t 2 CQ 0 CQF 0 TCQ 0 TCQF 218 SO 9 EMS 50
 2011-02-05 13:07:57: UBT: t 7 CQ 0 CQF 0 TCQ 0 TCQF 300 SO 9 EMS 52
 2011-02-05 13:08:03: UBT: t 8 CQ 0 CQF 0 TCQ 1 TCQF 394 SO 9 EMS 54
 2011-02-05 13:08:08: UBT: t 7 CQ 0 CQF 0 TCQ 0 TCQF 492 SO 9 EMS 53
 2011-02-05 13:08:13: UBT: t 15 CQ 0 CQF 0 TCQ 0 TCQF 580 SO 9 EMS 57
 2011-02-05 13:08:18: UBT: t 15 CQ 0 CQF 0 TCQ 0 TCQF 674 SO 9 EMS 60
 2011-02-05 13:08:24: UBT: t 21 CQ 0 CQF 0 TCQ 0 TCQF 774 SO 9 EMS 66
 2011-02-05 13:08:29: UBT: t 22 CQ 0 CQF 0 TCQ 0 TCQF 887 SO 9 EMS 70
 2011-02-05 13:08:35: UBT: t 27 CQ 0 CQF 0 TCQ 1 TCQF 992 SO 8 EMS 75
 2011-02-05 13:08:40: UBT: t 32 CQ 0 CQF 0 TCQ 0 TCQF 1101 SO 8 EMS 80
 2011-02-05 13:08:45: UBT: t 31 CQ 0 CQF 0 TCQ 1 TCQF 1216 SO 8 EMS 84
 2011-02-05 13:08:50: UBT: t 41 CQ 0 CQF 0 TCQ 0 TCQF 1310 SO 8 EMS 86
 2011-02-05 13:08:56: UBT: t 38 CQ 2 CQF 0 TCQ 3 TCQF 1425 SO 8 EMS 94
 2011-02-05 13:09:01: UBT: t 30 CQ 0 CQF 0 TCQ 5 TCQF 1524 SO 8 EMS 96
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #13 on: February 14, 2011, 01:29:08 PM »

Kry lastest patch solves the issue and after a closer look it completely makes sense, maybe you'd like to edit the sticky topic STU?
Logged

vitke

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
Re: Out of memory crashes after Ubuntu Kernel update
« Reply #14 on: March 05, 2011, 10:04:01 PM »

After passing the Cerberus at the registration in the 8th attempt, please allow me to offer my extreme solution: I use aMule for some years already, and this bug or a bug like this was around for something like years too. I really can't live without aMule, but when it crashes every two hours it's of little use. So I tried to see what was the problem with valgrind, but it reported something of an order of a million errors, so I really couldn't find my way there. Finally I wrote a simple script that enabled me to use aMule again:

Code: [Select]
#!/bin/bash

MAXPERC=20

while true ;
do
   PERC=$(ps -C amule -o %mem=)
   echo amule is using $PERC% of the physical memory. We kill it at $MAXPERC%.
   #if [[ $PERC > 20 ]]
   if [[ $(echo "r=0;if($PERC>$MAXPERC)r=1;r" | bc) == 1 ]]
   then
      killall -KILL amule
      sleep 10
      echo amule --display :0 | at now
   fi ;
   sleep 5
done

So I check if aMule takes more than 20% of the total physical memory once in five seconds, and if it does, I kill it, wait 10 seconds, and then start it again.

I know, it's terrible... But I can start many downloads, use the bandwidth fully, go to sleep, and the next day aMule is still downloading.
Logged
Pages: [1] 2