Python 3.7.1 is hung Unicorn Meta Zoo #1: Why another podcast? Announcing the...

What's the difference between using dependency injection with a container and using a service locator?

My bank got bought out, am I now going to have to start filing tax returns in a different state?

"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"

How exactly does Hawking radiation decrease the mass of black holes?

Scheduling based problem

Is Electric Central Heating worth it if using Solar Panels?

Is there really no use for MD5 anymore?

Crossed out red box fitting tightly around image

Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?

A faster way to compute the largest prime factor

Unknown code in script

Can you stand up from being prone using Skirmisher outside of your turn?

What makes accurate emulation of old systems a difficult task?

Why does Arg'[1. + I] return -0.5?

Check if a string is entirely made of the same substring

How to have a sharp product image?

How much cash can I safely carry into the USA and avoid civil forfeiture?

Can I criticise the more senior developers around me for not writing clean code?

How do I prove this combinatorial identity

Bayes factor vs P value

Is there metaphorical meaning of "aus der Haft entlassen"?

Suing a Police Officer Instead of the Police Department

Combinatorics problem, right solution?

Where was the County of Thurn und Taxis located?



Python 3.7.1 is hung



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraPython 3.3 (Using IDLE)Is this port of Scapy compatible with Python 3.x?How to install pyinstaller in Python 3.4.3Python 2to3 Converted Python Package Does Not Find ScriptUnable to unistall python 3.5 on windowsFacing an issue to print another column in csv file that display attribute name which is duplicated in python programmingModule only installs to Python 2 and I can't access it from Python 3Bulding Python 3.7 from sourceinstalled python for mac. but when start running anaconda to run pythonRemove python 3.5.4 version on OS Windows





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am trying to execute a pytest script as follows:



python3.7.1 -m pytest test.py


All the tests from test.py are executed and passed but Python 3.7.1 is hanging indefinitely.



I have entered into gdb and taken the following backtrace:



