Opened 11 years ago

Closed 11 years ago

#1690 closed defect (fixed)

Assertion in timer in SIP transaction: Timer being rescheduled when already running

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 (last modified by bennylp)

Contributed patch from Matt Williams:

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.

Change History (2)

comment:1 Changed 11 years ago by bennylp

  • Description modified (diff)

comment:2 Changed 11 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

In 4567:

Closed #1690: Assertion in timer in SIP transaction: Timer being rescheduled when already running

Note: See TracTickets for help on using tickets.