Google Groups no longer supports new usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Linux Signal Handling SIGXCPU

99 views
Skip to the first unread message

llothar

unread,
30 Jul 2006, 06:10:5130/07/2006
to
I'm using Linux 2.6.15 and run into a huge problem
(But it also happens with an older OpenSUSE 10.0).

I have a GUI thread and a worker thread that copies a lot of files in
the background.
During the gui<->worker interaction i'm constantly getting SIGXCPU
failures.

I've already tried to increase the limit (from the main process and
the worker thread itself) with:

struct rlimit rl;
rl.rlim_cur = RLIM_INFINITE;
rl.rlim_max = RLIM_INFINITE;
setrlimit(RLIMIT_CPU, &rl);

But the SIGXCPU signal is still raised. Ignoring this signal hangs the
application.

If i'm not using the worker thread the application runs forever, so i
guess there
is something else in the thread management that i don't know about.

When i use GDB to examine the application it shows me that the process
is getting a SIGPWR just before the SIGXCPU

Both signals are thrown inside sem_wait.

All this happens very reliable, every time i run the program.
I'm totally lost. I have absolutely no idea what is going on and don't
know what else
i should try (Maybe porting to another UNIX System like Solaris or
MacOSX/X11 ?)

llothar

unread,
30 Jul 2006, 06:47:3930/07/2006
to
> i should try (Maybe porting to another UNIX System like Solaris or
> MacOSX/X11 ?)

Okay i compiled it on MacOSX and there it works without problems.

Joe Seigh

unread,
30 Jul 2006, 07:24:5230/07/2006
to
Googling on this shows some hits on some GC implementation using SIGPWR
and SIGXCPU to do stop the world, ie, stop all the threads while the GC
runs. Sounds like somebody is not managing signal handler or signal
masking correctly. I.e. not pushing/poping the signal handlers and/or
not anding or oring changes to the signal mask.

--
Joe Seigh

When you get lemons, you make lemonade.
When you get hardware, you make software.

llothar

unread,
30 Jul 2006, 09:56:1730/07/2006
to

> Googling on this shows some hits on some GC implementation using SIGPWR
> and SIGXCPU to do stop the world, ie, stop all the threads while the GC
> runs. Sounds like somebody is not managing signal handler or signal
> masking correctly. I.e. not pushing/poping the signal handlers and/or
> not anding or oring changes to the signal mask.

Thanks very much for the hint.

Indeed i use the Boehm Weisser Garbage Collector in this (Eiffel)
program.
I will ask on the GC mailing list.

0 new messages