Re: linux, named pipes (mkfifo) and a hanging application
- From: Richard <rgrdev_@xxxxxxxxx>
- Date: Mon, 12 Jan 2009 18:05:56 +0100
avishaih@xxxxxxxxxxxx writes:
Hello all,
We (at my company) have a fairly complicated multi-threaded
application, that interfaces with user input, web (network) input and
hardware devices (the platform is a custom embedded board, running
Linux on an ARM9 CPU). To help ourselves debug and profile the
application, we've created a monitoring thread within the app that
creates two named pipes (input and output) using mkfifo(). A different
small application was created to access these pipes, thus giving us an
introspection tool in runtime. This mechanism works well when there
are no problems, meaning that while the application is running
normally, I can connect to the application using the pipes, and obtain
current status and other statistics.
My problem arises when the main app is hanging or stuck at 98-100% CPU
utilization. When at this state (which we can not find an easy way to
reproduce), the monitoring client hangs. That is, the monitoring
client is launched, but does not 'connect' to the main application. It
may be noted that other (busybox) utilities can be run from the shell,
such as 'ssh', 'ls', 'top' and friends. Also worth mentioning is that
the main app retains some of its functionality (e.g., image
streaming).
I'll be happy to supply more info as necessary,
Hope some of you gurus out there has any ideas,
Cheers,
Avishai
Did you try running it with debug info, and connecting to the process
with gdb and breaking it to see what threads are still running?
http://www.ddj.com/199200938?pgno=6
Is an introduction. But since you monitor and build this app yourself I
can only assume you have tried this approach.
--
I'm not a person who particularly had heros when growing up.
- Dennis Ritchie when asked about the hero worship coming from c.l.c
.
- Follow-Ups:
- Re: linux, named pipes (mkfifo) and a hanging application
- From: avishaih
- Re: linux, named pipes (mkfifo) and a hanging application
- References:
- linux, named pipes (mkfifo) and a hanging application
- From: avishaih
- linux, named pipes (mkfifo) and a hanging application
- Prev by Date: Re: inline doesn't work - what I am doing wrong?
- Next by Date: Re: (part 9) More Schildt-like errors in Dicky Heathen's book
- Previous by thread: Re: linux, named pipes (mkfifo) and a hanging application
- Next by thread: Re: linux, named pipes (mkfifo) and a hanging application
- Index(es):
Relevant Pages
|