Problems tracing spawed processes



Recently I had to track down a memory leak in one of our large linux executables on a Redhat 7.2 system.

Whilst looking for a half-decent memory error detection program for Linux I came across the promising looking memprof.  The main difficultly with debugging the software in question is the fact that we have quite a few levels of sub-processes 'exec'ing and 'fork'ing but it seemed from the information given that memprof could cope with this.

However, when running a top-level process through memprof, memprof fails to successfully follow any of the spawned processes, depsite the use of the --follow-fork and --follow-exec options.

I am using memprof-0.5.1 on a Redhat 7.2 x86 system. The program seems to work well with single-process programs.

The following is the message-trace from memprof when executing the mutli-process program:


memintercept (18200): _MEMPROF_SOCKET = /tmp/memprof.ZqrV5e
memintercept (18200): New process, operation = NEW, old_pid = 0
memintercept (18209): New process, operation = FORK, old_pid = 18200

(memprof:18181): GLib-CRITICAL **: file ghash.c: line 554 (g_hash_table_foreach): assertion `hash_table != NULL' failed
memintercept (18209): _MEMPROF_SOCKET = /tmp/memprof.ZqrV5e
memintercept (18209): New process, operation = NEW, old_pid = 0
memintercept (18209): Stopping tracing
memintercept (18218): _MEMPROF_SOCKET =
memintercept (18227): New process, operation = FORK, old_pid = 18200

(memprof:18181): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed

(memprof:18181): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed

(memprof:18181): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed

(memprof:18181): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed

(memprof:18181): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed

(memprof:18181): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed

(memprof:18181): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed
memintercept (18227): _MEMPROF_SOCKET = /tmp/memprof.ZqrV5e
memintercept (18227): New process, operation = NEW, old_pid = 0
memintercept (18227): Stopping tracing


Note that although memprof seems to successfully detect the spawned process - very quickly it decides to "stop tracing".

Any ideas of how I can get this to work as required? Can anyone explain to me the reason for the messages "Stopping tracing".

Thanks,
Alan Alexander
CPU Core Architect
SuperH Uk Ltd.

http://www.superh.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]