(gdb) bt
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1 0x00007f9010ae5d05 in PyThread_acquire_lock_timed (lock=lock@entry=0x7f8ff4000af0, microseconds=microseconds@entry=-1000000, intr_flag=intr_flag@entry=1) at Python/thread_pthread.h:340
#2 0x00007f9010b333a4 in acquire_timed (timeout=-1000000000, lock=0x7f8ff4000af0) at ./Modules/_threadmodule.c:61
#3 lock_PyThread_acquire_lock (self=0x7f9007137f30, args=<optimized out>, kwds=<optimized out>) at ./Modules/_threadmodule.c:144
#4 0x00007f90109d9c13 in _PyMethodDef_RawFastCallKeywords (method=<optimized out>, self=self@entry=0x7f9007137f30, args=args@entry=0x7f90005741e0, nargs=nargs@entry=2, kwnames=kwnames@entry=0x0)
at Objects/call.c:690
#5 0x00007f90109e28fe in _PyMethodDescr_FastCallKeywords (descrobj=0x7f900fa103a8, args=args@entry=0x7f90005741d8, nargs=nargs@entry=3, kwnames=kwnames@entry=0x0) at Objects/descrobject.c:288
#6 0x00007f90109b6048 in call_function (kwnames=0x0, oparg=3, pp_stack=<synthetic pointer>) at Python/ceval.c:4579
#7 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
#8 0x00007f9010aa5e09 in _PyEval_EvalCodeWithName (_co=0x7f900ee08810, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=kwargs@entry=0x7f90070a9388,
kwcount=0, kwstep=kwstep@entry=1, defs=defs@entry=0x7f900ee0aa20, defcount=defcount@entry=2, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=0x7f900ee07810, qualname=0x7f900ee01c60)
at Python/ceval.c:3930
#9 0x00007f90109d96c9 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
#10 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
#11 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
#12 0x00007f9010aa5e09 in _PyEval_EvalCodeWithName (_co=0x7f900ee08780, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=kwargs@entry=0x7f8fcd4301d8,
kwcount=0, kwstep=kwstep@entry=1, defs=defs@entry=0x7f900ee0b840, defcount=defcount@entry=1, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=0x7f900fa28d50, qualname=0x7f900ee0a4f0)
at Python/ceval.c:3930
#13 0x00007f90109d96c9 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
#14 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
#15 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
#16 0x00007f90109ad2cb in function_code_fastcall (co=<optimized out>, args=<optimized out>, nargs=1, globals=<optimized out>) at Objects/call.c:283
#17 0x00007f90109d97bf in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:415
#18 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
#19 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
#20 0x00007f90109ad2cb in function_code_fastcall (co=co@entry=0x7f9007c98e40, args=<optimized out>, args@entry=0x7ffead4a50e0, nargs=nargs@entry=1, globals=globals@entry=0x7f9007c7eea0)
at Objects/call.c:283
#21 0x00007f90109d95ff in _PyFunction_FastCallDict (func=0x7f9007e6f2f0, args=0x7ffead4a50e0, nargs=1, kwargs=0x0) at Objects/call.c:322
#22 0x00007f9010a3307a in call_unbound_noarg (self=0x7f9003968ba8, func=0x7f9007e6f2f0, unbound=<optimized out>) at Objects/typeobject.c:1493
#23 call_unbound_noarg (self=0x7f9003968ba8, func=0x7f9007e6f2f0, unbound=1) at Objects/typeobject.c:6645
#24 slot_tp_finalize (self=0x7f9003968ba8) at Objects/typeobject.c:6658
#25 0x00007f9010afc2c9 in finalize_garbage (collectable=0x7ffead4a5170) at Modules/gcmodule.c:703
#26 collect (generation=generation@entry=2, n_collected=n_collected@entry=0x0, n_uncollectable=n_uncollectable@entry=0x0, nofail=nofail@entry=1) at Modules/gcmodule.c:905
#27 0x00007f9010afcf1d in _PyGC_CollectNoFail () at Modules/gcmodule.c:1605
#28 0x00007f9010ac3a82 in PyImport_Cleanup () at Python/import.c:526
#29 0x00007f9010ad0098 in Py_FinalizeEx () at Python/pylifecycle.c:1192
#30 Py_FinalizeEx () at Python/pylifecycle.c:1117
#31 0x00007f9010ad0878 in Py_Exit (sts=sts@entry=0) at Python/pylifecycle.c:2250
#32 0x00007f9010ad9d91 in handle_system_exit () at Python/pythonrun.c:636
#33 0x00007f9010ada116 in handle_system_exit () at Python/pythonrun.c:588
#34 PyErr_PrintEx (set_sys_last_vars=set_sys_last_vars@entry=1) at Python/pythonrun.c:646
#35 0x00007f9010ada35a in PyErr_Print () at Python/pythonrun.c:542
#36 0x00007f9010af602d in pymain_run_module (modname=<optimized out>, set_argv0=set_argv0@entry=1) at Modules/main.c:322
#37 0x00007f9010af6374 in pymain_run_python (pymain=pymain@entry=0x7ffead4a5550) at Modules/main.c:2623
#38 0x00007f9010afb128 in pymain_main (pymain=0x7ffead4a5550) at Modules/main.c:2787
#39 _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:2822
#40 0x00007f900fa84715 in __libc_start_main (main=0x400720 <main>, argc=4, ubp_av=0x7ffead4a56a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffead4a5698)
at libc-start.c:225
#41 0x0000000000400751 in _start ()
(gdb) info threads
Id Target Id Frame
2 Thread 0x7f9002ef0700 (LWP 1124) "python3.7.1" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
* 1 Thread 0x7f90112c2700 (LWP 1048) "python3.7.1" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
(gdb)


I couldn't understand why my program is hanging. Can you please help me in understanding the above stack trace?










share|improve this question









