when secure boot enabled, the .*pm-graph_30 test case always fail

Bug #1892131 reported by Leon Liao
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Opinion
High
Unassigned
OEM Priority Project
New
High
Alex Tu

Bug Description

when secure boot enabled, the .*pm-graph_30 test case always fail.

When secure boot enabled, the /sys/kernel/debug/tracing folder won't be created by kernel.
But, when the /sys/kernel/debug/tracing/buffer_size_kb file does not exist, the pm-graph can not be executed normally.

Traceback (most recent call last):
  File "/usr/bin/sleepgraph", line 6857, in <module>
    ret = runTest(i+1, True)
  File "/usr/bin/sleepgraph", line 5976, in runTest
    sysvals.initFtrace(quiet)
  File "/usr/bin/sleepgraph", line 766, in initFtrace
    tgtsize = int(self.fgetVal('buffer_size_kb')) * cpus
ValueError: invalid literal for int() with base 10: ''

Tags: oem-priority
Changed in oem-priority:
importance: Undecided → Critical
tags: added: oem-priority
Alex Tu (alextu)
Changed in oem-priority:
assignee: nobody → Alex Tu (alextu)
Revision history for this message
Alex Tu (alextu) wrote :

I guess the solution could be:
1. [better] let pm-graph support the case of secureboot enabled.
2. [workaround, not good] let pm-graph tests skip the case that secureboot enabled.

https://pastebin.canonical.com/p/pXpJG8gRtV/
commit 6adef438f599b25e7a0c4ae6ca2f358e27b4f329
Author: Betty Lin <email address hidden>
Date: Fri Dec 20 09:35:57 2019 +0800

    add intel pm-graph tests

    1. Run both s2idle and s3 for 30 cycles
    2. Attached the logs to submission

ubuntu@dell-bto-focal-fossa-201810-26535:~$ apt-cache policy pm-graph
pm-graph:
  Installed: (none)
  Candidate: 5.6-1+202007012205+fd6276b~ubuntu20.04.1
  Version table:
     5.6-1+202007012205+fd6276b~ubuntu20.04.1 500
        500 http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu focal/main amd64 Packages

ubuntu@dell-bto-focal-fossa-201810-26535:~$ apt-cache show pm-graph
Package: pm-graph
Priority: extra
Section: admin
Installed-Size: 329
Maintainer: Todd Brandt <email address hidden>
Architecture: amd64
Version: 5.6-1+202007012205+fd6276b~ubuntu20.04.1
Depends: python3:any (>= 3.2~), python3-requests
Filename: pool/main/p/pm-graph/pm-graph_5.6-1+202007012205+fd6276b~ubuntu20.04.1_amd64.deb
Size: 82028
MD5sum: c3e46cf9ab6df94509345557b7fd7d87
SHA1: 527d6a76533259ff069e738d041ec6d753e578e3
SHA256: 69de6d670408b455a6beb6ca024f572d0260c0a66e0451143b4e1b9f496e7ac5
Description-en: Power Management performance analysis
 This package is designed to assist kernel and OS developers in optimizing
 their linux stack's boot and suspend/resume time. It includes two tools:
 bootgraph and sleepgraph, which use dmesg and ftrace data to create
 timelines of kernel boot and suspend/resume respectively. The timelines
 provide a detailed view of which devices/subsystems are taking the most
 time in boot and suspend/resume.
Description-md5: 4d8e48bd1988d4607d09700dc79e967a

Revision history for this message
Alex Tu (alextu) wrote :

verified new pm-graph , but this issue is there still: https://chat.canonical.com/canonical/pl/rf1ibti6zbfs7dbgjxfwa7wwoa

Revision history for this message
Alex Tu (alextu) wrote :

some information shared by Ivan:
 - https://wiki.canonical.com/IvanHu/Kernel_Lockdown
 - kernel parameter lockdown=none, but I recalled the secureboot enabled will force it lockdown.

The lockdown status cat be check by `sudo cat /sys/kernel/security/lockdown` [1]

[1] https://lwn.net/Articles/791863/

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

upstream pm graph issue

Changed in plainbox-provider-checkbox:
status: New → Invalid
Revision history for this message
Alex Tu (alextu) wrote :

It's something checkbox can do to check the requirement and skip this test case when secureboot be enabled.

Revision history for this message
Rex Tsai (chihchun) wrote :

kernel lockdown is a Ubuntu kernel feature, pm_graph supposed not to read the tracing information when the kernel it's lockdowned.

I would suggest checkbox framework to verify if the kernel is locked down as a resource, and the test job should fail or skip the tests if the test environment is not ready.

I would also like to see a test plan to test the target machine with secureboot and lockdown turned off, so we can still capture the regression with secure boot enabled.

Changed in plainbox-provider-checkbox:
status: Invalid → Opinion
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

given no activity for more than 6 months, lower priority

Changed in oem-priority:
importance: Critical → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.