Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
As with issue-112, this is for the node-like ref'd events loop timers, not the standards-compliants that were written in C++.
Version: 398f2ed
Branch: wes/issue-113-repro
Repro: echo 'setTimeout(()=>1)' | ../../pmjs -i
Reading symbols from /usr/lib/debug/.build-id/a6/73a1e2b7a7287c1908dec1a748642e2c02392d.debug...
(gdb) run ../../pmjs
Starting program: /home/wes/.cache/pypoetry/virtualenvs/pythonmonkey-NiDIb4WW-py3.10/bin/python ../../pmjs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3dff640 (LWP 1073158)]
[Thread 0x7ffff3dff640 (LWP 1073158) exited]
[New Thread 0x7ffff35fe640 (LWP 1073159)]
[New Thread 0x7ffff33ff640 (LWP 1073160)]
[New Thread 0x7ffff3200640 (LWP 1073161)]
[New Thread 0x7ffff3001640 (LWP 1073162)]
[New Thread 0x7ffff2e02640 (LWP 1073163)]
[New Thread 0x7ffff2c03640 (LWP 1073164)]
[New Thread 0x7ffff2a04640 (LWP 1073165)]
[New Thread 0x7ffff2805640 (LWP 1073166)]
Welcome to PythonMonkey v0.0.1.dev1058+116e777.
Type ".help" for more information.
> setTimeout(()=>1)
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007ffff66faf6a in JS::Rooted<JS::Value>::~Rooted (this=0x7fffffffd4b8, __in_chrg=<optimized out>) at /usr/local/include/mozjs-102/js/RootingAPI.h:1192
1192 MOZ_ASSERT(*this->stack == this);
(gdb) bt
#0 0x00007ffff66faf6a in JS::Rooted<JS::Value>::~Rooted (this=0x7fffffffd4b8, __in_chrg=<optimized out>) at /usr/local/include/mozjs-102/js/RootingAPI.h:1192
#1 idToKey (cx=<optimized out>, id=...) at /home/wes/git/PythonMonkey/src/PyProxyHandler.cc:37
#2 0x00007fffffffd558 in ?? ()
#3 0x00007ffff43a79dc in js::GetOwnPropertyDescriptorToArray(JSContext*, unsigned int, JS::Value*) () from /home/wes/git/PythonMonkey/python/pythonmonkey/libmozjs-102.so
#4 0x00007ffff4355ed9 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) ()
from /home/wes/git/PythonMonkey/python/pythonmonkey/libmozjs-102.so
#5 0x00007ffff43501a4 in Interpret(JSContext*, js::RunState&) () from /home/wes/git/PythonMonkey/python/pythonmonkey/libmozjs-102.so
#6 0x00007ffff434731a in js::RunScript(JSContext*, js::RunState&) () from /home/wes/git/PythonMonkey/python/pythonmonkey/libmozjs-102.so
#7 0x00007ffff43561cf in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) ()
from /home/wes/git/PythonMonkey/python/pythonmonkey/libmozjs-102.so
#8 0x00007ffff4356817 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) ()
from /home/wes/git/PythonMonkey/python/pythonmonkey/libmozjs-102.so
#9 0x00007ffff43edeb7 in JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) ()
from /home/wes/git/PythonMonkey/python/pythonmonkey/libmozjs-102.so
#10 0x00007ffff6704df8 in callJSFunc (jsCxThisFuncTuple=<optimized out>, args=<optimized out>) at /usr/local/include/mozjs-102/js/RootingAPI.h:1216
#11 0x00005555556b0cc8 in cfunction_call (func=<built-in method JSFunctionCallable of tuple object at remote 0x7ffff2440b40>, args=<optimized out>, kwargs=<optimized out>)
at ../Objects/methodobject.c:552
#12 0x00005555556a772b in _PyObject_MakeTpCall (tstate=0x555555b5bf80, callable=<built-in method JSFunctionCallable of tuple object at remote 0x7ffff2440b40>, args=<optimized out>,
nargs=<optimized out>, keywords=0x0) at ../Objects/call.c:215
#13 0x00005555556a00e7 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=<optimized out>,
callable=<built-in method JSFunctionCallable of tuple object at remote 0x7ffff2440b40>, tstate=<optimized out>) at ../Include/cpython/abstract.h:112
#14 _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x555555e97948, callable=<built-in method JSFunctionCallable of tuple object at remote 0x7ffff2440b40>,
tstate=<optimized out>) at ../Include/cpython/abstract.h:99
#15 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x555555e97948, callable=<built-in method JSFunctionCallable of tuple object at remote 0x7ffff2440b40>)
at ../Include/cpython/abstract.h:123
#16 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7fffffffdf80, tstate=<optimized out>) at ../Python/ceval.c:5891
#17 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:4181
#18 0x00005555556b14ec in _PyEval_EvalFrame (throwflag=0,
f=Frame 0x555555e97770, for file /home/wes/git/PythonMonkey/tests/js/../../pmjs, line 236, in repl (save_history=<function at remote 0x7ffff2429ea0>, atexit=<module at remote 0x7ffff6944f40>, sigint_handler=<function at remote 0x7ffff2429fc0>), tstate=0x555555b5bf80) at ../Include/internal/pycore_ceval.h:46
#19 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, con=0x7ffff6c65eb0, tstate=0x555555b5bf80) at ../Python/ceval.c:5065
#20 _PyFunction_Vectorcall (func=<function at remote 0x7ffff6c65ea0>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at ../Objects/call.c:342
#21 0x0000555555699a1d in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x555555f03280, callable=<function at remote 0x7ffff6c65ea0>, tstate=0x555555b5bf80)
at ../Include/cpython/abstract.h:114
#22 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x555555f03280, callable=<function at remote 0x7ffff6c65ea0>) at ../Include/cpython/abstract.h:123
#23 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7fffffffe150, tstate=<optimized out>) at ../Python/ceval.c:5891
#24 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:4213
#25 0x00005555556b14ec in _PyEval_EvalFrame (throwflag=0,
f=Frame 0x555555f03090, for file /home/wes/git/PythonMonkey/tests/js/../../pmjs, line 371, in main (ela={'enqueueWithDelay': <function at remote 0x7ffff2429750>, 'enqueue': <function at remote 0x7ffff2429900>, 'cancelTimer': <function at remote 0x7ffff2429990>, 'getLoop': <function at remote 0x7ffff2429a20>, 'setLoop': <function at remote 0x7ffff2429ab0>, 'makeLoop': <function at remote 0x7ffff2429b40>, 'endLoop': <function at remote 0x7ffff2429bd0>}, loop=<_UnixSelectorEventLoop(_timer_cancelled_count=0, _closed=False, _stopping=False, _ready=<collections.deque at remote 0x7ffff243a4a0>, _scheduled=[], _default_executor=None, _internal_fds=1, _thread_id=None, _clock_resolution=<float at remote 0x7ffff25beaf0>, _exception_handler=None, _debug=False, slow_callback_duration=<float at remote 0x7ffff6dfdb70>, _current_handle=None, _task_factory=None, _coroutine_origin_tracking_enabled=False, _coroutine_origin_tracking_saved_depth=None, _asyncgens=<WeakSet(data=set(), _remove=<function at remote 0x7ffff2429cf0>, _pe...(truncated), tstate=0x555555b5bf80) at ../Include/internal/pycore_ceval.h:46
--Type <RET> for more, q to quit, c to continue without paging--
#26 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, con=0x7ffff2429640, tstate=0x555555b5bf80) at ../Python/ceval.c:5065
#27 _PyFunction_Vectorcall (func=<function at remote 0x7ffff2429630>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at ../Objects/call.c:342
#28 0x0000555555699a1d in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7ffff6d29da8, callable=<function at remote 0x7ffff2429630>, tstate=0x555555b5bf80)
at ../Include/cpython/abstract.h:114
#29 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7ffff6d29da8, callable=<function at remote 0x7ffff2429630>) at ../Include/cpython/abstract.h:123
#30 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7fffffffe320, tstate=<optimized out>) at ../Python/ceval.c:5891
#31 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:4213
#32 0x0000555555696176 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7ffff6d29c40, for file /home/wes/git/PythonMonkey/tests/js/../../pmjs, line 374, in <module> (),
tstate=0x555555b5bf80) at ../Include/internal/pycore_ceval.h:46
#33 _PyEval_Vector (tstate=0x555555b5bf80, con=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>)
at ../Python/ceval.c:5065
#34 0x000055555578bc56 in PyEval_EvalCode (co=<code at remote 0x7ffff6c9f680>,
globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/wes/git/PythonMonkey/tests/js/../../pmjs') at remote 0x7ffff6c01090>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff6d905e0>, '__file__': '/home/wes/git/PythonMonkey/tests/js/../../pmjs', '__cached__': None, 'sys': <module at remote 0x7ffff6d7e250>, 'os': <module at remote 0x7ffff6c24720>, 'readline': <module at remote 0x7ffff6ccd990>, 'signal': <module at remote 0x7ffff6cce7f0>, 'getopt': <module at remote 0x7ffff6ccea70>, 'asyncio': <module at remote 0x7ffff6add940>, 'pm': <module at remote 0x7ffff6b0cfe0>, 'globalThis': {}, 'evalOptions': {'strict': False}, 'requirePath': False, 'repl': <function at remote 0x7ffff6c65ea0>, 'usage': <function at remote 0x7ffff2429480>, 'initGlobalThis': <function at remote 0x7ffff24295a0>, 'main': <function at remote 0x7ffff2429630>}, locals=<optimized out>) at ../Python/ceval.c:1134
#35 0x00005555557b8b18 in run_eval_code_obj (tstate=0x555555b5bf80, co=0x7ffff6c9f680,
globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/wes/git/PythonMonkey/tests/js/../../pmjs') at remote 0x7ffff6c01090>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff6d905e0>, '__file__': '/home/wes/git/PythonMonkey/tests/js/../../pmjs', '__cached__': None, 'sys': <module at remote 0x7ffff6d7e250>, 'os': <module at remote 0x7ffff6c24720>, 'readline': <module at remote 0x7ffff6ccd990>, 'signal': <module at remote 0x7ffff6cce7f0>, 'getopt': <module at remote 0x7ffff6ccea70>, 'asyncio': <module at remote 0x7ffff6add940>, 'pm': <module at remote 0x7ffff6b0cfe0>, 'globalThis': {}, 'evalOptions': {'strict': False}, 'requirePath': False, 'repl': <function at remote 0x7ffff6c65ea0>, 'usage': <function at remote 0x7ffff2429480>, 'initGlobalThis': <function at remote 0x7ffff24295a0>, 'main': <function at remote 0x7ffff2429630>},
locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/wes/git/PythonMonkey/tests/js/../../pmjs') at remote 0x7ffff6c01090>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff6d905e0>, '__file__': '/home/wes/git/PythonMonkey/tests/js/../../pmjs', '__cached__': None, 'sys': <module at remote 0x7ffff6d7e250>, 'os': <module at remote 0x7ffff6c24720>, 'readline': <module at remote 0x7ffff6ccd990>, 'signal': <module at remote 0x7ffff6cce7f0>, 'getopt': <module at remote 0x7ffff6ccea70>, 'asyncio': <module at remote 0x7ffff6add940>, 'pm': <module at remote 0x7ffff6b0cfe0>, 'globalThis': {}, 'evalOptions': {'strict': False}, 'requirePath': False, 'repl': <function at remote 0x7ffff6c65ea0>, 'usage': <function at remote 0x7ffff2429480>, 'initGlobalThis': <function at remote 0x7ffff24295a0>, 'main': <function at remote 0x7ffff2429630>}) at ../Python/pythonrun.c:1291
#36 0x00005555557b196b in run_mod (mod=<optimized out>, filename=<optimized out>,
globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/wes/git/PythonMonkey/tests/js/../../pmjs') at remote 0x7ffff6c01090>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff6d905e0>, '__file__': '/home/wes/git/PythonMonkey/tests/js/../../pmjs', '__cached__': None, 'sys': <module at remote 0x7ffff6d7e250>, 'os': <module at remote 0x7ffff6c24720>, 'readline': <module at remote 0x7ffff6ccd990>, 'signal': <module at remote 0x7ffff6cce7f0>, 'getopt': <module at remote 0x7ffff6ccea70>, 'asyncio': <module at remote 0x7ffff6add940>, 'pm': <module at remote 0x7ffff6b0cfe0>, 'globalThis': {}, 'evalOptions': {'strict': False}, 'requirePath': False, 'repl': <function at remote 0x7ffff6c65ea0>, 'usage': <function at remote 0x7ffff2429480>, 'initGlobalThis': <function at remote 0x7ffff24295a0>, 'main': <function at remote 0x7ffff2429630>},
locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/wes/git/PythonMonkey/tests/js/../../pmjs') at remote 0x7ffff6c01090>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff6d905e0>, '__file__': '/home/wes/git/PythonMonkey/tests/js/../../pmjs', '__cached__': None, 'sys': <module at remote 0x7ffff6d7e250>, 'os': <module at remote 0x7ffff6c24720>, 'readline': <module at remote 0x7ffff6ccd990>, 'signal': <module at remote 0x7ffff6cce7f0>, 'getopt': <module at remote 0x7ffff6ccea70>, 'asyncio': <module at remote 0x7ffff6add940>, 'pm': <module at remote 0x7ffff6b0cfe0>, 'globalThis': {}, 'evalOptions': {'strict': False}, 'requirePath': False, 'repl': <function at remote 0x7ffff6c65ea0>, 'usage': <function at remote 0x7ffff2429480>, 'initGlobalThis': <function at remote 0x7ffff24295a0>, 'main': <function at remote 0x7ffff2429630>}, flags=<optimized out>, arena=<optimized out>) at ../Python/pythonrun.c:1312
--Type <RET> for more, q to quit, c to continue without paging--
#37 0x00005555557b8865 in pyrun_file (fp=fp@entry=0x555555b5e350, filename=filename@entry='/home/wes/git/PythonMonkey/tests/js/../../pmjs', start=start@entry=257,
globals=globals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/wes/git/PythonMonkey/tests/js/../../pmjs') at remote 0x7ffff6c01090>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff6d905e0>, '__file__': '/home/wes/git/PythonMonkey/tests/js/../../pmjs', '__cached__': None, 'sys': <module at remote 0x7ffff6d7e250>, 'os': <module at remote 0x7ffff6c24720>, 'readline': <module at remote 0x7ffff6ccd990>, 'signal': <module at remote 0x7ffff6cce7f0>, 'getopt': <module at remote 0x7ffff6ccea70>, 'asyncio': <module at remote 0x7ffff6add940>, 'pm': <module at remote 0x7ffff6b0cfe0>, 'globalThis': {}, 'evalOptions': {'strict': False}, 'requirePath': False, 'repl': <function at remote 0x7ffff6c65ea0>, 'usage': <function at remote 0x7ffff2429480>, 'initGlobalThis': <function at remote 0x7ffff24295a0>, 'main': <function at remote 0x7ffff2429630>},
locals=locals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/home/wes/git/PythonMonkey/tests/js/../../pmjs') at remote 0x7ffff6c01090>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff6d905e0>, '__file__': '/home/wes/git/PythonMonkey/tests/js/../../pmjs', '__cached__': None, 'sys': <module at remote 0x7ffff6d7e250>, 'os': <module at remote 0x7ffff6c24720>, 'readline': <module at remote 0x7ffff6ccd990>, 'signal': <module at remote 0x7ffff6cce7f0>, 'getopt': <module at remote 0x7ffff6ccea70>, 'asyncio': <module at remote 0x7ffff6add940>, 'pm': <module at remote 0x7ffff6b0cfe0>, 'globalThis': {}, 'evalOptions': {'strict': False}, 'requirePath': False, 'repl': <function at remote 0x7ffff6c65ea0>, 'usage': <function at remote 0x7ffff2429480>, 'initGlobalThis': <function at remote 0x7ffff24295a0>, 'main': <function at remote 0x7ffff2429630>}, closeit=closeit@entry=1, flags=0x7fffffffe5c8) at ../Python/pythonrun.c:1208
#38 0x00005555557b7d48 in _PyRun_SimpleFileObject (fp=0x555555b5e350, filename='/home/wes/git/PythonMonkey/tests/js/../../pmjs', closeit=1, flags=0x7fffffffe5c8)
at ../Python/pythonrun.c:456
#39 0x00005555557b7a43 in _PyRun_AnyFileObject (fp=0x555555b5e350, filename='/home/wes/git/PythonMonkey/tests/js/../../pmjs', closeit=1, flags=0x7fffffffe5c8)
at ../Python/pythonrun.c:90
#40 0x00005555557a8c3e in pymain_run_file_obj (skip_source_first_line=0, filename='/home/wes/git/PythonMonkey/tests/js/../../pmjs',
program_name='/home/wes/.cache/pypoetry/virtualenvs/pythonmonkey-NiDIb4WW-py3.10/bin/python') at ../Modules/main.c:353
#41 pymain_run_file (config=0x555555b40400) at ../Modules/main.c:372
#42 pymain_run_python (exitcode=0x7fffffffe5c4) at ../Modules/main.c:587
#43 Py_RunMain () at ../Modules/main.c:666
#44 0x000055555577ebcd in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at ../Modules/main.c:720
#45 0x00007ffff7c29d90 in __libc_start_call_main (main=main@entry=0x55555577eb90 <main>, argc=argc@entry=2, argv=argv@entry=0x7fffffffe7d8) at ../sysdeps/nptl/libc_start_call_main.h:58
#46 0x00007ffff7c29e40 in __libc_start_main_impl (main=0x55555577eb90 <main>, argc=2, argv=0x7fffffffe7d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffffffe7c8) at ../csu/libc-start.c:392
#47 0x000055555577eac5 in _start ()
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7ffff7e73000 (LWP 1073155) "python" 0x00007ffff66faf6a in JS::Rooted<JS::Value>::~Rooted (this=0x7fffffffd4b8, __in_chrg=<optimized out>)
at /usr/local/include/mozjs-102/js/RootingAPI.h:1192
3 Thread 0x7ffff35fe640 (LWP 1073159) "JS Helper" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555d33ed0)
at ./nptl/futex-internal.c:57
4 Thread 0x7ffff33ff640 (LWP 1073160) "JS Helper" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555d33ed0)
at ./nptl/futex-internal.c:57
5 Thread 0x7ffff3200640 (LWP 1073161) "JS Helper" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555d33ed0)
at ./nptl/futex-internal.c:57
6 Thread 0x7ffff3001640 (LWP 1073162) "JS Helper" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555d33ed0)
at ./nptl/futex-internal.c:57
7 Thread 0x7ffff2e02640 (LWP 1073163) "JS Helper" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555d33ed0)
at ./nptl/futex-internal.c:57
8 Thread 0x7ffff2c03640 (LWP 1073164) "JS Helper" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555d33ed0)
at ./nptl/futex-internal.c:57
9 Thread 0x7ffff2a04640 (LWP 1073165) "JS Helper" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555d33ed0)
at ./nptl/futex-internal.c:57
10 Thread 0x7ffff2805640 (LWP 1073166) "JS Helper" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555d33ed0)
at ./nptl/futex-internal.c:57
(gdb)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity