[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2020-07-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

hang.py uses the default multiprocessing start method, which was then 'fork'.  
It is now 'spawn' on macOS.  And there have been many other changes.  When I 
run the following from IDLE, it finishes immediately.

import multiprocessing, sqlite3
def hang():
   sqlite3.connect('/tmp/foo')
if __name__ == '__main__':
   multiprocessing.Pool(2).apply_async(hang, []).get(999)
print('done')

Unless I am missing something, this should be closed as 'out of date'.

--

___
Python tracker 

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2020-05-29 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2018-07-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#33111 claims that importing tkinter is enough to hang multiprocessing on MacOS 
up through 3.6.

--
components: +macOS
nosy: +ronaldoussoren, terry.reedy

___
Python tracker 

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2017-12-12 Thread Eitan Adler

Change by Eitan Adler :


--
nosy: +eadler

___
Python tracker 

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2016-05-25 Thread Evan Jones

Evan Jones added the comment:

I believe the root cause of this bug is the following issue: 
http://bugs.python.org/issue27126 ; a workaround is to run the following code 
before forking any subprocesses: sqlite3.connect(':memory:').close()

--
nosy: +evan.jo...@bluecore.com

___
Python tracker 

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2015-04-04 Thread Ned Deily

Ned Deily added the comment:

Arnon, what version of sqlite3 is the Python linked with?  Try:

python3.4 -c import sqlite3;print(sqlite3.sqlite_version)

What kind of database access is happening in your program, i.e. strictly 
multi-read, one writer many reads, multiple-writers?

Also, regarding the workaround, if you do call sqlite3.connect in the main 
process, check that you keep a reference to it (by assigning the result to a 
variable) so that the open connection doesn't get garbage-collected.

--

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2015-04-04 Thread Arnon Sela

Arnon Sela added the comment:

I ran into similar issue on OSX.  Multiprocessing system where processes issue 
sqlite3.connect().  Periodically it hangs.  
System is using Python 3.4.3 and sqlite3; it doesn't use tkinter 

Noticed the following:
1. This doesn't happen on Ubuntu
2. It happens even if URL is invalid - which means that it happens before 
referring to URL as DB.

Workaround didn't solve the problem. But it seems to reduce the frequency.  And 
unfortunately, the system is too large and complex for it to be sent.

I tried to set my environment to debug, but with no luck yet :)

Thanks,

--
nosy: +PyAcrisel

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2014-01-22 Thread Craig Silverstein

New submission from Craig Silverstein:

Don't ask me how, but our code managed to combine multiprocessing, sqlite, and 
tkinter all in one app, and got a hanging behavior, though only on a particular 
OS.  Removing any of these removes the hang.  I filed this under tkinter, but 
the fault could well be elsewhere.

This happens for us only when run under OS X 10.9 (Mavericks).  We are using 
python 2.7.5; I don't know if other versions are affected.

--
components: Tkinter
files: hang.py
messages: 208838
nosy: Craig.Silverstein
priority: normal
severity: normal
status: open
title: Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file33631/hang.py

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2014-01-22 Thread Ned Deily

Ned Deily added the comment:

I can reproduce a hang (but not a crash) when using a Python 2.7.x or 3.4.x 
built from source and linking with the OS X 10.9 system libsqlite3.  Using the 
Apple-supplied Python 2.7 on 10.9 causes a crash in libdispatch.  Using Python 
2.7.6 or 3.4.0 from the current python.org 64-bit installers, the test does not 
hang; these Pythons are linked with a static local version of libsqlite3, not 
the system-supplied one.  If I modify the test to include a call to 
sqlite3.connect() in the top-level code before calling multiprocessing 
apply_async, the test also does not hang anymore. Perhaps you can use that as a 
workaround.  I'm not sure why the combination of sqlite and _tkinter are 
necessary to hang.  I'm not going to have time to look further into this right 
away.

--
nosy: +ned.deily

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2014-01-22 Thread Craig Silverstein

Craig Silverstein added the comment:

Thanks -- we managed to work around it by removing the tkinter dependency, so 
this isn't time-critical for us.  It is curious, though.

One thing I forgot to mention before is that playing around with the hung 
process in gdb, it seems like sqlite was waiting on a lock.  I don't know what 
lock it might be though.

--

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2014-01-22 Thread Ben Alpert

Changes by Ben Alpert spicyjalap...@gmail.com:


--
nosy: +spicyj

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