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

Liviu Chircu noreply at github.com
Mon Jul 22 12:56:34 UTC 2024


  Branch: refs/heads/3.5
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 8f8dc5da73e28b437afbb73443a7e366e423e7e2
      https://github.com/OpenSIPS/opensips/commit/8f8dc5da73e28b437afbb73443a7e366e423e7e2
  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: f5f927bbf5341a6139fb17920e69a4384365f01c
      https://github.com/OpenSIPS/opensips/commit/f5f927bbf5341a6139fb17920e69a4384365f01c
  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/b3935191962b...f5f927bbf534

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



More information about the Devel mailing list