Opened 11 years ago
Last modified 11 years ago
#1690 closed defect
Assertion in timer in SIP transaction: Timer being rescheduled when already running — at Initial Version
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.2 |
Component: | pjsip | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description
Contributed patch:
We hit a "entry->_timer_id < 1" assert in schedule_w_grp_lock(). This assert is to check that we're not rescheduling a timer that is already running.
We hit this in two different ways: once via a race condition and once because we sometimes set the timer again without cancelling previous timers.
Proposed solutions:
- Race condition: I think the fix is not to send the packet or reschedule the timer if the timer is already running. I've changed tsx_retransmit to drop out immediately if the resched flag was set and the timer was already scheduled.
- reschedule without cancel first: I've coded a fix to always cancel the timer before restarting it, if we're in a state where the timer could already be running.
Note: See
TracTickets for help on using
tickets.