Bug 105190 - gem_quiescent_gpu assertion fails on distribution kernels
Summary: gem_quiescent_gpu assertion fails on distribution kernels
Status: CLOSED NOTABUG
Alias: None
Product: DRI
Classification: Unclassified
Component: IGT (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-21 12:23 UTC by Arek Hiler
Modified: 2019-07-04 07:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Arek Hiler 2018-02-21 12:23:16 UTC
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
Comment 1 Chris Wilson 2018-02-21 12:27:56 UTC
EPERM is not from us.

strace just to check where that is being raised?
Comment 2 Arek Hiler 2018-02-21 12:36:44 UTC
# getenforce
Permissive
# strace ./kms_pipe_crc_basic 2>&1 | grep EPERM
openat(4, "i915_gem_drop_caches", O_WRONLY) = -1 EPERM (Operation not permitted)
Comment 3 Chris Wilson 2018-02-21 12:42:42 UTC
ls -l /sys/kernel/debug/dri/0/i915_gem_drop_caches ?
Comment 4 Arek Hiler 2018-02-21 12:44:52 UTC
# 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
Comment 5 Chris Wilson 2018-02-21 12:46:00 UTC
And whoami? You are running as root, right?
Comment 6 Arek Hiler 2018-02-21 12:53:41 UTC
obviously

# whoami
root
Comment 7 Chris Wilson 2018-02-21 13:08:17 UTC
Then I have no idea what your distro has done :)
Comment 8 Arek Hiler 2018-02-21 13:43:11 UTC
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
Comment 9 Lakshmi 2018-10-11 19:44:46 UTC
Closed as NOTABUG.
Comment 10 emersion 2019-07-04 07:47:56 UTC
Alternatively, it's possible to use a vanilla kernel: https://fedoraproject.org/wiki/Kernel_Vanilla_Repositories


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.