Bug 350228 - Unhandled ioctl 0x6458 (i965/mesa)
Summary: Unhandled ioctl 0x6458 (i965/mesa)
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.10 SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-15 03:18 UTC by Austin English
Modified: 2019-07-11 15:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch: mention strace as a data source for syscall/ioctl information (1.10 KB, patch)
2019-04-19 06:10 UTC, Austin English
Details
add DRM_IOCTL_I915_GEM_THROTTLE (858 bytes, patch)
2019-04-19 06:11 UTC, Austin English
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Austin English 2015-07-15 03:18:54 UTC
I've only noticed this with wine64 + valgrind on my i965 machine (I don't see it with wine32, though I haven't tried wine64 elsewhere). I found a pastebin also using i965 that hit this:
http://pastebin.com/CWa51BgN

I didn't find that ioctl anywhere in /usr/include on my machine though
Comment 1 Austin English 2015-07-15 03:19:55 UTC
../../../tools/runtest -q -P wine -T ../../.. -M amstream.dll -p amstream_test.exe.so amstream && touch amstream.ok
==19934== Syscall param ioctl(generic) points to uninitialised byte(s)
==19934==    at 0x30460F7D77: ioctl (in /usr/lib64/libc-2.21.so)
==19934==    by 0x3A38603AC7: drmIoctl (in /usr/lib64/libdrm.so.2.4.0)
==19934==    by 0x3A38606A3B: drmPrimeHandleToFD (in /usr/lib64/libdrm.so.2.4.0)
==19934==    by 0x7F6194D: drm_intel_bo_gem_export_to_prime (in /usr/lib64/libdrm_intel.so.1.0.0)
==19934==    by 0x7B63B32: ??? (in /usr/lib64/dri/i965_dri.so)
==19934==    by 0x3A39A490E4: ??? (in /usr/lib64/libGL.so.1.2.0)
==19934==    by 0x3A39A4B0B3: ??? (in /usr/lib64/libGL.so.1.2.0)
==19934==    by 0x7A9C14A: ??? (in /usr/lib64/dri/i965_dri.so)
==19934==    by 0x7A9C4A0: ??? (in /usr/lib64/dri/i965_dri.so)
==19934==    by 0x7A9C58A: ??? (in /usr/lib64/dri/i965_dri.so)
==19934==    by 0x7A4E4C5: ??? (in /usr/lib64/dri/i965_dri.so)
==19934==    by 0x3A39A49679: ??? (in /usr/lib64/libGL.so.1.2.0)
==19934==    by 0x3A39A1C374: glXMakeContextCurrent (in /usr/lib64/libGL.so.1.2.0)
==19934==    by 0x72BF2A1: X11DRV_WineGL_InitOpenglInfo (opengl.c:484)
==19934==    by 0x72C096C: has_opengl (opengl.c:663)
==19934==    by 0x72C96A2: get_glx_driver (opengl.c:3304)
==19934==    by 0x72B2DC7: X11DRV_wine_get_wgl_driver (init.c:459)
==19934==    by 0x5A350E9: __wine_get_wgl_driver (opengl.c:58)
==19934==    by 0x565D723: wined3d_adapter_init (directx.c:5667)
==19934==    by 0x565E014: wined3d_init (directx.c:5792)
==19934==  Address 0x7ffffe20dfa8 is in a rw- anonymous segment
==19934==  Uninitialised value was created by a stack allocation
==19934==    at 0x7F5AB40: ??? (in /usr/lib64/libdrm_intel.so.1.0.0)
==19934==
==19934== Warning: noted but unhandled ioctl 0x6458 with no size/direction hints.
==19934==    This could cause spurious value errors to appear.
==19934==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
Comment 2 Austin English 2015-07-15 20:53:37 UTC
Correction, I do see it with 32-bit wine as well, hadn't looked at logs closely enough.

There are a few more, as well:
==23845== Warning: noted but unhandled ioctl 0x5390 with no size/direction hints.
==30491== Warning: noted but unhandled ioctl 0x5302 with no size/direction hints.
==30491== Warning: noted but unhandled ioctl 0x5307 with no size/direction hints.
Comment 3 Julian Seward 2015-08-12 14:10:01 UTC
Meh.  Any idea who knows enough about this stuff to fix the ioctl wrapper?
Comment 4 Austin English 2015-08-17 01:38:42 UTC
Someone over at FreeDesktop.org, maybe?
Comment 5 Austin English 2017-01-26 02:15:14 UTC
I asked in the intel-gfx and xorg IRC channels about these ioctls, and the answers were basically "try newer Valgrind" and "look at the source..oh they're not there, macros are a hell of a drug," so I don't expect upstream to be very helpful.

Given that I no longer have access to this hardware, I'm just going to close this.
Comment 6 Austin English 2019-04-13 09:41:09 UTC
(In reply to Austin English from comment #5)
> I asked in the intel-gfx and xorg IRC channels about these ioctls, and the
> answers were basically "try newer Valgrind" and "look at the source..oh
> they're not there, macros are a hell of a drug," so I don't expect upstream
> to be very helpful.
> 
> Given that I no longer have access to this hardware, I'm just going to close
> this.

I can reproduce this on my current hardware again; though I don't have any leads on actually fixing, so I'm not reopening (though it is reproducible again).
Comment 7 Austin English 2019-04-13 10:04:24 UTC
Reopening, because I *finally* found something useful on github.

strace has some info on this; apparently it can be:
DRM_IOCTL_I915_GEM_THROTTLE, drm/i915_drm.h:
https://github.com/strace/strace/blob/7cc6eb706ba7f67d1e84fe903e59ce824f799df5/linux/32/ioctls_inc_align16.h#L273

or:

DRM_IOCTL_RADEON_CP_RESUME, drm/radeon_drm.h:
https://github.com/strace/strace/blob/7cc6eb706ba7f67d1e84fe903e59ce824f799df5/linux/32/ioctls_inc_align16.h#L364

In my case it would be the intel definition (probably), as I've got a mixed intel/nvidia setup (but not radeon).

note to self: check strace next time.
Comment 8 Austin English 2019-04-19 06:10:53 UTC
Created attachment 119494 [details]
Patch: mention strace as a data source for syscall/ioctl information
Comment 9 Austin English 2019-04-19 06:11:25 UTC
Created attachment 119495 [details]
add DRM_IOCTL_I915_GEM_THROTTLE
Comment 10 Julian Seward 2019-07-11 15:49:06 UTC
Landed, 4443b782c4deddabcf4a2cbd7fe923cb22f87bf8 (both patches combined).
Thanks for them!