alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

Timing issue on startup #157

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From ondrej.s...@gmail.com on January 18, 2011 06:38:52

What steps will reproduce the problem? The problem is not 100% reproducible. What is the expected output? What do you see instead? See below. What version of the product are you using? On what operating system? Version of web2py 1.91.6, OS Windows XP 32 bit. Please provide any additional information below. There appears to be a bug during startup.

C:\Temp\web2py>web2py.exe web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.91.6 (2011-01-03 17:55:14) Database drivers available: SQLite3, pymysql Starting hardcron... Fatal Python error: PyEval_RestoreThread: NULL tstate

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

If I run the same command again, everything works fine.

C:\Temp\web2py>web2py.exe web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.91.6 (2011-01-03 17:55:14) Database drivers available: SQLite3, pymysql Starting hardcron... please visit: http://127.0.0.1:8000 starting browser...

C:\Temp\web2py>web2py.exe

Original issue: http://code.google.com/p/web2py/issues/detail?id=159

alfonsodg commented 10 years ago

From caleb.ha...@gmail.com on February 02, 2011 23:07:54

The Python documentation has quite a good discussion on this: http://docs.python.org/c-api/init.html In particular:

void PyEval_RestoreThread(PyThreadState *tstate)
Acquire the global interpreter lock (if it has been created and thread support is enabled) and set the thread state to tstate, which must not be NULL. If the lock has been created, the current thread must not have acquired it, otherwise deadlock ensues. (This function is available even when thread support is disabled at compile time.)

I don't know how this helps us, but I did note that several other Python projects (PyQT, PyKDE and Matplotlib, and a few others) have gotten this error before. It seems to be something to do with the handling of threading from a C-lib.

alfonsodg commented 10 years ago

From massimo....@gmail.com on November 03, 2011 11:15:39

This issue is old and nobody else has reported the problem. Reopen if reproducible.

Status: WontFix