ovedeneev created an issue (kamailio/kamailio#4187)
### Description
[tcp_send_timeout](https://www.kamailio.org/wikidocs/cookbooks/5.8.x/core/#t… option does not apply for outbound connections.
#### Reproduction
1. Establish TCP OPTIONS between Kamailio and target node.
2. On target node block incoming traffic from Kamailio node using iptables.
3. Notice on Kamailio node that TCP retransmission packets don't follow tcp_send_timeout settings, instead they fall back to kernel's net.ipv4.tcp_retries2 settings.
### Additional Information
* **Kamailio Version**
```
# kamailio -V
version: kamailio 5.8.2 (aarch64/linux) 446039
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT-NOSMP, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 446039
compiled on 14:32:09 Nov 14 2024 with gcc 8.5.0
```
* **Operating System**:
```
Linux xxx 4.18.0-553.6.1.el8.aarch64 #1 SMP Thu May 30 04:10:32 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4187
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4187(a)github.com>
xadhoom created an issue (kamailio/kamailio#4203)
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
Enabled json logging engine, with the following setup:
- kam cmd line params: `--log-engine=json:Mp`
- prefix: `log_prefix=", \"callid\": \"$ci\",\"srcip\": \"$si\", \"ts\": $TV(Sn), \"method\": \"$rm\", \"mt\": $mt, \"ua\": \"$(ua{s.escape.common})\", \"cseq\": \"$hdr(CSeq)\", \"status\": $rs "`
- another prefix (same result): `log_prefix=", \"callid\": \"$ci\", \"ts\": $TV(Sn) "`
What I see that certain json lines are truncated, for example
- one line is interrupted by another json entry
- one line starts "truncated"
### Troubleshooting
What I can observe is that seems to happens always with same "kind" of line, usually internal logs, which don't have callid etc.
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
The following first 3 lines are ok, then the latest is corrupted:
```
{ "time": "2025-04-04T15:51:44.448427533Z", "idx": 193, "pid": 200, "level": "DEBUG", "module": "core", "file": "core/receive.c", "line": 128, "function": "sip_check_fline", "message": "first line indicates a SIP reply" }
{ "time": "2025-04-04T15:51:44.448682606Z", "idx": 194, "pid": 201, "level": "DEBUG", "module": "core", "file": "core/receive.c", "line": 128, "function": "sip_check_fline", "message": "first line indicates a SIP reply" }
{ "time": "2025-04-04T15:52:14.448279053Z", "idx": 195, "pid": 202, "level": "DEBUG", "module": "core", "file": "core/receive.c", "line": 128, "function": "sip_check_fline", "message": "first line indicates a SIP reply" }
{ "time": "2025-04-04T15:52:14.448505797Z", "idx": 196, "pid": 203, "level": "DEBUG", "module": "core", "file": "core/receive.c"{ "time": "2025-04-04T15:52:14.448508084Z", "idx": 195, "pid": 202, "level": "DEBUG", "module": "core", "file": "core/parser/msg, "line": 128, "function": "sip_check_fline", "message": "first line indicates a SIP reply" }
```
or (notice 2nd line or 5th one)
```
{ "time": "2025-04-04T16:13:33.789641936Z", "idx": 221, "pid": 228, "level": "DEBUG", "module": "core", "file": "core/receive.c"{ "time": "2025-04-04T16:13:33.789642978Z", "idx": 222, "pid": 229, "level": "DEBUG", "module": "core", "file": "core/xavp.c", ", "line": 265, "function": "ksr_evrt_pre_routing", "callid": "5715efe40e9b7721-264(a)127.0.0.1", "ts": 1743783213.789640 , "message": "event route core:pre-routing not defined" }
line": 630, "function": "xavp_destroy_list", "callid": "5715efe40e9b7720-264(a)127.0.0.1", "ts": 1743783213.789527 , "message": "destroying xavp list (nil)" }
{ "time": "2025-04-04T16:13:33.789646470Z", "idx": 222, "pid": 229, "level": "DEBUG", "module": "core", "file": "core/xavp.c", "line": 630, "function": "xavp_destroy_list", "callid": "5715efe40e9b7720-264(a)127.0.0.1", "ts": 1743783213.789527 , "message": "destroying xavp list (nil)" }
{ "time": "2025-04-04T16:13:33.789648201Z", "idx": 221, "pid": 228, "level": "DEBUG", "module": "tm", "file": "t_lookup.c", "line": 1579, "function": "t_check_msg", "callid": "5715efe40e9b7721-264(a)127.0.0.1", "ts": 1743783213.789640 , "message": "msg (0x7f{ "time": "2025-04-04T16:13:33.789649346Z", "idx": 222, "pid": 229, "level": "DEBUG", "module": "core", "file": "core/receive.c"8f7a693c50) id=2/228 global id=1/228 T start=0xffffffffffffffff" }
, "line": 637, "function": "receive_msg", "callid": "5715efe40e9b7720-264(a)127.0.0.1", "ts": 1743783213.789527 , "message": "cleaning up" }
{ "time": "2025-04-04T16:13:33.789652839Z", "idx": 221, "pid": 228, "level": "DEBUG", "module": "tm", "file": "t_lookup.c", "line": 1424, "function": "t_reply_matching", "callid": "5715efe40e9b7721-264(a)127.0.0.1", "ts": 1743783213.789640 , "message": "t_reply_matching: hash 26404 label 0 branch 0" }
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
6.0.1
```
happens also with 5.8.x
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
Debian noble, docker container
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4203
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4203(a)github.com>