cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | the pypy angle is to shrug and copy the implementation of CPython as closely as possible, and staying out of design decisions
pbsds has quit [Quit: The Lounge - https://thelounge.chat]
pbsds has joined #pypy
dustinm has quit [Quit: Leaving]
dustinm has joined #pypy
Techcable has quit [Ping timeout: 245 seconds]
needshelp has joined #pypy
<needshelp> I'm encountering a problem with debbuging django 3.2 with pypy3.7
<needshelp> using vscode
<needshelp> RPython traceback: File "pypy_interpreter.c", line 46977, in BuiltinCode3_fastcall_3 File "pypy_interpreter_2.c", line 64234, in GetSetProperty_descr_property_get File "implement_3.c", line 22686, in descr_typecheck_fget_f_back File "rpython_jit_metainterp.c", line 1531, in force_virtual Traceback (most recent call last): File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023
needshelp has left #pypy [#pypy]
needshelp has joined #pypy
<needshelp> RPython traceback:
<needshelp>   File "pypy_interpreter.c", line 46977, in BuiltinCode3_fastcall_3
<needshelp>   File "pypy_interpreter_2.c", line 64234, in GetSetProperty_descr_property_get
<needshelp>   File "implement_3.c", line 22686, in descr_typecheck_fget_f_back
<needshelp>   File "rpython_jit_metainterp.c", line 1531, in force_virtual
<needshelp> Traceback (most recent call last):
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 252, in _on_run
<needshelp>     self.process_net_command_json(self.py_db, json_contents)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py", line 193, in process_net_command_json
<needshelp>     cmd = on_request(py_db, request)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py", line 806, in on_setbreakpoints_request
<needshelp>     suspend_policy, hit_condition, is_logpoint, adjust_line=True, on_changed_breakpoint_state=on_changed_breakpoint_state)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py", line 568, in add_breakpoint
<needshelp>     py_db.on_breakpoints_changed()
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1126, in on_breakpoints_changed
<needshelp>     self.set_tracing_for_untraced_contexts()
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1157, in set_tracing_for_untraced_contexts
<needshelp>     self.set_trace_for_frame_and_parents(frame)
<fijal> needshelp: this is pretty bad
<fijal> do you have a reproducer? it's ok if it's kinda large
<fijal> but also, how new is your pypy?
<needshelp> what do you mean?
<needshelp> my pypy is version 3.7 on django 3.2
<needshelp> application
<needshelp> I haven't had this issue before in my project, for some reason it started to occur yesterday, we aren't able to debug
<needshelp> we thought it vscode related with their debbuger, we tried many version and it continues to occur
<cfbolz> needshelp: that's a very old pypy version in any case
<needshelp> well its legacy project, updating it will cost alot, big monolithic application with many dependencies, will take alot of effort to update
<needshelp> It just recently started to occur, we had no problem debugging our project, i'm not sure its related to any changes in our application code, because the error it pypy and debugging attachment error, the application itself works fine
<cfbolz> that is fair, I understand that
<cfbolz> what is the application doing?
<needshelp> its a robust django application on django version 3.2
<cfbolz> can you please print the full version string of that pypy?
<cfbolz> (I am going on about the version because it's entirely possible that we already fixed the bug in the meantime)
<needshelp> Python 3.7.12 (44db26267d0a, Oct 24 2021, 14:21:50)
<needshelp> [PyPy 7.3.7 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
<cfbolz> you could try 7.3.9 at least, our last version with 3.7 support
<needshelp> I can try that atleast, though was there any fixes regarding a simillar error?
<cfbolz> I don't remember, honestly
<cfbolz> definitely changes to the JIT
<cfbolz> (this looks like a JIT related problem)
<cfbolz> the other thing that would help me to debug this is coming up with a self-contained example that I can run locally somehow
<needshelp> I will try updating  to 7.3.9 , finger crossed
<needshelp> i'll update you , thanks ♥
<cfbolz> does debugging some trivial python file work for example?
<needshelp> one sec i'll try
<needshelp> newly script file it works
<needshelp> error does not occur
<cfbolz> ok. yeah, it probably only occurs when you try to debug code that is executing in the jit
<needshelp> I don't know how can it be, but i can try cerate reverted branch few commits before the error occured, soundsly unlikely but worth a shot
<needshelp> well it seems it isn't related to our case, i've tried to switch to a branch a month ago, where it didn't occur, but some reason it occurs now,
<needshelp> i'll go back to the plan of updating pypy to 7.3.9
<cfbolz> ok
<cfbolz> it's very likely that it's an update in vscode that caused this
<cfbolz> I mean, a change in vscode triggers the existing bug in pypy (not that vscode is to blame)
<fijal> cfbolz: this does look like an error forcing a virtual while forcing a debugger right?
<cfbolz> yes, I think so too
<cfbolz> needshelp: are there threads involved in this?
<cfbolz> (it's possible that the vscode debugging stub uses threads, so even if they aren't in your app)
<needshelp> well django is by default runns with multiple threads
<needshelp> and probably vscode as well
<needshelp> I tried installing older version of python debugger for vscode, it didn't seems to solve the problem, might be vscode version itself?
<fijal> cfbolz: what it does is to enumerate all the threads and all the frames in each thread and add a tracing hook
<fijal> even if it does not do a crash, that seems like something we should have in a test
<cfbolz> yeah
<fijal> I'm probably too lazy, but I would absolutely run the tests of this package with some low threshold
<fijal> it does a bunch of very insane stuff, which is not an excuse to segfault, maybe
<cfbolz> it seems to be pure python if not on cpython though, right?
<needshelp> i've updated my pypy version to this
<needshelp> Python 3.7.13 (7e0ae751533460d5f89f3ac48ce366d8642d1db5, Mar 29 2022, 06:03:31)
<needshelp> [PyPy 7.3.9 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
<needshelp> problem still occurs
<fijal> cfbolz: yeah, but it does all kinds of weird tricks
<needshelp> eyup i'm out of options
<needshelp> I'll try to see if another IDE solves the problem
<needshelp> maybe it is related to vscode itself
<cfbolz> needshelp: it very likely is a combination of vscode debugging and a pypy bug
<fijal> vscode tries to add a tracing function to everything
<fijal> (every thread and every frame)
<fijal> that is likely causing some pypy JIT bug
<fijal> you can probably avoid the bug by running with --jit off when debugging
<fijal> not ideal, but might work for now
<needshelp> i've downgraded vscode itself to an older version it seems to solve the issue
<needshelp> So the latest version of vscode is causing this problem it seems
<needshelp> I've disabled the auto update of vscode until there will be an hotfix for this,
<needshelp> I think this needs to be issues both with pypy and vscode
<needshelp> thanks alot
<fijal> probably just with pypy, tbh
<needshelp> I was to optimistic, the problem still occur
<needshelp> here is more extensive error for my including a scenario using login/ router of django
<needshelp> RPython traceback:
<needshelp>   File "pypy_interpreter.c", line 46977, in BuiltinCode3_fastcall_3
<needshelp>   File "pypy_interpreter_2.c", line 64234, in GetSetProperty_descr_property_get
<needshelp>   File "implement_3.c", line 22686, in descr_typecheck_fget_f_back
<needshelp>   File "rpython_jit_metainterp.c", line 1531, in force_virtual
<needshelp> Traceback (most recent call last):
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py", line 978, in trace_dispatch
<needshelp>     suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL",
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py", line 162, in set_suspend
<needshelp>     self._args[0].set_suspend(*args, **kwargs)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1892, in set_suspend
<needshelp>     suspend_all_threads(self, except_thread=thread)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py", line 94, in suspend_all_threads
<needshelp>     py_db.set_trace_for_frame_and_parents(frame)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2250, in set_trace_for_frame_and_parents
<needshelp>     frame = frame.f_back
<needshelp> Traceback (most recent call last):
<needshelp>     if 'challenge_device' in self.request.POST:
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py", line 978, in trace_dispatch
<needshelp>     suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL",
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py", line 162, in set_suspend
<needshelp>     self._args[0].set_suspend(*args, **kwargs)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1892, in set_suspend
<needshelp>     suspend_all_threads(self, except_thread=thread)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py", line 94, in suspend_all_threads
<needshelp>     py_db.set_trace_for_frame_and_parents(frame)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2250, in set_trace_for_frame_and_parents
<needshelp>     frame = frame.f_back
<needshelp> SystemError: unexpected internal exception (please report a bug): <InvalidVirtualRef object at 0x7f76e7f209e8>; internal traceback was dumped to stderr
<needshelp> Internal Server Error: /login
<needshelp> Traceback (most recent call last):
<needshelp>   File "/home/my-pc/company/my-project/django-3.2-env/site-packages/django/core/handlers/exception.py", line 47, in inner
<needshelp>     response = get_response(request)
<needshelp>   File "/home/my-pc/company/my-project/django-3.2-env/site-packages/django/core/handlers/base.py", line 181, in _get_response
<needshelp>     response = wrapped_callback(request, *callback_args, **callback_kwargs)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py", line 162, in set_suspend
<needshelp>     self._args[0].set_suspend(*args, **kwargs)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1892, in set_suspend
<needshelp>     suspend_all_threads(self, except_thread=thread)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py", line 94, in suspend_all_threads
<needshelp>     py_db.set_trace_for_frame_and_parents(frame)
<needshelp>   File "/home/my-pc/.vscode-server/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2250, in set_trace_for_frame_and_parents
<needshelp>     frame = frame.f_back
<needshelp> SystemError: unexpected internal exception (please report a bug): <InvalidVirtualRef object at 0x7f76e7f209e8>; internal traceback was dumped to stderr
<sam_> please do big pastes on a pastebin
<needshelp> sorry, here is the error traceback: https://pastebin.com/L7Y8UhrE
needshelp has quit [Quit: Client closed]
<fijal> heh, hard to respond
sugarbeet has quit [Ping timeout: 246 seconds]
sugarbeet has joined #pypy
needshelp has joined #pypy
<needshelp> In the meantime we'll switch to a different IDE, PyCharm seems to not replicate the issue
sugarbeet has quit [Ping timeout: 245 seconds]
sugarbeet has joined #pypy
[Arfrever] has quit [Killed (NickServ (GHOST command used by [Arfreve1]))]
[Arfrever] has joined #pypy
Dejan has joined #pypy
<mattip> might be worth filing an issue with VSCode if debugging with PyCharm does not replicate the problem
<mattip> even though the bug is with PyPy, the VSCode people might know how to whittle it down to a reproducer
<mattip> the traceback even requests it "unexpected internal exception (please report a bug)" (although they might have meant "report a bug to PyPy's IRC feed")
<cfbolz> this exception comes from pypy
<needshelp> Ah yes ofc that what they meant
<cfbolz> so they = us
<cfbolz> needshelp: can you in any case please file an issue with the information you provided here in the chat, so we don't lose track of this problem completely? https://foss.heptapod.net/pypy/pypy/-/issues
<needshelp> Yea sure
needshelp has quit [Read error: Connection reset by peer]
needshelp has joined #pypy
<mattip> cfbolz: right, but I have had success with getting cooperation from projects to figure out a reproducer
<cfbolz> right
needshelp has quit [Remote host closed the connection]
needshelp has joined #pypy
needshelp has quit [Remote host closed the connection]
needshelp has joined #pypy
needshelp has quit [Client Quit]
needshelp has joined #pypy
needshelp has quit [Read error: Connection reset by peer]
needshelp has joined #pypy
needshelp has quit [Read error: Connection reset by peer]
needshelp has joined #pypy
needshelp has quit [Read error: Connection reset by peer]
needshelp has joined #pypy
Dejan has quit [Quit: Leaving]
nimaje has quit [Remote host closed the connection]
nimaje has joined #pypy