Long-running app getting into trouble

I have a long-running Gnu Radio application–my VLF sid receiver. It
seems to “wedge” after a few days
of flawless operation.

The application uses an audio source, and an audio sink, but usually the
source and sink are on
two different sound cards.

The application uses a number of WxGUI widgets, and was generated using
GRC. I don’t see any evidence
for a memory leak, the app reaches stable virtual and resident-set
sizes fairly quickly, and they don’t change.

There’s no evidence for a file-descriptor leak (checked /proc/XXXX for
each of the 3 processes involved, and
everything looks good).

No kernel error messages (and this application behaves this way across
different distributions of
Linux–both Ubuntu and Fedora show this problem).

Next time it happens, I’ll force a core dump, and see if I can see where
it’s getting hung.

But it’s most puzzling, and a little worrying. I really need this app,
and ones like it to run
essentially indefinitely, doing what they do. If anyone has any kind
of clue, and wants the
code (most of it produced in GRC), please let me know.

Cheers(?)
Marcus


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Sun, May 30, 2010 at 11:26:34PM -0400, Marcus D. Leech wrote:

for a memory leak, the app reaches stable virtual and resident-set
Next time it happens, I’ll force a core dump, and see if I can see where
it’s getting hung.

But it’s most puzzling, and a little worrying. I really need this app,
and ones like it to run
essentially indefinitely, doing what they do. If anyone has any kind
of clue, and wants the
code (most of it produced in GRC), please let me know.

Cheers(?)
Marcus

When it wedges, does it continue to consume CPU, or does it appear to
be blocked?

When it wedges, you should be able to attach to it with gdb.
Run gdb on /usr/bin/python, then attach it to the PID that corresponds
to your app.

(gdb) attach
(gdb) thread apply all bt

will generate a backtrace for all threads.

Eric

On 05/31/2010 12:58 AM, Eric B. wrote:

When it wedges, does it continue to consume CPU, or does it appear to
be blocked?

Oooh, I forgot to check that, but clearly another clue that needs to be
gathered!

Thanks for the tip! Will definitely do that next time it happens.
Really want to understand this
one and nip it in the aggravating little bud!

My intuition is telling me that it’s weirdness in ALSA, but that’s just
a gut feeling.


Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On 05/31/2010 12:58 AM, Eric B. wrote:

When it wedges, does it continue to consume CPU, or does it appear to
be blocked?

Looks like it continues to consume cpu, but at a lower rate than
“normal”.

Did that. But, well, there are 148 threads in this thing, so I’m not
really sure the torrent of data can
be understood by a single mind :slight_smile:


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium