SNAP BUG? amdgpu: os_same_file_description

amdgpu: os_same_file_description couldn’t determine if two DRM fds reference the same file description. If they do, bad things may happen! X Error: BadWindow Request Major code 4 () ResourceID 0x480000e Error Serial #204 Current Serial #209

This only happens when executing via snapcraft. Any idea why this might happen?

This only occurred on my AMD 4800u igpu and not RTX 2060, the 2060 executes fine.

@pedronis or @Saviq can you help out with this?

AFAICT this is coming from here:

https://gitlab.freedesktop.org/mesa/mesa/-/blob/edab54dd685f2829ecc5d7e5e34910e4a9f2fd62/src/util/os_file.c#L202-230

through here:

https://gitlab.freedesktop.org/mesa/mesa/-/blob/edab54dd685f2829ecc5d7e5e34910e4a9f2fd62/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c#L368-388

This could well be a confinement problem, but also it’s a “couldn’t determine”, so it’s more of a warning than an error.

@fletch is there an actual problem you’re seeing? Can you see DENIED or similar confinement messages in dmesg when this is logged? snappy-debug may help.

I checked /var/log/dmesg after attempting to run the program but there seems to be no new lines added to it.

sudo dmesg -w may be easier to monitor.

You still didn’t say whether there’s an actual problem, or are you just concerned by the messages?

Yes sorry it stops the game from launching. It throws that error and quits.

I’m not sure why it would throw that error because I’m not doing anything significantly different here compared with this version (non pro version):

All I am doing that I can think would cause an issue in the Pro version is enabling MSAA but that still deoesn’t really explain the problem because I have many snaps with MSAA via GLFW just not via SDL. This is the first SDL2 on snap I have release with MSAA. But likely MSAA is not the cause.