Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 6 years ago

Closed 5 years ago

#557 closed defect (fixed)

fibril_timer_func needs first aid

Reported by: Jiri Svoboda Owned by: Jiri Svoboda
Priority: major Milestone: 0.6.0
Component: helenos/lib/c Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also: #556, #558

Description

fibril_timer_func() has serveral issues. In general it thinks the timer state cannot change (or cannot change in some ways) while it's waiting and not holding the timer lock - while the state can actually change arbitrarily. For example, after returning from fibril_condvarwait_timeout() with rc == ETIMEOUT we don't check the state at all.

Change History (3)

comment:1 Changed 6 years ago by Jiri Svoboda

Component: helenos/unspecifiedhelenos/lib/c

comment:2 Changed 6 years ago by Jiri Svoboda

See also: #556#556, #558

comment:3 Changed 5 years ago by Jiri Svoboda

Resolution: fixed
Status: newclosed

Hopefully fixed in changeset:mainline,2129 and changeset:mainline,2130. The fix also adds a termination acknowledgement from the timer fibril. This makes sure that when fibril_timer_destroy() is called, it does not return until the timer fibril actually gets the message and progresses to the point where it will never touch the timer again. This makes it safe to deallocate the timer once fibril_timer_destroy() returns.

Note: See TracTickets for help on using tickets.