From notifications@github.com Mon Feb 26 02:47:46 2024 From: liangbaolin To: sr-dev@lists.kamailio.org Subject: [sr-dev] [kamailio/kamailio] tcpops module event_route[tcp:closed] route block $conid is null (Issue #3767) Date: Sun, 25 Feb 2024 18:47:38 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1682626503==" --===============1682626503== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable ### Description During the process of using version 5.7.4 of Kamailio, I found that the $coni= d cannot be correctly obtained in the TCP: closed routing block of the TCP mo= dule event_route. I am certain that it is normal in version 5.4.8. ### Troubleshooting ``` pv [pv_core.c:2725]: pv_get_tcpconn_id() ``` #### Reproduction The test scenario initiated a register registration process for me, and after= completing the disconnection of the TCP connection, triggered this event. #### Log Messages ``` 2024-02-26T01:35:55.902002512Z 52(98) DEBUG: [core/receive.c:635]: rec= eive_msg(): cleaning up 2024-02-26T01:35:55.902034482Z 52(98) DEBUG: [core/tcp_read.c:280]: tc= p_read_data(): EOF on connection 0x7f99a1546a80 (state: 0, flags: c018) - FD = 24, bytes 0, rd-flags 10000 ([12.0.1.6]:15821 -> [12.0.1.6]:5060)52(98) DEBUG= : [core/tcp_read.c:343]: tcp_read(): read 0 bytes: 2024-02-26T01:35:55.902051542Z 2024-02-26T01:35:55.902058282Z 52(98) DEBUG: [core/tcp_read.c:1532]: t= cp_read_req(): read=3D 0 bytes, parsed=3D0, state=3D0, error=3D1 2024-02-26T01:35:55.902063282Z 52(98) DEBUG: [core/tcp_read.c:1534]: t= cp_read_req(): last char=3D0x00, parsed msg=3D 2024-02-26T01:35:55.902069402Z 2024-02-26T01:35:55.902074032Z 52(98) DEBUG: [core/tcp_read.c:1544]: t= cp_read_req(): EOF 2024-02-26T01:35:55.902101372Z 52(98) DEBUG: [core/io_wait.h:598]: io_= watch_del(): DBG: io_watch_del (0x559e8a029740, 24, -1, 0x10) fd_no=3D2 called 2024-02-26T01:35:55.902153162Z 52(98) DEBUG: [core/tcp_read.c:1927]: h= andle_io(): removing from list 0x7f99a1546a80 id 2 fd 24, state 2, flags c018= , main fd 134, refcnt 2 ([12.0.1.6]:15821 -> [12.0.1.6]:5060) 2024-02-26T01:35:55.902168112Z 52(98) DEBUG: [core/tcp_read.c:1702]: r= elease_tcpconn(): releasing con 0x7f99a1546a80, state -1, fd=3D24, id=3D2 ([1= 2.0.1.6]:15821 -> [12.0.1.6]:5060) 2024-02-26T01:35:55.902173372Z 52(98) DEBUG: [core/tcp_read.c:1705]: r= elease_tcpconn(): extra_data (nil) 2024-02-26T01:35:55.902208402Z 83(129) DEBUG: [core/tcp_main.c:3747]: = handle_tcp_child(): reader response=3D 7f99a1546a80, -1 from 1 2024-02-26T01:35:55.902224742Z 83(129) DEBUG: [core/tcp_main.c:3904]: = handle_tcp_child(): case CONN_EOF tcp_emit_closed_event before 5 2024-02-26T01:35:55.902229802Z 83(129) DEBUG: [core/tcp_main.c:3671]: = tcp_emit_closed_event(): TCP closed event creation triggered (reason: 0) 2024-02-26T01:35:55.902318572Z 83(129) DEBUG: tcpops [tcpops.c:311]: tcpops_h= andle_tcp_closed(): received TCP closed event 2024-02-26T01:35:55.902331352Z 83(129) DEBUG: tcpops [tcpops.c:261]: tcpops_t= cp_closed_run_route(): event reason id: 0 rt: 1 2024-02-26T01:35:55.902335132Z 83(129) ERROR: tcpops [tcpops.c:278]: tcpops_t= cp_closed_run_route(): run_top_route() before tev->id: 2 2024-02-26T01:35:55.902480972Z 83(129) DEBUG: [core/tcp_main.c:1713]: = _tcpconn_find(): 2 port 0 2024-02-26T01:35:55.902493872Z 83(129) DEBUG: pv [pv_core.c:2725]: pv_get_tcp= conn_id(): no conid 2024-02-26T01:35:55.902498762Z 83(129) DEBUG: pv [pv_core.c:2726]: pv_get_tcp= conn_id(): msg->rcv.proto_reserved1: 2 2024-02-26T01:35:55.902503592Z 83(129) DEBUG: [core/tcp_main.c:1713]: = _tcpconn_find(): 2 port 0 2024-02-26T01:35:55.902508262Z 83(129) DEBUG: [core/pvapi.c:1418]: pv_= printf_mode(): final buffer length 111 2024-02-26T01:35:55.902513422Z 83(129) ERROR: