psychopy / psychopy

For running psychology and neuroscience experiments
http://www.psychopy.org
GNU General Public License v3.0
1.7k stars 912 forks source link

tests get stuck at lib.linux-x86_64-2.7/psychopy/tests/test_app/test_Wizard.py:29: TestWizard.test_firstrunWizard #724

Closed yarikoptic closed 8 years ago

yarikoptic commented 10 years ago

not always but some times... results in unpredictable buildability of the package

jeremygray commented 9 years ago

just stuck in never-never land? any more details on where it gets stuck?

yarikoptic commented 9 years ago

hard to say... will troubleshoot now -- but just confirming that still happens on wheezy with .03 fresh release

yarikoptic commented 9 years ago

so far can only say that it seems to root somewhere in python code

(gdb) bt
#0  0x00007ffff3f4041a in gdk_screen_get_type () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#1  0x00007ffff3f6ab99 in gdk_screen_get_display () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#2  0x00007ffff3f492d8 in gdk_window_set_cursor () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#3  0x00007ffff54c7ced in wxToolBar::OnInternalIdle() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#4  0x00007ffff54d176f in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#5  0x00007ffff54d17a4 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#6  0x00007ffff54d1c04 in wxAppBase::ProcessIdle() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#7  0x00007ffff544d38b in wxApp::Yield(bool) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#8  0x00007ffff5b95baf in ?? () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so
#9  0x0000000000564ab2 in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=0x7fffffff6ac0, func=0x12a50e0) at ../Python/ceval.c:4331
#10 PyEval_EvalFrameEx (f=f@entry=0x5a89c20, throwflag=throwflag@entry=0) at ../Python/ceval.c:2705
#11 0x000000000054b7d4 in PyEval_EvalCodeEx (co=0x11b1530, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=argcount@entry=0, kws=<optimized out>, 
    kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x0) at ../Python/ceval.c:3253
#12 0x00000000005626f6 in fast_function (nk=0, na=0, n=<optimized out>, pp_stack=0x7fffffff6ce0, func=0x139b050) at ../Python/ceval.c:4117
#13 call_function (oparg=<optimized out>, pp_stack=0x7fffffff6ce0) at ../Python/ceval.c:4042
#14 PyEval_EvalFrameEx (f=f@entry=0x5b07e30, throwflag=throwflag@entry=0) at ../Python/ceval.c:2666
#15 0x000000000056198a in fast_function (nk=<optimized out>, na=<optimized out>, n=1, pp_stack=0x7fffffff6e60, func=0x314c938) at ../Python/ceval.c:4107
#16 call_function (oparg=<optimized out>, pp_stack=0x7fffffff6e60) at ../Python/ceval.c:4042
#17 PyEval_EvalFrameEx (f=f@entry=0x5a882a0, throwflag=throwflag@entry=0) at ../Python/ceval.c:2666
#18 0x000000000054b7d4 in PyEval_EvalCodeEx (co=0x3048c30, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=argcount@entry=2, kws=<optimized out>, 
    kwcount=kwcount@entry=0, defs=defs@entry=0x314e228, defcount=1, closure=0x0) at ../Python/ceval.c:3253
#19 0x00000000005614dd in fast_function (nk=0, na=2, n=<optimized out>, pp_stack=0x7fffffff7080, func=0x314ca28) at ../Python/ceval.c:4117
#20 call_function (oparg=<optimized out>, pp_stack=0x7fffffff7080) at ../Python/ceval.c:4042
#21 PyEval_EvalFrameEx (f=f@entry=0x5a786f0, throwflag=throwflag@entry=0) at ../Python/ceval.c:2666
#22 0x000000000054b7d4 in PyEval_EvalCodeEx (co=0x5a37930, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0, 
    defcount=0, closure=0x0) at ../Python/ceval.c:3253
#23 0x00000000005b1332 in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>, locals=<optimized out>) at ../Python/ceval.c:667
#24 0x00000000005b13ea in PyImport_ExecCodeModuleEx (name=name@entry=0x58b5550 "pyolib._widgets", co=co@entry=0x5a37930, 
    pathname=pathname@entry=0x5a82610 "/usr/lib/python2.7/dist-packages/pyolib/_widgets.pyc") at ../Python/import.c:709
#25 0x00000000005b464f in load_source_module.39187 (name=name@entry=0x58b5550 "pyolib._widgets", pathname=0x5a82610 "/usr/lib/python2.7/dist-packages/pyolib/_widgets.pyc", 
    pathname@entry=0x58984f0 "/usr/lib/python2.7/dist-packages/pyolib/_widgets.py", fp=<optimized out>) at ../Python/import.c:1099
#26 0x00000000005b14e1 in load_module.39230 (name=name@entry=0x58b5550 "pyolib._widgets", fp=<optimized out>, pathname=pathname@entry=0x58984f0 "/usr/lib/python2.7/dist-packages/pyolib/_widgets.py", 
    type=<optimized out>, loader=<optimized out>) at ../Python/import.c:1906
#27 0x000000000054c87f in import_submodule.39241 (mod=mod@entry=0x4da1e50, subname=subname@entry=0x58b5557 "_widgets", fullname=0x58b5550 "pyolib._widgets") at ../Python/import.c:2700
#28 0x000000000054cefc in load_next (mod=0x4da1e50, altmod=0x91ad70 <_Py_NoneStruct>, p_name=p_name@entry=0x7fffffff7420, buf=buf@entry=0x58b5550 "pyolib._widgets", 
    p_buflen=p_buflen@entry=0x7fffffff7430) at ../Python/import.c:2515
#29 0x000000000054d58b in import_module_level.isra.3 (level=<optimized out>, fromlist=0x4d9baf0, globals=<optimized out>, name=0x0) at ../Python/import.c:2224
#30 PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=0x4d9baf0, level=<optimized out>) at ../Python/import.c:2288
#31 0x00000000004740f7 in builtin___import__.32990 (self=<optimized out>, args=<optimized out>, kwds=<optimized out>) at ../Python/bltinmodule.c:49
#32 0x00000000004d997b in PyObject_Call (kw=0x0, arg=0x5976680, func=0x7ffff7fda050) at ../Objects/abstract.c:2529
#33 PyEval_CallObjectWithKeywords (func=func@entry=0x7ffff7fda050, arg=arg@entry=0x5976680, kw=kw@entry=0x0) at ../Python/ceval.c:3890
#34 0x00000000005638ca in PyEval_EvalFrameEx (f=f@entry=0x582c990, throwflag=throwflag@entry=0) at ../Python/ceval.c:2333
#35 0x000000000054b7d4 in PyEval_EvalCodeEx (co=0x59778b0, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0, 
    defcount=0, closure=0x0) at ../Python/ceval.c:3253
#36 0x00000000005b1332 in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>, locals=<optimized out>) at ../Python/ceval.c:667
#37 0x00000000005b13ea in PyImport_ExecCodeModuleEx (name=name@entry=0x58e20a0 "pyolib._core", co=co@entry=0x59778b0, 
    pathname=pathname@entry=0x58b16a0 "/usr/lib/python2.7/dist-packages/pyolib/_core.pyc") at ../Python/import.c:709
#38 0x00000000005b464f in load_source_module.39187 (name=name@entry=0x58e20a0 "pyolib._core", pathname=0x58b16a0 "/usr/lib/python2.7/dist-packages/pyolib/_core.pyc", 
    pathname@entry=0x590d1a0 "/usr/lib/python2.7/dist-packages/pyolib/_core.py", fp=<optimized out>) at ../Python/import.c:1099
#39 0x00000000005b14e1 in load_module.39230 (name=name@entry=0x58e20a0 "pyolib._core", fp=<optimized out>, pathname=pathname@entry=0x590d1a0 "/usr/lib/python2.7/dist-packages/pyolib/_core.py", 
    type=<optimized out>, loader=<optimized out>) at ../Python/import.c:1906
#40 0x000000000054c87f in import_submodule.39241 (mod=mod@entry=0x4da1e50, subname=subname@entry=0x58e20a7 "_core", fullname=0x58e20a0 "pyolib._core") at ../Python/import.c:2700
#41 0x000000000054cefc in load_next (mod=0x4da1e50, altmod=0x91ad70 <_Py_NoneStruct>, p_name=p_name@entry=0x7fffffff7a30, buf=buf@entry=0x58e20a0 "pyolib._core", 
    p_buflen=p_buflen@entry=0x7fffffff7a40) at ../Python/import.c:2515
#42 0x000000000054d58b in import_module_level.isra.3 (level=<optimized out>, fromlist=0x4d99510, globals=<optimized out>, name=0x0) at ../Python/import.c:2224
#43 PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=0x4d99510, level=<optimized out>) at ../Python/import.c:2288
#44 0x00000000004740f7 in builtin___import__.32990 (self=<optimized out>, args=<optimized out>, kwds=<optimized out>) at ../Python/bltinmodule.c:49
#45 0x00000000004d997b in PyObject_Call (kw=0x0, arg=0x55c4aa0, func=0x7ffff7fda050) at ../Objects/abstract.c:2529
---Type <return> to continue, or q <return> to quit---q     
Quit
(gdb) finish
Run till exit from #0  0x00007ffff3f4041a in gdk_screen_get_type () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
0x00007ffff3f6ab99 in gdk_screen_get_display () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
(gdb) finish
Run till exit from #0  0x00007ffff3f6ab99 in gdk_screen_get_display () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
0x00007ffff3f492d8 in gdk_window_set_cursor () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
(gdb) 
Run till exit from #0  0x00007ffff3f492d8 in gdk_window_set_cursor () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
0x00007ffff54c7ced in wxToolBar::OnInternalIdle() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
(gdb) 
Run till exit from #0  0x00007ffff54c7ced in wxToolBar::OnInternalIdle() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
0x00007ffff54d176f in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
(gdb) 
Run till exit from #0  0x00007ffff54d176f in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
0x00007ffff54d17a4 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
(gdb) 
Run till exit from #0  0x00007ffff54d17a4 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
0x00007ffff54d1c04 in wxAppBase::ProcessIdle() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
(gdb) 
Run till exit from #0  0x00007ffff54d1c04 in wxAppBase::ProcessIdle() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
0x00007ffff544d38b in wxApp::Yield(bool) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
(gdb) 
Run till exit from #0  0x00007ffff544d38b in wxApp::Yield(bool) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
0x00007ffff5b95baf in ?? () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so
(gdb) 
Run till exit from #0  0x00007ffff5b95baf in ?? () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so
0x0000000000564ab2 in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=0x7fffffff6ac0, func=0x12a50e0) at ../Python/ceval.c:4331
4331    ../Python/ceval.c: No such file or directory.
(gdb) 
Run till exit from #0  0x0000000000564ab2 in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=0x7fffffff6ac0, func=0x12a50e0) at ../Python/ceval.c:4331
2707    in ../Python/ceval.c
(gdb) 
Run till exit from #0  PyEval_EvalFrameEx (f=f@entry=0x5a89c20, throwflag=throwflag@entry=0) at ../Python/ceval.c:2707
PyEval_EvalCodeEx (co=0x11b1530, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=argcount@entry=0, kws=<optimized out>, kwcount=kwcount@entry=0, defs=defs@entry=0x0, 
    defcount=defcount@entry=0, closure=0x0) at ../Python/ceval.c:3263
3263    ../Python/ceval.c: No such file or directory.
Value returned is $1 = (PyObject *) 0x91a9f0 <_Py_TrueStruct>
(gdb) 
Run till exit from #0  PyEval_EvalCodeEx (co=0x11b1530, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=argcount@entry=0, kws=<optimized out>, 
    kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x0) at ../Python/ceval.c:3263
0x00000000005626f6 in fast_function (nk=0, na=0, n=<optimized out>, pp_stack=0x7fffffff6ce0, func=0x139b050) at ../Python/ceval.c:4117
4117    ../Python/ceval.c: No such file or directory.
Value returned is $2 = (PyObject *) 0x91a9f0 <_Py_TrueStruct>
(gdb) 
Run till exit from #0  0x00000000005626f6 in fast_function (nk=0, na=0, n=<optimized out>, pp_stack=0x7fffffff6ce0, func=0x139b050) at ../Python/ceval.c:4117
4046    in ../Python/ceval.c
(gdb) 
Run till exit from #0  call_function (oparg=<optimized out>, pp_stack=0x7fffffff6ce0) at ../Python/ceval.c:4046
2670    in ../Python/ceval.c
(gdb) 
Run till exit from #0  PyEval_EvalFrameEx (f=f@entry=0x5b07e30, throwflag=throwflag@entry=0) at ../Python/ceval.c:2670

so it never finishes from that PyEval

yarikoptic commented 9 years ago

grrr -- and after all my efforts it works (ie doesn't stall) using debug build of python and corresponding libraries (i.e. python-dbg and all the needed python-*-dbg pkgs)

lib.linux-x86_64-2.7/psychopy/tests/test_app/test_Wizard.py:29: TestWizard.test_firstrunWizard 7.4504   WARNING     Movie2 stim could not be imported and won't be available
10.1701     WARNING     Could not raise thread priority with sched_setscheduler.
To enable rush(), if you are using a debian-based linux, try this in a terminal window:
  'sudo setcap cap_sys_nice=eip /usr/bin/python-dbg'  [NB: You may need to install 'setcap' first.]
If you are using the system's python (eg /usr/bin/python2.x), its highly recommended
to change cap_sys_nice back to normal afterwards:
  'sudo setcap cap_sys_nice= /usr/bin/python-dbg'
11.2392     WARNING     Could not raise thread priority with sched_setscheduler.
To enable rush(), if you are using a debian-based linux, try this in a terminal window:
  'sudo setcap cap_sys_nice=eip /usr/bin/python-dbg'  [NB: You may need to install 'setcap' first.]
If you are using the system's python (eg /usr/bin/python2.x), its highly recommended
to change cap_sys_nice back to normal afterwards:
  'sudo setcap cap_sys_nice= /usr/bin/python-dbg'
11.7776     WARNING     t of last frame was 88.67ms (=1/11)
11.7888     WARNING     t of last frame was 11.20ms (=1/89)
11.8066     WARNING     t of last frame was 17.80ms (=1/56)
11.8160     WARNING     t of last frame was 9.44ms (=1/105)
11.8265     WARNING     Multiple dropped frames have occurred - I'll stop bothering you about them!
PASSED

so -- how do I skip this test from cmd line?

peircej commented 9 years ago

hmmph, on my linux box the test suite now does a core dump halfway through after running out of memory to run the tests (probably because the stimulus windows refuse to close so memory is tied up with each one). But if I just run the test_app folder including test_Wizard it works fine (this is ubuntu 14.04)

To exclude a test at commandline you can do:

py.test -k "not test_firstrunWizard"

http://pytest.org/latest/usage.html#specifying-tests-selecting-tests

On 04/12/14 20:55, Yaroslav Halchenko wrote:

grrr -- and after all my efforts it works (ie doesn't stall) using debug build of python and corresponding libraries (i.e. python-dbg and all the needed python-*-dbg pkgs)

lib.linux-x86_64-2.7/psychopy/tests/test_app/test_Wizard.py:29: TestWizard.test_firstrunWizard 7.4504 WARNING Movie2 stim could not be imported and won't be available 10.1701 WARNING Could not raise thread priority with sched_setscheduler. To enable rush(), if you are using a debian-based linux, try this in a terminal window: 'sudo setcap cap_sys_nice=eip /usr/bin/python-dbg' [NB: You may need to install 'setcap' first.] If you are using the system's python (eg /usr/bin/python2.x), its highly recommended to change cap_sys_nice back to normal afterwards: 'sudo setcap cap_sys_nice= /usr/bin/python-dbg' 11.2392 WARNING Could not raise thread priority with sched_setscheduler. To enable rush(), if you are using a debian-based linux, try this in a terminal window: 'sudo setcap cap_sys_nice=eip /usr/bin/python-dbg' [NB: You may need to install 'setcap' first.] If you are using the system's python (eg /usr/bin/python2.x), its highly recommended to change cap_sys_nice back to normal afterwards: 'sudo setcap cap_sys_nice= /usr/bin/python-dbg' 11.7776 WARNING t of last frame was 88.67ms (=1/11) 11.7888 WARNING t of last frame was 11.20ms (=1/89) 11.8066 WARNING t of last frame was 17.80ms (=1/56) 11.8160 WARNING t of last frame was 9.44ms (=1/105) 11.8265 WARNING Multiple dropped frames have occurred - I'll stop bothering you about them! PASSED

so -- how do I skip this test from cmd line?

— Reply to this email directly or view it on GitHub https://github.com/psychopy/psychopy/issues/724#issuecomment-65702081.

Jon Peirce http://www.peirce.org.uk

hoechenberger commented 8 years ago

Since our tests work on Travis-CI, I assume this issue can be closed?