Skip to content

Conversation

@xcguang
Copy link

@xcguang xcguang commented Oct 4, 2019

  • If enable MICROPY_DEBUG_VERBOSE, mp_thread_mutex_lock(&MP_STATE_VM(gil_mutex), 1) and mp_thread_mutex_unlock(&MP_STATE_VM(gil_mutex)) were called before mp_thread_mutex_init(&MP_STATE_VM(gil_mutex)).

- If enable `MICROPY_DEBUG_VERBOSE`, `mp_thread_mutex_lock(&MP_STATE_VM(gil_mutex), 1)` and `mp_thread_mutex_unlock(&MP_STATE_VM(gil_mutex))` were called before `mp_thread_mutex_init(&MP_STATE_VM(gil_mutex))`.
@dpgeorge
Copy link
Member

dpgeorge commented Oct 8, 2019

IMO this is not the right way to fix the issue, because the GC should not be initialising and acquiring the GIL. I think it should be up to the ports to make sure they don't crash on debug printing.

@dpgeorge dpgeorge added the py-core Relates to py/ directory in source label Oct 8, 2019
@dpgeorge dpgeorge closed this Jul 13, 2021
tannewt pushed a commit to tannewt/circuitpython that referenced this pull request Aug 24, 2021
Check background pending before sleep
@xcguang xcguang deleted the bugfix/crash_if_enable_debug branch September 26, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

py-core Relates to py/ directory in source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants