Opened 20 months ago

Closed 19 months ago

Last modified 19 months ago

#18337 closed bug (fixed)

SNDBUF/RCVBUF sockopt can trigger a deadlock with sendmsg/rcvmsg

Reported by: korli Owned by: korli
Priority: normal Milestone: R1/beta5
Component: Network & Internet/TCP Version: R1/beta4
Keywords: r1beta4-fixes Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by korli)

This bug was met on vcmi 1.1.1, introduced in the following commit: https://github.com/vcmi/vcmi/commit/ac66fc7f42f50ad961cf8a0656be0d9b5415180d#diff-50f4f7bc8366ce0c1d4a06d1d63f15799e401333046e163942a600119a44e621

This is now worked around with a patch, which disables the setsockopt calls: https://github.com/haikuports/haikuports/blob/9649011e5f901f75de43d1f34ae941c7a5646693/games-strategy/vcmi/patches/vcmi-1.1.1.patchset#L103

I have a smaller reproducer, but it has to be run in a loop, as it doesn't always trigger.

Attachments (1)

haiku_sockopt_repro.c (2.5 KB ) - added by korli 20 months ago.

Download all attachments as: .zip

Change History (6)

by korli, 20 months ago

Attachment: haiku_sockopt_repro.c added

comment:1 by korli, 19 months ago

Description: modified (diff)

comment:2 by waddlesplash, 19 months ago

Without even having tried the testcase and looked at the stack trace, if this goes through TCP, is there some chance ambroff's proposed change in #18203 could be related?

comment:3 by korli, 19 months ago

Milestone: UnscheduledR1/beta5
Owner: changed from axeld to korli
Status: newassigned

It's a bit related. Proposed change: https://review.haiku-os.org/c/haiku/+/6359

comment:4 by waddlesplash, 19 months ago

Resolution: fixed
Status: assignedclosed

Fix merged in hrev56926.

comment:5 by pulkomandy, 19 months ago

Keywords: r1beta4-fixes added
Note: See TracTickets for help on using tickets.