Skip to content

Fix IOCP: key destroy handler not called when app supplies group lock#4355

Merged
nanangizz merged 1 commit intomasterfrom
iocp-missing-grplock-handler
Mar 14, 2025
Merged

Fix IOCP: key destroy handler not called when app supplies group lock#4355
nanangizz merged 1 commit intomasterfrom
iocp-missing-grplock-handler

Conversation

@nanangizz
Copy link
Copy Markdown
Member

In #4136, group lock has been integrated into IOCP. When quitting pjsua app, IOCP destroy always blocks (for ~5 seconds) and there is log indicating some ioqueue keys are not released properly:

Warning, IOCP destroy timeout in waiting for cancelling ops, after ... ms, pending keys=...

After investigation, the unreleased key's group lock reference counter actually reaches zero, but the destructor is not invoked. It turns out that when an ioqueue key is registered with group lock supplied by app, the key destroy handler is not added to the group lock. Currently SIP transports & media transports register their ioqueue keys with group lock.

@nanangizz nanangizz merged commit 0726c56 into master Mar 14, 2025
42 checks passed
@nanangizz nanangizz deleted the iocp-missing-grplock-handler branch March 14, 2025 08:33
BarryYin pushed a commit to BarryYin/pjproject that referenced this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants