[OpenSIPS-Devel] [OpenSIPS/opensips] 895b82: tcp: don't add conn in TCP main reactor after asyn...
Razvan Crainea
razvan at opensips.org
Thu Feb 9 03:41:22 EST 2017
Branch: refs/heads/2.2
Home: https://github.com/OpenSIPS/opensips
Commit: 895b823b6c96e45b074bee8b67d8863248e3a68e
https://github.com/OpenSIPS/opensips/commit/895b823b6c96e45b074bee8b67d8863248e3a68e
Author: Razvan Crainea <razvan at opensips.org>
Date: 2017-02-09 (Thu, 09 Feb 2017)
Changed paths:
M net/net_tcp.c
M net/net_tcp_proc.c
M net/tcp_conn.h
Log Message:
-----------
tcp: don't add conn in TCP main reactor after async write
When getting back a TCP connection from a TCP worker after it wrote some
async chunks, we should not add the connection in the reactor for read.
The reason is that the connection might already be polled by a different
process. If the poll triggers for read in the main reactor, the
connection will be assigned to a new process - and we end up having a
connection for read in two different processes reactor - this breaks
connections list and results in double frees and invalid memory access.
Many thanks to Federico Edorna for all the help given to track down this
issue!
(cherry picked from commit 33fe3395570c40b6733b0579f94072b68e7bd646)
More information about the Devel
mailing list