New contributor




Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    I am trying to execute a pytest script as follows:



    python3.7.1 -m pytest test.py


    All the tests from test.py are executed and passed but Python 3.7.1 is hanging indefinitely.



    I have entered into gdb and taken the following backtrace:



    (gdb) bt
    #0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
    #1 0x00007f9010ae5d05 in PyThread_acquire_lock_timed (lock=lock@entry=0x7f8ff4000af0, microseconds=microseconds@entry=-1000000, intr_flag=intr_flag@entry=1) at Python/thread_pthread.h:340
    #2 0x00007f9010b333a4 in acquire_timed (timeout=-1000000000, lock=0x7f8ff4000af0) at ./Modules/_threadmodule.c:61
    #3 lock_PyThread_acquire_lock (self=0x7f9007137f30, args=<optimized out>, kwds=<optimized out>) at ./Modules/_threadmodule.c:144
    #4 0x00007f90109d9c13 in _PyMethodDef_RawFastCallKeywords (method=<optimized out>, self=self@entry=0x7f9007137f30, args=args@entry=0x7f90005741e0, nargs=nargs@entry=2, kwnames=kwnames@entry=0x0)
    at Objects/call.c:690
    #5 0x00007f90109e28fe in _PyMethodDescr_FastCallKeywords (descrobj=0x7f900fa103a8, args=args@entry=0x7f90005741d8, nargs=nargs@entry=3, kwnames=kwnames@entry=0x0) at Objects/descrobject.c:288
    #6 0x00007f90109b6048 in call_function (kwnames=0x0, oparg=3, pp_stack=<synthetic pointer>) at Python/ceval.c:4579
    #7 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
    #8 0x00007f9010aa5e09 in _PyEval_EvalCodeWithName (_co=0x7f900ee08810, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=kwargs@entry=0x7f90070a9388,
    kwcount=0, kwstep=kwstep@entry=1, defs=defs@entry=0x7f900ee0aa20, defcount=defcount@entry=2, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=0x7f900ee07810, qualname=0x7f900ee01c60)
    at Python/ceval.c:3930
    #9 0x00007f90109d96c9 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
    #10 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
    #11 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
    #12 0x00007f9010aa5e09 in _PyEval_EvalCodeWithName (_co=0x7f900ee08780, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=kwargs@entry=0x7f8fcd4301d8,
    kwcount=0, kwstep=kwstep@entry=1, defs=defs@entry=0x7f900ee0b840, defcount=defcount@entry=1, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=0x7f900fa28d50, qualname=0x7f900ee0a4f0)
    at Python/ceval.c:3930
    #13 0x00007f90109d96c9 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
    #14 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
    #15 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
    #16 0x00007f90109ad2cb in function_code_fastcall (co=<optimized out>, args=<optimized out>, nargs=1, globals=<optimized out>) at Objects/call.c:283
    #17 0x00007f90109d97bf in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:415
    #18 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
    #19 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
    #20 0x00007f90109ad2cb in function_code_fastcall (co=co@entry=0x7f9007c98e40, args=<optimized out>, args@entry=0x7ffead4a50e0, nargs=nargs@entry=1, globals=globals@entry=0x7f9007c7eea0)
    at Objects/call.c:283
    #21 0x00007f90109d95ff in _PyFunction_FastCallDict (func=0x7f9007e6f2f0, args=0x7ffead4a50e0, nargs=1, kwargs=0x0) at Objects/call.c:322
    #22 0x00007f9010a3307a in call_unbound_noarg (self=0x7f9003968ba8, func=0x7f9007e6f2f0, unbound=<optimized out>) at Objects/typeobject.c:1493
    #23 call_unbound_noarg (self=0x7f9003968ba8, func=0x7f9007e6f2f0, unbound=1) at Objects/typeobject.c:6645
    #24 slot_tp_finalize (self=0x7f9003968ba8) at Objects/typeobject.c:6658
    #25 0x00007f9010afc2c9 in finalize_garbage (collectable=0x7ffead4a5170) at Modules/gcmodule.c:703
    #26 collect (generation=generation@entry=2, n_collected=n_collected@entry=0x0, n_uncollectable=n_uncollectable@entry=0x0, nofail=nofail@entry=1) at Modules/gcmodule.c:905
    #27 0x00007f9010afcf1d in _PyGC_CollectNoFail () at Modules/gcmodule.c:1605
    #28 0x00007f9010ac3a82 in PyImport_Cleanup () at Python/import.c:526
    #29 0x00007f9010ad0098 in Py_FinalizeEx () at Python/pylifecycle.c:1192
    #30 Py_FinalizeEx () at Python/pylifecycle.c:1117
    #31 0x00007f9010ad0878 in Py_Exit (sts=sts@entry=0) at Python/pylifecycle.c:2250
    #32 0x00007f9010ad9d91 in handle_system_exit () at Python/pythonrun.c:636
    #33 0x00007f9010ada116 in handle_system_exit () at Python/pythonrun.c:588
    #34 PyErr_PrintEx (set_sys_last_vars=set_sys_last_vars@entry=1) at Python/pythonrun.c:646
    #35 0x00007f9010ada35a in PyErr_Print () at Python/pythonrun.c:542
    #36 0x00007f9010af602d in pymain_run_module (modname=<optimized out>, set_argv0=set_argv0@entry=1) at Modules/main.c:322
    #37 0x00007f9010af6374 in pymain_run_python (pymain=pymain@entry=0x7ffead4a5550) at Modules/main.c:2623
    #38 0x00007f9010afb128 in pymain_main (pymain=0x7ffead4a5550) at Modules/main.c:2787
    #39 _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:2822
    #40 0x00007f900fa84715 in __libc_start_main (main=0x400720 <main>, argc=4, ubp_av=0x7ffead4a56a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffead4a5698)
    at libc-start.c:225
    #41 0x0000000000400751 in _start ()
    (gdb) info threads
    Id Target Id Frame
    2 Thread 0x7f9002ef0700 (LWP 1124) "python3.7.1" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
    * 1 Thread 0x7f90112c2700 (LWP 1048) "python3.7.1" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
    (gdb)


    I couldn't understand why my program is hanging. Can you please help me in understanding the above stack trace?










    share|improve this question









    New contributor




    Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I am trying to execute a pytest script as follows:



      python3.7.1 -m pytest test.py


      All the tests from test.py are executed and passed but Python 3.7.1 is hanging indefinitely.



      I have entered into gdb and taken the following backtrace:



      (gdb) bt
      #0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
      #1 0x00007f9010ae5d05 in PyThread_acquire_lock_timed (lock=lock@entry=0x7f8ff4000af0, microseconds=microseconds@entry=-1000000, intr_flag=intr_flag@entry=1) at Python/thread_pthread.h:340
      #2 0x00007f9010b333a4 in acquire_timed (timeout=-1000000000, lock=0x7f8ff4000af0) at ./Modules/_threadmodule.c:61
      #3 lock_PyThread_acquire_lock (self=0x7f9007137f30, args=<optimized out>, kwds=<optimized out>) at ./Modules/_threadmodule.c:144
      #4 0x00007f90109d9c13 in _PyMethodDef_RawFastCallKeywords (method=<optimized out>, self=self@entry=0x7f9007137f30, args=args@entry=0x7f90005741e0, nargs=nargs@entry=2, kwnames=kwnames@entry=0x0)
      at Objects/call.c:690
      #5 0x00007f90109e28fe in _PyMethodDescr_FastCallKeywords (descrobj=0x7f900fa103a8, args=args@entry=0x7f90005741d8, nargs=nargs@entry=3, kwnames=kwnames@entry=0x0) at Objects/descrobject.c:288
      #6 0x00007f90109b6048 in call_function (kwnames=0x0, oparg=3, pp_stack=<synthetic pointer>) at Python/ceval.c:4579
      #7 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
      #8 0x00007f9010aa5e09 in _PyEval_EvalCodeWithName (_co=0x7f900ee08810, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=kwargs@entry=0x7f90070a9388,
      kwcount=0, kwstep=kwstep@entry=1, defs=defs@entry=0x7f900ee0aa20, defcount=defcount@entry=2, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=0x7f900ee07810, qualname=0x7f900ee01c60)
      at Python/ceval.c:3930
      #9 0x00007f90109d96c9 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
      #10 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
      #11 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
      #12 0x00007f9010aa5e09 in _PyEval_EvalCodeWithName (_co=0x7f900ee08780, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=kwargs@entry=0x7f8fcd4301d8,
      kwcount=0, kwstep=kwstep@entry=1, defs=defs@entry=0x7f900ee0b840, defcount=defcount@entry=1, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=0x7f900fa28d50, qualname=0x7f900ee0a4f0)
      at Python/ceval.c:3930
      #13 0x00007f90109d96c9 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
      #14 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
      #15 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
      #16 0x00007f90109ad2cb in function_code_fastcall (co=<optimized out>, args=<optimized out>, nargs=1, globals=<optimized out>) at Objects/call.c:283
      #17 0x00007f90109d97bf in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:415
      #18 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
      #19 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
      #20 0x00007f90109ad2cb in function_code_fastcall (co=co@entry=0x7f9007c98e40, args=<optimized out>, args@entry=0x7ffead4a50e0, nargs=nargs@entry=1, globals=globals@entry=0x7f9007c7eea0)
      at Objects/call.c:283
      #21 0x00007f90109d95ff in _PyFunction_FastCallDict (func=0x7f9007e6f2f0, args=0x7ffead4a50e0, nargs=1, kwargs=0x0) at Objects/call.c:322
      #22 0x00007f9010a3307a in call_unbound_noarg (self=0x7f9003968ba8, func=0x7f9007e6f2f0, unbound=<optimized out>) at Objects/typeobject.c:1493
      #23 call_unbound_noarg (self=0x7f9003968ba8, func=0x7f9007e6f2f0, unbound=1) at Objects/typeobject.c:6645
      #24 slot_tp_finalize (self=0x7f9003968ba8) at Objects/typeobject.c:6658
      #25 0x00007f9010afc2c9 in finalize_garbage (collectable=0x7ffead4a5170) at Modules/gcmodule.c:703
      #26 collect (generation=generation@entry=2, n_collected=n_collected@entry=0x0, n_uncollectable=n_uncollectable@entry=0x0, nofail=nofail@entry=1) at Modules/gcmodule.c:905
      #27 0x00007f9010afcf1d in _PyGC_CollectNoFail () at Modules/gcmodule.c:1605
      #28 0x00007f9010ac3a82 in PyImport_Cleanup () at Python/import.c:526
      #29 0x00007f9010ad0098 in Py_FinalizeEx () at Python/pylifecycle.c:1192
      #30 Py_FinalizeEx () at Python/pylifecycle.c:1117
      #31 0x00007f9010ad0878 in Py_Exit (sts=sts@entry=0) at Python/pylifecycle.c:2250
      #32 0x00007f9010ad9d91 in handle_system_exit () at Python/pythonrun.c:636
      #33 0x00007f9010ada116 in handle_system_exit () at Python/pythonrun.c:588
      #34 PyErr_PrintEx (set_sys_last_vars=set_sys_last_vars@entry=1) at Python/pythonrun.c:646
      #35 0x00007f9010ada35a in PyErr_Print () at Python/pythonrun.c:542
      #36 0x00007f9010af602d in pymain_run_module (modname=<optimized out>, set_argv0=set_argv0@entry=1) at Modules/main.c:322
      #37 0x00007f9010af6374 in pymain_run_python (pymain=pymain@entry=0x7ffead4a5550) at Modules/main.c:2623
      #38 0x00007f9010afb128 in pymain_main (pymain=0x7ffead4a5550) at Modules/main.c:2787
      #39 _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:2822
      #40 0x00007f900fa84715 in __libc_start_main (main=0x400720 <main>, argc=4, ubp_av=0x7ffead4a56a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffead4a5698)
      at libc-start.c:225
      #41 0x0000000000400751 in _start ()
      (gdb) info threads
      Id Target Id Frame
      2 Thread 0x7f9002ef0700 (LWP 1124) "python3.7.1" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
      * 1 Thread 0x7f90112c2700 (LWP 1048) "python3.7.1" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
      (gdb)


      I couldn't understand why my program is hanging. Can you please help me in understanding the above stack trace?










      share|improve this question









      New contributor




      Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I am trying to execute a pytest script as follows:



      python3.7.1 -m pytest test.py


      All the tests from test.py are executed and passed but Python 3.7.1 is hanging indefinitely.



      I have entered into gdb and taken the following backtrace:



      (gdb) bt
      #0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
      #1 0x00007f9010ae5d05 in PyThread_acquire_lock_timed (lock=lock@entry=0x7f8ff4000af0, microseconds=microseconds@entry=-1000000, intr_flag=intr_flag@entry=1) at Python/thread_pthread.h:340
      #2 0x00007f9010b333a4 in acquire_timed (timeout=-1000000000, lock=0x7f8ff4000af0) at ./Modules/_threadmodule.c:61
      #3 lock_PyThread_acquire_lock (self=0x7f9007137f30, args=<optimized out>, kwds=<optimized out>) at ./Modules/_threadmodule.c:144
      #4 0x00007f90109d9c13 in _PyMethodDef_RawFastCallKeywords (method=<optimized out>, self=self@entry=0x7f9007137f30, args=args@entry=0x7f90005741e0, nargs=nargs@entry=2, kwnames=kwnames@entry=0x0)
      at Objects/call.c:690
      #5 0x00007f90109e28fe in _PyMethodDescr_FastCallKeywords (descrobj=0x7f900fa103a8, args=args@entry=0x7f90005741d8, nargs=nargs@entry=3, kwnames=kwnames@entry=0x0) at Objects/descrobject.c:288
      #6 0x00007f90109b6048 in call_function (kwnames=0x0, oparg=3, pp_stack=<synthetic pointer>) at Python/ceval.c:4579
      #7 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
      #8 0x00007f9010aa5e09 in _PyEval_EvalCodeWithName (_co=0x7f900ee08810, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=kwargs@entry=0x7f90070a9388,
      kwcount=0, kwstep=kwstep@entry=1, defs=defs@entry=0x7f900ee0aa20, defcount=defcount@entry=2, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=0x7f900ee07810, qualname=0x7f900ee01c60)
      at Python/ceval.c:3930
      #9 0x00007f90109d96c9 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
      #10 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
      #11 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
      #12 0x00007f9010aa5e09 in _PyEval_EvalCodeWithName (_co=0x7f900ee08780, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=kwargs@entry=0x7f8fcd4301d8,
      kwcount=0, kwstep=kwstep@entry=1, defs=defs@entry=0x7f900ee0b840, defcount=defcount@entry=1, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=0x7f900fa28d50, qualname=0x7f900ee0a4f0)
      at Python/ceval.c:3930
      #13 0x00007f90109d96c9 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
      #14 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
      #15 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
      #16 0x00007f90109ad2cb in function_code_fastcall (co=<optimized out>, args=<optimized out>, nargs=1, globals=<optimized out>) at Objects/call.c:283
      #17 0x00007f90109d97bf in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:415
      #18 0x00007f90109b6816 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4602
      #19 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3110
      #20 0x00007f90109ad2cb in function_code_fastcall (co=co@entry=0x7f9007c98e40, args=<optimized out>, args@entry=0x7ffead4a50e0, nargs=nargs@entry=1, globals=globals@entry=0x7f9007c7eea0)
      at Objects/call.c:283
      #21 0x00007f90109d95ff in _PyFunction_FastCallDict (func=0x7f9007e6f2f0, args=0x7ffead4a50e0, nargs=1, kwargs=0x0) at Objects/call.c:322
      #22 0x00007f9010a3307a in call_unbound_noarg (self=0x7f9003968ba8, func=0x7f9007e6f2f0, unbound=<optimized out>) at Objects/typeobject.c:1493
      #23 call_unbound_noarg (self=0x7f9003968ba8, func=0x7f9007e6f2f0, unbound=1) at Objects/typeobject.c:6645
      #24 slot_tp_finalize (self=0x7f9003968ba8) at Objects/typeobject.c:6658
      #25 0x00007f9010afc2c9 in finalize_garbage (collectable=0x7ffead4a5170) at Modules/gcmodule.c:703
      #26 collect (generation=generation@entry=2, n_collected=n_collected@entry=0x0, n_uncollectable=n_uncollectable@entry=0x0, nofail=nofail@entry=1) at Modules/gcmodule.c:905
      #27 0x00007f9010afcf1d in _PyGC_CollectNoFail () at Modules/gcmodule.c:1605
      #28 0x00007f9010ac3a82 in PyImport_Cleanup () at Python/import.c:526
      #29 0x00007f9010ad0098 in Py_FinalizeEx () at Python/pylifecycle.c:1192
      #30 Py_FinalizeEx () at Python/pylifecycle.c:1117
      #31 0x00007f9010ad0878 in Py_Exit (sts=sts@entry=0) at Python/pylifecycle.c:2250
      #32 0x00007f9010ad9d91 in handle_system_exit () at Python/pythonrun.c:636
      #33 0x00007f9010ada116 in handle_system_exit () at Python/pythonrun.c:588
      #34 PyErr_PrintEx (set_sys_last_vars=set_sys_last_vars@entry=1) at Python/pythonrun.c:646
      #35 0x00007f9010ada35a in PyErr_Print () at Python/pythonrun.c:542
      #36 0x00007f9010af602d in pymain_run_module (modname=<optimized out>, set_argv0=set_argv0@entry=1) at Modules/main.c:322
      #37 0x00007f9010af6374 in pymain_run_python (pymain=pymain@entry=0x7ffead4a5550) at Modules/main.c:2623
      #38 0x00007f9010afb128 in pymain_main (pymain=0x7ffead4a5550) at Modules/main.c:2787
      #39 _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:2822
      #40 0x00007f900fa84715 in __libc_start_main (main=0x400720 <main>, argc=4, ubp_av=0x7ffead4a56a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffead4a5698)
      at libc-start.c:225
      #41 0x0000000000400751 in _start ()
      (gdb) info threads
      Id Target Id Frame
      2 Thread 0x7f9002ef0700 (LWP 1124) "python3.7.1" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
      * 1 Thread 0x7f90112c2700 (LWP 1048) "python3.7.1" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
      (gdb)


      I couldn't understand why my program is hanging. Can you please help me in understanding the above stack trace?







      python3






      share|improve this question









      New contributor




      Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 22 hours ago









      Anaksunaman

      5,92321423




      5,92321423






      New contributor




      Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      Amresh SajjanshettyAmresh Sajjanshetty

      1




      1




      New contributor




      Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Amresh Sajjanshetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Amresh Sajjanshetty is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1429230%2fpython-3-7-1-is-hung%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Amresh Sajjanshetty is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Amresh Sajjanshetty is a new contributor. Be nice, and check out our Code of Conduct.













          Amresh Sajjanshetty is a new contributor. Be nice, and check out our Code of Conduct.












          Amresh Sajjanshetty is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1429230%2fpython-3-7-1-is-hung%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

          looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...