New submission from kostia.lopuhin <[email protected]>: Running tornado with (maybe broken) stm support fails with the following error:
pypy: /home/kostia/pypy/rpython/translator/stm/src_stm/steal.c:338: stm_normalize_stolen_objects: Assertion `L->h_tid & GCFLAG_PRIVATE_FROM_PROTECTED' failed. Aborted (core dumped) Executable was translated on Ubuntu 12.04, using 5904f9845d8c+ (stmgc-static-barrier): pypy ../../rpython/bin/rpython --opt=2 --gc=stmgc --gcrootfinder=stm --stm targetpypystandalone.py I tested that it generally works (and stm also works and scales as expected on small examples). How to reproduce (assuming virtualenv with pypy-stm): pip install -e [email protected]:lopuhin/tornado.git@stm#egg=tornado git clone [email protected]:lopuhin/web_bench.git Install siege (on Ubuntu the package name is siege), and run in one window (4 is the number of threads). pypy web_bench/trnado.py 4 8001 And in another siege -c 200 -t 10s http://localhost:8001/foo/1000 and see pypy fail with assertion error. Sertanly my tornado modification https://github.com/lopuhin/tornado/commit/246c5e71ce8792b20c56049cf2e3eff192a01b20 may be broken, but if I fool transaction module to belive that pypy has no stm support like this: hg diff diff -r 5904f9845d8c lib_pypy/transaction.py --- a/lib_pypy/transaction.py Fri Aug 23 20:10:41 2013 +0200 +++ b/lib_pypy/transaction.py Sun Sep 01 22:47:27 2013 +0400 @@ -15,6 +15,7 @@ import sys, thread, collections, cStringIO, linecache try: + raise ImportError from __pypy__.thread import atomic except ImportError: # Not a STM-enabled PyPy. We can still provide a version of 'atomic' @@ -41,6 +42,7 @@ signals_enabled = _SignalsEnabled() try: + raise ImportError from __pypy__.thread import last_abort_info except ImportError: # Not a STM-enabled PyPy. then all runs fine. Also, if I run only callbacks in parallel (and don't run handlers in parallel) than the failure is the same. ---------- messages: 6110 nosy: kostia.lopuhin, pypy-issue priority: bug status: unread title: Assertion error with pypy-stm and tornado ________________________________________ PyPy bug tracker <[email protected]> <https://bugs.pypy.org/issue1594> ________________________________________ _______________________________________________ pypy-issue mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-issue
