http://defect.opensolaris.org/bz/show_bug.cgi?id=11546
Anurag S. Maskey <Anurag.Maskey at Sun.COM> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ACCEPTED |CAUSEKNOWN
AssignedTo|michael.hunter at sun.com |Anurag.Maskey at Sun.COM
--- Comment #2 from Anurag S. Maskey <Anurag.Maskey at Sun.COM> 2009-09-29
15:08:52 UTC ---
The cause of this bug is in the alarm(2) call. Any timed event that's enqueued
calls alarm(). The interesting fact with alarm() is that when a new alarm() is
enqueued, the old alarm disappears. That's what was happening.
When we dequeue expired timed events (in nwamd_event_enqueue_expired_event()),
we set the alarm() for the first unexpired timed event. However, we don't do
any alarm() bookkeeping in nwamd_event_enqueue_timed(). The alarm() is simply
set, and the old one destroyed.
When an alarm is set, if there is a pending alarm, alarm(2) does return the
number of seconds remaining for the alarm to go off. If this remaining time is
less than the time for the new alarm, we reset the alarm back to the remaining
time. The timed event that was trying to set the alarm is enqueued in the
timed event queue, so nwamd_event_enqueue_expired_events() will set the alarm
for it when the original alarm expires.
--
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.