[issue30931] Race condition in asyncore wrongly closes channel

2017-07-19 Thread Jaume

Changes by Jaume :


--
pull_requests: +2823

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Nir Soffer

Nir Soffer added the comment:

Can you provide a minimal reproducer, or best add a failing test?

--
nosy: +Nir Soffer

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Jaume

Changes by Jaume :


--
pull_requests: +2771

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Jaume

Changes by Jaume :


--
type:  -> resource usage
versions: +Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Jaume

New submission from Jaume:

If a socket is closed and polled here 
https://github.com/python/cpython/blob/0d0a32fb91cdfea1626e6c6b77a9bc44e15a2b8a/Lib/asyncore.py#L183
 the flag returned will be select.POLLNVAL (note that this can happen despite 
dispatcher.close() being called).

This wouldn't be a problem but before here 
https://github.com/python/cpython/blob/0d0a32fb91cdfea1626e6c6b77a9bc44e15a2b8a/Lib/asyncore.py#L185
 a new socket may be created with the same fd (which wouldn't be strange since 
that fd is now available), so the retrieved socket will be the newly created 
one instead of the old one and the new one will be close.

This is regularly happening to us, I could try to explain better, but that's 
really it.

--
messages: 298359
nosy: walkhour
priority: normal
severity: normal
status: open
title: Race condition in asyncore wrongly closes channel
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com