aMule Forum

English => en_Bugs => Topic started by: mauric on March 15, 2005, 08:50:56 AM

Title: CPU & Memory problem on !?
Post by: mauric on March 15, 2005, 08:50:56 AM
Hello everyone,

on me Blade Solaris 9 machine the following error appear,
if i run amule "CVS version" i become a memory hole.

i have reserved 2 Gb of swap space
but after 3-4 hours i dont have any swap space left :-/

the CPU usage run on 100% without stop !!
and if i close amule i see with mucht time
that the free space (swap) goes back.
and the cpu usage calm it.

in me Download i have only two files inside,
have you the same problems ??

best regards
Mauric
Title: Re: CPU & Memory problem on !?
Post by: lfroen on March 15, 2005, 01:37:13 PM
Quote
Blade Solaris 9 machine

What is it ? SPARC ?
Unfortunatly no member of dev team have such machine. So, you welcomed to help us to debug this problem. For instance you can post gdb backtrace from 100% cpu point. running truss can be a good idea. AFAIK all memory debugging tools for sparc are not-quite-free, but may be you have another ideas :)
Title: Re: CPU & Memory problem on !?
Post by: skolnick on March 15, 2005, 03:28:02 PM
But it's strange, I have amule running on solaris 10 (x86) and have no problems. Memory starts filling if I use CVS from March 10, but using CVS from March 6 it worked perfectly for 5 continuous days. Try using it to see if the problem is amule's or is SPARC's (which it would seem strange for me)

BTW: which wx version? compiled with GTK1 or 2? unicode support?

Regards.
Title: Re: CPU & Memory problem on !?
Post by: Xaignar on March 15, 2005, 04:46:21 PM
Could you try to narrow it down to a single day? I'm taking a look at commits between the 6th and the 10th.
Title: Re: CPU & Memory problem on !?
Post by: skolnick on March 15, 2005, 05:27:06 PM
narrowing it down is a long process, since the memory starts filling after about 24 hours, so that's the minimum time I should run amule to know if it's good or not.

Regards.
Title: Re: CPU & Memory problem on !?
Post by: mauric on March 16, 2005, 11:31:10 AM
Hello and thanks for any feedbacks,
sorry for me late answer, yes i want help

sklonick write > = "but using CVS from March 6"
i have yesterday comiled on me sun balde 100 machine
and every time after start amule no connection´s has made
i have updatet the server.met but without success.

after one hours i have download the newest
"aMule-CVS-20050315.tar.bz2 2.0 MB" compiled and started
and this version working without any problems from yesterday evening 24:00 o´clock
i hope that it runs correctly now.

from the first 6 hours i have see
cpu  = 80 - 100% (jumping up and down),
swap =   1Gb     (lastin)

its possible this programm need so mucht CPU Speed ?!


best regards
Mauric

PS: here nice small pic from a blade 100 machine :-o
Title: Re: CPU & Memory problem on !?
Post by: lfroen on March 16, 2005, 01:45:51 PM
skolnik: this is sparc machine, and afaik a pretty slow one (personal experience). So, you can't directly compare it with x86. It is quit e possible that we still have some alighnment problem
Title: Re: CPU & Memory problem on !?
Post by: skolnick on March 17, 2005, 02:31:03 AM
lfroen: Thanks for the info. I've never had a SPARC machine myself, and only ones I've ever seen look like big purple refrigerators, so I had no idea this was a slow one. But anyway, the OP says about 1GB used in swap, which si too much for any machine, no matter how slow it is...

Regards.
Title: Re: CPU & Memory problem on !?
Post by: lfroen on March 17, 2005, 04:59:01 AM
Quote
But anyway, the OP says about 1GB used in swap, which si too much for any machine, no matter how slow it is...

No doubt :) But unfortunatly you can't debug on another CPU architecture.
Title: Re: CPU & Memory problem on !?
Post by: Xaignar on March 17, 2005, 05:01:22 AM
lfroen, how would alignment problems cause increase memory usage? I thought it was simply some limitations as to how you could access memory. =/
Title: Re: CPU & Memory problem on !?
Post by: lfroen on March 17, 2005, 01:39:19 PM
Xaignar: there's a rule in logic verification "mind the difference". You have several test cases here:
1. x86 with Linux and Solaris - OK
2. PowerPC with MacOS (big endian) - OK
3. x86-64 - OK
4.SPARC with Solaris - BAD

So, what's the difference here ? It's not an endiness (mac case), it's not an OS (solaris case). What different in SPARC from other test case ? It's alignment. It also can be bugs in Solaris (or sunos) implementation on SPARC, but I would not bet on it.
Title: Re: CPU & Memory problem on !?
Post by: Xaignar on March 17, 2005, 04:16:43 PM
Well, the fact that the problem is new (from between the 6th and the 10th) suggests that it is a problem on our side. However, the fact that we don't crash would suggest that it isn't unaligned access. At least as far as I can see.
Title: Re: CPU & Memory problem on !?
Post by: Kry on March 17, 2005, 04:57:32 PM
I agree with Xaignar.
Title: Re: CPU & Memory problem on !?
Post by: Xaignar on March 17, 2005, 05:05:42 PM
BTW, the only commit in the timespan 6th-10th that explicitly mentions either solaris or sparc is this:

Quote
Log Message:
-----------
Solaris is ok now. Needed for inet_addr on webserver

Modified Files:
--------------
    amule-dev-cvs:
        configure.in

Revision Data
-------------
Index: configure.in
===================================================================
RCS file: /opt/cvs/amule-dev-cvs/configure.in,v
retrieving revision 1.99
retrieving revision 1.100
diff -Lconfigure.in -Lconfigure.in -u -b -i -w -r1.99 -r1.100
--- configure.in
+++ configure.in
@@ -42,7 +42,7 @@
        ])
        ;;
 solaris*)
-       RESOLV_LIB="-lresolv"
+       RESOLV_LIB="-lresolv -lnsl"
 esac
 
 AC_SUBST(RESOLV_LIB)

To me that looks a little suspect, since the fix seems to be only for the webserver, but the new library is linked against both webserver _and_ amule itself. Anyone?
Title: Re: CPU & Memory problem on !?
Post by: skolnick on March 18, 2005, 05:16:01 AM
I think the problem is not the -lnsl, since I could compile the amule executable without it, and it would run fine (March 6) . -lnsl is only needed if I need to compile amuleweb. Also, I don't use amuleweb for now, and the memory leakage is there...

Regards.
Title: Re: CPU & Memory problem on !?
Post by: Xaignar on March 18, 2005, 06:59:46 AM
Quote
Originally posted by skolnick
I think the problem is not the -lnsl, since I could compile the amule executable without it, and it would run fine (March 6) . -lnsl is only needed if I need to compile amuleweb. Also, I don't use amuleweb for now, and the memory leakage is there...

Regards.
Well, that commit was added the 7th, after the last currently known working date, which is partly why I considered it. Also, as I said above, the other reason why I considered it suspect was that the commit has caused _both_ amule itself and amuleweb to be linked against that library though it is only amuleweb that actually required it.
Title: Re: CPU & Memory problem on !?
Post by: skolnick on March 18, 2005, 07:16:05 AM
OK, so if this is true, and the problem is the linking against -lnsl, then compiling CVS from March 6 *should* also produce memory leakage on amule right? well, I'm trying that right now, and keep you informed in this thread.

Regards.
Title: Re: CPU & Memory problem on !?
Post by: Xaignar on March 18, 2005, 07:37:12 AM
Sorry? Why would a change added the 7th have any effect on a snapshot from the 6th? You'd have to grab the one from the 7th which would contain those changes.
Title: Re: CPU & Memory problem on !?
Post by: skolnick on March 18, 2005, 05:07:07 PM
no,no,no, the commit made the 7th was only to link automatically against -lnsl, before that, -lnsl was still necessary, but had to be done manually, (LDFLAGS=-lnsl) that's why I think it might also trigger the failure, but I might be wrong.

Regards.
Title: Re: CPU & Memory problem on !?
Post by: Kry on March 18, 2005, 06:32:22 PM
It's not related to nls.
Title: Re: CPU & Memory problem on !?
Post by: Vollstrecker on March 18, 2005, 10:08:24 PM
Xaignar: If it was added at 7th, it is in the snapshot of 8th. The snaps are taken somewhere beetween 5 and 8 in the morning.
Title: Re: CPU & Memory problem on !?
Post by: Xaignar on March 18, 2005, 10:24:49 PM
I know.
I did however manually verify it before I specified that date in my previous post. The CVS commit mail was sent to me at 05:34 in the morning, apparently before the snapshot was made.
Title: Re: CPU & Memory problem on !?
Post by: skolnick on March 19, 2005, 10:15:01 PM
OK, so far, so good. I'm testing amule from March 10 (known to fill the memory) just with onlinesig disabled, and is working perfectly. Using wx2.5.4, GTK1 no unicode. Seems the problem is onlinesig...

Regards.