# POSIX timer failure

**URL:** <https://forums.suse.com/t/posix-timer-failure/21745>\
**Category:** SLE Software Developer Kit (SDK)\
**Created:** [April 21, 2010, 3:56pm UTC](https://forums.suse.com/t/posix-timer-failure/21745 "2010-04-21T15:56:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [April 21, 2010, 3:56pm UTC](https://forums.suse.com/t/posix-timer-failure/21745/1 "2010-04-21T15:56:03Z")

</div>

Hi, I’m using the POSIX timer functions (timer\_create, timer\_settime) to  
manage comms timeouts and, under SLES 11, I’m hitting some problems.

Basically, I create a first timer then create and delete a number of  
other ones before the first timer times out. When it times out, the  
timeout function doesn’t appear to be called and the next timer\_create  
call hangs up indefinitely (see attached code\*). The code works fine on  
SLES 10.

Attaching a debugger, I can see that the timer\_create call hangs up in  
pthread\_mutex\_lock after the first timer has expired.

Anybody any ideas? Am I abusing the timers? Has something changed in  
the semantics at SLES 11?

Thanks  
Phil

- compiled with g++ tim3.c -o tim3s11 -lrt

±---------------------------------------------------------------------+  
|Filename: tim3.zip |  
|Download: [http://forums.novell.com/attachment.php?attachmentid=4301](http://forums.novell.com/attachment.php?attachmentid=4301) |  
±---------------------------------------------------------------------+

## – sandersonpj

sandersonpj’s Profile: [http://forums.novell.com/member.php?userid=83767](http://forums.novell.com/member.php?userid=83767)  
View this thread: [http://forums.novell.com/showthread.php?t=408327](http://forums.novell.com/showthread.php?t=408327)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [May 17, 2010, 3:56pm UTC](https://forums.suse.com/t/posix-timer-failure/21745/2 "2010-05-17T15:56:03Z")

</div>

My intermittent researches into this have revealed this bug, which might  
be pertinent.‘Bug 7094 - Bug in creating/deleting posix per process  
timers with SIGEV\_THREAD notification method’  
([http://sourceware.org/bugzilla/show\_bug.cgi?id=7094](http://sourceware.org/bugzilla/show_bug.cgi?id=7094)).

How can I tell if this has been addressed in SLES 11?

Thanks

## – sandersonpj

sandersonpj’s Profile: [http://forums.novell.com/member.php?userid=83767](http://forums.novell.com/member.php?userid=83767)  
View this thread: [http://forums.novell.com/showthread.php?t=408327](http://forums.novell.com/showthread.php?t=408327)
