[OpenSIPS-Devel] [OpenSIPS/opensips] d27925: TCP: Fix race condition in "proto_tcp.tcp_parallel...

Liviu Chircu noreply at github.com
Mon Jul 22 13:01:05 UTC 2024


  Branch: refs/heads/3.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: d2792575e42827d535e173622ff946c5e95923b1
      https://github.com/OpenSIPS/opensips/commit/d2792575e42827d535e173622ff946c5e95923b1
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2024-07-22 (Mon, 22 Jul 2024)

  Changed paths:
    M modules/proto_tls/proto_tls.c
    M net/api_proto_net.h
    M net/net_tcp_proc.c
    M net/proto_tcp/proto_tcp.c
    M net/proto_tcp/tcp_common.h

  Log Message:
  -----------
  TCP: Fix race condition in "proto_tcp.tcp_parallel_handling"

During F_TCPCONN handling by a TCP worker, the @con pointer must *not*
be de-referenced if the READ was successful and connection already
returned to TCP Main.  This patch adds a new retcode to the tcp.read API
function in order to achieve this.

Credits to Yury Kirsanov and Bogdan Iancu for helping troubleshoot
this issue!

(cherry picked from commit 6108ee296fe372cb59719acde9499d0cbe8fbdc8)


  Commit: 2ddd14a35d4ffac6d09da4b25a5875fd0e9a90dc
      https://github.com/OpenSIPS/opensips/commit/2ddd14a35d4ffac6d09da4b25a5875fd0e9a90dc
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2024-07-22 (Mon, 22 Jul 2024)

  Changed paths:
    M lib/dbg/struct_hist.h
    M net/net_tcp.c

  Log Message:
  -----------
  TCP debugging: Fine-tune TCP conn history settings

* reduce logline buffer from 100 -> 80
* only keep the last 300 events per connection (down from 2000)
* avoid auto-logging (flushing) of all TCP conn histories to syslog

These changes should reduce the default TCP conn debugging footprint
from ~2GB to ~0.3GB of shared memory, as well as clean up the logs.

(cherry picked from commit e496cfc28aa6e88259dd17054912f88859087534)


Compare: https://github.com/OpenSIPS/opensips/compare/c67e16b81752...2ddd14a35d4f

To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications



More information about the Devel mailing list