Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PyMutex failure inparking_lot.c on Windows during interpreter shutdown #135099

Closed
Labels
3.14bugs and security fixes3.15new features, bugs and security fixestype-bugAn unexpected behavior, bug, or error
@colesbury

Description

@colesbury

Bug report

Bug description:

Fatal Python error: _PySemaphore_PlatformWait: unexpected error from semaphore: 4294967295 (error: 6)Python runtime state: finalizing (tstate=0x6aa6c460)Thread 0x00001360 (most recent call first):  <no Python frame>Windows fatal exception: code 0x80000003Current thread 0x00001360 (most recent call first):  <no Python frame>Current thread's C stack trace (most recent call first):  <cannot get C stack on this system>

4294967295 is the-1 return code fromWaitForMultipleObjects. Error code 6 isERROR_INVALID_HANDLE.

I'm pretty sure that the_PyOS_SigintEvent() handle is getting closed concurrently with the mutex wait.

HANDLEsigint_event=_PyOS_SigintEvent();
HANDLEhandles[2]= {sema->platform_sem,sigint_event };
DWORDcount=sigint_event!=NULL ?2 :1;
wait=WaitForMultipleObjects(count,handles, FALSE,millis);
if (wait==WAIT_OBJECT_0) {
res=Py_PARK_OK;
}
elseif (wait==WAIT_OBJECT_0+1) {
ResetEvent(sigint_event);
res=Py_PARK_INTR;
}
elseif (wait==WAIT_TIMEOUT) {
res=Py_PARK_TIMEOUT;
}
else {
_Py_FatalErrorFormat(__func__,
"unexpected error from semaphore: %u (error: %u)",
wait,GetLastError());
}

Seen inhttps://github.com/python/cpython/actions/runs/15423887404/job/43405853684 at the end of runningtest_decorators.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15new features, bugs and security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp