[New-bugs-announce] [issue35294] Race condition involving SocketServer.TCPServer

Ruslan Dautkhanov report at bugs.python.org
Wed Nov 21 20:02:32 EST 2018

New submission from Ruslan Dautkhanov <dautkhanov at gmail.com>:

We had a long discussion in https://issues.apache.org/jira/browse/SPARK-26019
regarding a race condition that happens 
around https://github.com/apache/spark/blob/master/python/pyspark/accumulators.py#L289 

The fix I created here -
basically changes bind_and_activate to False 
in SocketServer.TCPServer.__init__'s call 
and manually doing 
in that thread instead of main thread. 

We have a fix, but we're not sure if this is a bug in Python with multithreading / handling SocketServer.TCPServer ?

Thank you.

components: IO, Library (Lib)
messages: 330228
nosy: Ruslan Dautkhanov
priority: normal
severity: normal
status: open
title: Race condition involving SocketServer.TCPServer
versions: Python 2.7, Python 3.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list