🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.bugs
Article #910

[Bug 301491] Linuxulator: DRM syncobj timeline wait returns ETIMEDOUT instead of ETIME

#910
From: bugzilla-noreply
Date: Fri, 04 Dec 2026 14:18
86 lines
5092 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301491

            Bug ID: 301491
           Summary: Linuxulator: DRM syncobj timeline wait returns
                    ETIMEDOUT instead of ETIME
           Product: Base System
           Version: 15.2-STABLE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: gurov@disroot.org
 Attachment #278194 text/plain
         mime type:

Created attachment 278194
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=278194&action=edit
Linux DRM syncobj timeline wait reproducer

A Linux process under Linuxulator receives ETIMEDOUT (110) from
DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT when an unsignaled wait expires. Linux DRM
returns ETIME (62) for this case. Linux RADV 26.2.8 treats the unexpected
errno as VK_ERROR_UNKNOWN instead of VK_TIMEOUT.

Environment:

- FreeBSD 15.2-STABLE amd64 GENERIC, stable/15-n287046-1751658c0128
- drm-612-kmod-6.12.110.1502501_3
- AMD Radeon RX 7600
- Void Linux amd64 under Linuxulator, Mesa RADV 26.2.8
- Custom linux64 module with a /proc filesystem-type fix and D58753.
  D58753 handles different ioctl requests.

Steps to reproduce:

1. Compile the attached drm-timeline-test.c with a Linux compiler and Linux
   DRM headers.
2. Run it as an unprivileged user with access to /dev/dri/renderD128.

The test waits on an unsignaled DRM syncobj timeline point with a 100 ms
CLOCK_MONOTONIC deadline, then signals the point and waits again as a control.

Expected: the unsignaled wait returns ETIME; the signaled wait succeeds.

Actual:

unsignaled: ret=-1 errno=110 (Connection timed out) elapsed=0.101911 s
signaled: ret=0 errno=0 (Success) elapsed=0.000002 s

I have not run the test on native Linux. The attached output includes the
exact compile and run commands used under Linuxulator.

Possible cause:

The ported DRM syncobj implementation uses -ETIME for an expired wait.
FreeBSD's LinuxKPI aliases ETIME to native ETIMEDOUT, which the Linuxulator
errno table translates to Linux ETIMEDOUT. This could explain the result,
but I have not traced the error through each layer of the installed module.

As a local workaround, I built a private Linux RADV driver that accepts
both ETIME and ETIMEDOUT as VK_TIMEOUT in the affected wait path. With a
separate Vulkan reproducer, stock RADV returned VK_ERROR_UNKNOWN and the
private build returned VK_TIMEOUT; the signaled control passed on both.
The builds also differed in configuration, so this was not a controlled
comparison of the one-line patch alone.

Could the Linuxulator and graphics/drm-kmod maintainers advise where the
ioctl compatibility fix belongs?

Related: bug 289453 reports a similar Vulkan error that disappeared with
DRM 6.12. This system already uses DRM 6.12 and reproduces the errno
directly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <bug-301491-227@https.bugs.freebsd.org/bugzilla/>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: bugzilla-noreply@freebsd.org
Newsgroups: muc.lists.freebsd.bugs
Subject: [Bug 301491] Linuxulator: DRM syncobj timeline wait returns
 ETIMEDOUT instead of ETIME
Date: Fri, 04 Dec 2026 14:18:59 +0000
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <bug-301491-227@https.bugs.freebsd.org/bugzilla/>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="82275"; mail-complaints-to="news-admin@muc.de"
X-Original-To: bugs@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1796393939;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=E/fsz1WYDPcnqIMq78W2J/jtzeK1ysF7qMY8Jtblflk=;
	b=Hnx+OZLw6KYN/wcdZr+3rSlmJMzd5B3yGnLyd2mWbHk5L+iP8ae/nCfx1cU1JLOep/W4J5
	Cuyr3unLJbHjif6ILZFlmGYw/lItHt9zGUicIHeTIUE2r4BGvLlSN5E0UTGWRthK7i3ctC
	Ymm+RsFDcLufn3EFAsMz32Zd1CP1COxytcjiStyZ9I7Nth1wE3fdObC5/+ne5jtaqH9TTd
	EtnWOQy9d905G0o42Mw9MmY3CToA/O7Rfdr1XX51S7ZGzKSOEs8qL4cmegrOnTqTsxs+Jl
	JPif9EHBvCHLnUE5ciCgB2LdKPRMLL8LcH23+GHp7LfhC/r04BVSFTOTZlpNLg==
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
Auto-Submitted: auto-generated
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes