[Mono-devel-list] High CPU utilization when running mod_mono/xsp

Jaroslaw Kowalski jaak at zd.com.pl
Wed Jun 16 03:01:51 EDT 2004


After some digging, I found a way to use gdb.

"info threads" shows:

(gdb) info threads
  11 Thread 147466 (LWP 16330)  0x4efa7a26 in nanosleep () from
/lib/i686/libpthread.so.0
* 10 Thread 131081 (LWP 16329)  0x4efa4124 in __pthread_sigsuspend () from
/lib/i686/libpthread.so.0
  9 Thread 114696 (LWP 16328)  0x4efa4124 in __pthread_sigsuspend () from
/lib/i686/libpthread.so.0
  8 Thread 98311 (LWP 16327)  0x4efa4124 in __pthread_sigsuspend () from
/lib/i686/libpthread.so.0
  7 Thread 81926 (LWP 16326)  0x4efa4124 in __pthread_sigsuspend () from
/lib/i686/libpthread.so.0
  5 Thread 49156 (LWP 16324)  0x4efa7458 in accept () from
/lib/i686/libpthread.so.0
  3 Thread 16386 (LWP 16322)  0x4efa4124 in __pthread_sigsuspend () from
/lib/i686/libpthread.so.0
  2 Thread 32769 (LWP 16321)  0x4ed7631a in poll () from /lib/i686/libc.so.6
  1 Thread 16384 (LWP 16318)  0x4efa4124 in __pthread_sigsuspend () from
/lib/i686/libpthread.so.0

Notice the number of "__pthread_sigsuspend()"

Thread 10: that does this has the following stack trace:

#0  0x4efa4124 in __pthread_sigsuspend () from /lib/i686/libpthread.so.0
#1  0x4efa3a48 in __pthread_wait_for_restart_signal () from
/lib/i686/libpthread.so.0
#2  0x4efa56dd in __pthread_alt_lock () from /lib/i686/libpthread.so.0
#3  0x4efa2525 in pthread_mutex_lock () from /lib/i686/libpthread.so.0
#4  0x400cea63 in _wapi_handle_get_shared_segment (segment=4294967292) at
handles-private.h:103
#5  0x400ccf0c in _wapi_lookup_handle (handle=0x28, type=WAPI_HANDLE_THREAD,
shared=0x42c7ec60, private=0x42c7ec64)
    at handles.c:420
#6  0x400d8953 in _wapi_thread_apc_pending (handle=0x28) at threads.c:975
#7  0x400d9bbb in WaitForSingleObjectEx (handle=0x26, timeout=15000,
alertable=1) at wait.c:116
#8  0x4009f3d4 in ves_icall_System_Threading_WaitHandle_WaitOne_internal
(this=0x85a2e28, handle=0x26, ms=15000,
    exitContext=0) at threads.c:768
#9  0x4243d170 in ?? ()
#10 0x085a2e28 in ?? ()

Other threads that do __pthread_sigsuspend() are more or less the same. I've
placed all the stack traces at.

http://jaak.sav.net/stacktrace.txt

Regards,

Jarek
----- Original Message ----- 
From: "Jaroslaw Kowalski" <jaak at zd.com.pl>
To: <mono-devel-list at lists.ximian.com>
Sent: Wednesday, June 16, 2004 8:41 AM
Subject: [Mono-devel-list] High CPU utilization when running mod_mono/xsp


>
> I get very high CPU load when running mod_mono/xsp even when no pages are
> served. As I run without NPTL I have 5 processes named
mod-mono-server.exe,
> each taking about 20% CPU time. Load average exceeds "5.0".
>
> This applies to current mono/CVS. After I "strace'd" it, I got a massive
> amount of this:
>
> gettimeofday({1087367416, 4291901250}, NULL) = 0
> rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
> rt_sigprocmask(SIG_UNBLOCK, [RTMIN], [RTMIN], 8) = 0
> gettimeofday({1087367416, 4291906635}, NULL) = 0
> rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
> gettimeofday({1087367416, 4291906687}, NULL) = 0
> rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
> rt_sigprocmask(SIG_UNBLOCK, [RTMIN], [RTMIN], 8) = 0
> gettimeofday({1087367416, 4291906760}, NULL) = 0
> rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
> gettimeofday({1087367416, 4291906802}, NULL) = 0
> rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
> rt_sigprocmask(SIG_UNBLOCK, [RTMIN], [RTMIN], 8) = 0
> gettimeofday({1087367416, 4291906871}, NULL) = 0
> rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
> gettimeofday({1087367416, 4291906913}, NULL) = 0
> rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
> rt_sigprocmask(SIG_UNBLOCK, [RTMIN], [RTMIN], 8) = 0
> gettimeofday({1087367416, 4291906982}, NULL) = 0
> rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
>
> Notice that it get's called many times a second (I suspect an active
waiting
> somewhere).
> I could provide more debug info, but I've got no idea how to attach a
> debugger and break all threads to see which function causes this flood. In
> VS.NET this would be simple but "gdb" scares me. I'd be glad if someone
> could provide a step-by-step guide for running gdb to capture this
> information.
>
> Jarek
>
> P.S. This may be related to the fact that I'm running this instance on
> mod_mono/xsp on colinux (http://www.colinux.org) under Windows 2003 host.
I
> may be wrong, but this is about 5th mod_mono on coLinux that I'm trying
and
> I never experienced high load like this.
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>




More information about the Mono-devel-list mailing list