This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Race condition involving SocketServer.TCPServer
Type: behavior Stage:
Components: IO, Library (Lib) Versions: Python 3.6, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Ruslan Dautkhanov
Priority: normal Keywords:

Created on 2018-11-22 01:02 by Ruslan Dautkhanov, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg330228 - (view) Author: Ruslan Dautkhanov (Ruslan Dautkhanov) Date: 2018-11-22 01:02
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 -
https://github.com/apache/spark/pull/23113/files
basically changes bind_and_activate to False 
in SocketServer.TCPServer.__init__'s call 
and manually doing 
            self.server_bind()
            self.server_activate()
            self.serve_forever()
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.
History
Date User Action Args
2022-04-11 14:59:08adminsetgithub: 79475
2018-11-22 01:03:01Ruslan Dautkhanovsettype: behavior
2018-11-22 01:02:32Ruslan Dautkhanovcreate