Bug#445814: libcommoncpp2-1.5-0: onTimer() not called upon timer expiration in PosixThread
Mikael Magnusson
mikma at users.sourceforge.net
Mon Oct 8 14:03:09 UTC 2007
Michael Rumpler wrote:
> Package: libcommoncpp2-1.5-0
> Version: 1.5.1-4
> Severity: important
>
>
> When using timers in a class derived from PosixThread, the method
> onTimer() is not called when the timer expires, although the timer is
> running. I wrote a minimal test software to reproduce this problem.
> The problem does not arise on other systems (e.g. RHEL 4) with the
> same commoncpp version. As far as i found out, it must have something to
> do with the kernel version/c library or a combination of those.
> on a system running kernel 2.6.9 it works, on a system with 2.6.11
> it does no longer work... so far i did not try to run a debian etch system
> with a 2.6.9 to verify, maybe you find the problem faster than me ;-)
>
> The software starts a timer in the class derived from PosixThread and
> continously reads the timer value to prove the timer is running.
> If the onTimer() gets called the program makes happy outputs.
>
> This call does not happen on Debian etch, but works on other distributions
> with - as is my knowledge so far - kernels < 2.6.10.
>
My observations follows:
I'm running testing/unstable on Linux 2.6.18-3-k7, and onTimer isn't
called on my system since the main thread receives SIGALRM and not the
CiTimer thread. I can prevent this by using pthread_sigmask to block
SIGALRM in main.
sigset_t cancel, old;
sigemptyset(&cancel);
sigaddset(&cancel, SIGALRM);
pthread_sigmask(SIG_BLOCK, &cancel, &old);
Mikael
More information about the Pkg-voip-maintainers
mailing list