#1875 closed defect (fixed)
Fixed assertion in rescheduling PJSIP retransmission
Reported by: | ming | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.4.5 |
Component: | pjsip | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description (last modified by ming)
Scenario:
- REGISTER without authorization is being sent
- It’s retransmitted once, because response isn’t received yet
- 401/407 response is received (response to packet in step 1)
- PJSIP sends REGISTER with Authorization header
- 401/407 is received again as a response to packet retransmitted in step 2
- PJSIP tries to send REGISTER with authorization again and it hit an assertion:
pj_assert((tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) == 0);
stack trace:
#4 0x002deea6 in __assert_fail () from /lib/libc.so.6 #5 0x082cc658 in tsx_resched_retransmission (tsx=0xeb94446c) at ../src/pjsip/sip_transaction.c:2219 #6 0x082cbc32 in send_msg_callback (send_state=0xe3bad828, sent=767, cont=0xf4bfdfcc) at ../src/pjsip/sip_transaction.c:1857 #7 0x082ba2fe in stateless_send_transport_cb (token=0xe3bad828, tdata=0xe3a0f2d4, sent=767) at ../src/pjsip/sip_util.c:1126 #8 0x082bdee2 in transport_send_callback (transport=0x8bcf6e4, token=0xe3a0f2d4, size=767) at ../src/pjsip/sip_transport.c:757 #9 0x082c09d9 in udp_on_write_complete (key=0x8bd7c50, op_key=0xe3a0f310, bytes_sent=767) at ../src/pjsip/sip_transport_udp.c:306 #10 0x082e33a8 in ioqueue_dispatch_write_event (ioqueue=0x8bd79a0, h=0x8bd7c50) at ../src/pj/ioqueue_common_abs.c:399
The assertion is caused because in sip_transaction.c, if there is pending send and reschedule, the pending send may cause the flag TSX_HAS_PENDING_TRANSPORT to be set when sending the pending message (in tsx_send_msg()).
Change History (2)
comment:1 Changed 9 years ago by ming
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 9 years ago by ming
- Description modified (diff)
- Summary changed from Fixed asertion in rescheduling PJSIP retransmission to Fixed assertion in rescheduling PJSIP retransmission
Note: See
TracTickets for help on using
tickets.
In 5147: