https://bugs.freedesktop.org/show_bug.cgi?id=105190
Bug ID: 105190 Summary: gem_quiescent_gpu assertion fails on distribution kernels Product: DRI Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: IGT Assignee: dri-devel@lists.freedesktop.org Reporter: arkadiusz.hiler@intel.com
Running any test on Fedora causes a failed assertion during gem_quiescent_gpu() which is used in drm_open_driver* family of functions.
IGT-Version: 1.21-g94bd67c5 (x86_64) (Linux: 4.15.3-300.fc27.x86_64 x86_64) (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Test assertion failure function igt_drop_caches_set, file ../lib/igt_debugfs.c:970: (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Failed assertion: igt_sysfs_printf(dir, "i915_gem_drop_caches", "0x%" PRIx64, val) > 0 (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Last errno: 1, Operation not permitted Stack trace: #0 [__igt_fail_assert+0x16e] #1 [igt_drop_caches_set+0x75] #2 [gem_quiescent_gpu+0x1f] #3 [drm_open_driver+0xae] #4 [drm_open_driver_master+0x15] #5 [__real_main181+0x1e] #6 [main+0x44] #7 [__libc_start_main+0xea] #8 [_start+0x2a] Test kms_pipe_crc_basic failed. **** DEBUG **** (kms_pipe_crc_basic:4042) igt_core-INFO: IGT-Version: 1.21-g94bd67c5 (x86_64) (Linux: 4.15.3-300.fc27.x86_64 x86_64) (kms_pipe_crc_basic:4042) drmtest-DEBUG: Test requirement passed: !(fd<0) (kms_pipe_crc_basic:4042) igt_debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0' (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Test assertion failure function igt_drop_caches_set, file ../lib/igt_debugfs.c:970: (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Failed assertion: igt_sysfs_printf(dir, "i915_gem_drop_caches", "0x%" PRIx64, val) > 0 (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Last errno: 1, Operation not permitted (kms_pipe_crc_basic:4042) igt_core-INFO: Stack trace: (kms_pipe_crc_basic:4042) igt_core-INFO: #0 [__igt_fail_assert+0x16e] (kms_pipe_crc_basic:4042) igt_core-INFO: #1 [igt_drop_caches_set+0x75] (kms_pipe_crc_basic:4042) igt_core-INFO: #2 [gem_quiescent_gpu+0x1f] (kms_pipe_crc_basic:4042) igt_core-INFO: #3 [drm_open_driver+0xae] (kms_pipe_crc_basic:4042) igt_core-INFO: #4 [drm_open_driver_master+0x15] (kms_pipe_crc_basic:4042) igt_core-INFO: #5 [__real_main181+0x1e] (kms_pipe_crc_basic:4042) igt_core-INFO: #6 [main+0x44] (kms_pipe_crc_basic:4042) igt_core-INFO: #7 [__libc_start_main+0xea] (kms_pipe_crc_basic:4042) igt_core-INFO: #8 [_start+0x2a] **** END **** Subtest bad-pipe: FAIL Subtest bad-source: FAIL Subtest bad-nb-words-1: FAIL Subtest bad-nb-words-3: FAIL Subtest read-crc-pipe-A: FAIL Subtest read-crc-pipe-A-frame-sequence: FAIL Subtest nonblocking-crc-pipe-A: FAIL Subtest nonblocking-crc-pipe-A-frame-sequence: FAIL Subtest suspend-read-crc-pipe-A: FAIL Subtest hang-read-crc-pipe-A: FAIL Subtest read-crc-pipe-B: FAIL Subtest read-crc-pipe-B-frame-sequence: FAIL Subtest nonblocking-crc-pipe-B: FAIL Subtest nonblocking-crc-pipe-B-frame-sequence: FAIL Subtest suspend-read-crc-pipe-B: FAIL Subtest hang-read-crc-pipe-B: FAIL Subtest read-crc-pipe-C: FAIL Subtest read-crc-pipe-C-frame-sequence: FAIL Subtest nonblocking-crc-pipe-C: FAIL Subtest nonblocking-crc-pipe-C-frame-sequence: FAIL Subtest suspend-read-crc-pipe-C: FAIL Subtest hang-read-crc-pipe-C: FAIL
https://bugs.freedesktop.org/show_bug.cgi?id=105190
--- Comment #1 from Chris Wilson chris@chris-wilson.co.uk --- EPERM is not from us.
strace just to check where that is being raised?
https://bugs.freedesktop.org/show_bug.cgi?id=105190
--- Comment #2 from arkadiusz.hiler@intel.com arkadiusz.hiler@intel.com --- # getenforce Permissive # strace ./kms_pipe_crc_basic 2>&1 | grep EPERM openat(4, "i915_gem_drop_caches", O_WRONLY) = -1 EPERM (Operation not permitted)
https://bugs.freedesktop.org/show_bug.cgi?id=105190
--- Comment #3 from Chris Wilson chris@chris-wilson.co.uk --- ls -l /sys/kernel/debug/dri/0/i915_gem_drop_caches ?
https://bugs.freedesktop.org/show_bug.cgi?id=105190
--- Comment #4 from arkadiusz.hiler@intel.com arkadiusz.hiler@intel.com --- # ls -l /sys/kernel/debug/dri/0/i915_gem_drop_caches -rw-r--r--. 1 root root 0 Feb 21 14:05 /sys/kernel/debug/dri/0/i915_gem_drop_caches
https://bugs.freedesktop.org/show_bug.cgi?id=105190
--- Comment #5 from Chris Wilson chris@chris-wilson.co.uk --- And whoami? You are running as root, right?
https://bugs.freedesktop.org/show_bug.cgi?id=105190
--- Comment #6 from arkadiusz.hiler@intel.com arkadiusz.hiler@intel.com --- obviously
# whoami root
https://bugs.freedesktop.org/show_bug.cgi?id=105190
--- Comment #7 from Chris Wilson chris@chris-wilson.co.uk --- Then I have no idea what your distro has done :)
https://bugs.freedesktop.org/show_bug.cgi?id=105190
arkadiusz.hiler@intel.com arkadiusz.hiler@intel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |NOTABUG Status|NEW |RESOLVED
--- Comment #8 from arkadiusz.hiler@intel.com arkadiusz.hiler@intel.com --- Looks like it's caused by Fedora's customization. They picked up kernel lockdown series https://lwn.net/Articles/723653/
If the system is booted using secure boot it puts the kernel in lockdown mode, which includes disabling all the DebugFSes.
To enable it you have to lift the lockdown:
# sysctl kernel.sysrq=1 <Alt-PrtSc-x> on a physical keyboard; writing to /proc/sysrq-trigger does not work [ 137.276888] sysrq: SysRq : Disabling Secure Boot restrictions [ 137.276963] Lifting lockdown
https://bugs.freedesktop.org/show_bug.cgi?id=105190
Lakshmi lakshminarayana.vudum@intel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Lakshmi lakshminarayana.vudum@intel.com --- Closed as NOTABUG.
https://bugs.freedesktop.org/show_bug.cgi?id=105190
--- Comment #10 from emersion contact@emersion.fr --- Alternatively, it's possible to use a vanilla kernel: https://fedoraproject.org/wiki/Kernel_Vanilla_Repositories
dri-devel@lists.freedesktop.org