fwts PCIe ASPM tests are throwing Segmentation fault

Bug #1527460 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fwts (Ubuntu)
Fix Released
High
Colin Ian King
Trusty
Fix Released
High
Colin Ian King

Bug Description

Problem Description
===================
while running fwts Test in Firestone system on ubuntu14.04.3(3.19.0-25-generic) Failed

Steps to Reproduce
===================
1- Install Firestone system with ubuntu14.04.3(3.19.0-25-generic)
2-install fwts user space tool
3- run test

LOG:
===========
root@system :~# fwts --batch --interactive --power-states
Running 14 tests, results appended to results.log
Test: Gather kernel system information.
  Gather kernel signature. 1 info only
  Gather kernel system information. 1 info only
  Gather kernel boot command line. 1 info only
  Gather ACPI driver version. 1 info only
Test: Scan kernel log for Oopses.
  Kernel log oops check. 2 passed
Test: Scan kernel log for errors and warnings.
  Kernel log error check. 1 passed
Test: General ACPI information test.
  Determine Kernel ACPI version. 1 info only
  Determine machine's ACPI version.
  Determine AML compiler. 1 info only
Test: UEFI secure boot test.
 Test aborted..
Test: Test firmware has set PCI Express MaxReadReq to a higher value on n..
  Test firmware settings MaxReadReq for PCI Express de.. 1 passed
Test: PCIe ASPM test.
Segmentation faultest. : 42.9% /
root@system:~#

[SRU Justification][Trusty]

fwts segfaults because the ASPM test on this machine is returning no ACPI tables and the test is not checking for a NULL table and hence dereferencing it causing the segfault While debugging this I also noticed that if /dev/mem is not available then two /dev/mem mmaps may also cause a segfault, so I've added fixes for this too.

[Fix]
Upstream fix 9992dcca169282ab967177cc8bdac94eee66c93
https://lists.ubuntu.com/archives/fwts-devel/2015-December/007215.html
https://lists.ubuntu.com/archives/fwts-devel/2015-December/007217.html

[Testcase]
Run fwts on a system without ACPI tables. Will segfault. With the fix, it runs w/o a segfault

Revision history for this message
bugproxy (bugproxy) wrote : syslog file

Default Comment by Bridge

tags: added: architecture-ppc64le bugnameltc-128802 severity-medium targetmilestone-inin14043
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1527460/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-12-18 10:00 EDT-------
Hi

I tested this on ubuntu14.04.04 still issue is there

root@alp2:~# fwts --batch --interactive --power-states
Running 14 tests, results appended to results.log
Test: Gather kernel system information.
Gather kernel signature. 1 info only
Gather kernel system information. 1 info only
Gather kernel boot command line. 1 info only
Gather ACPI driver version. 1 info only
Test: Scan kernel log for Oopses.
Kernel log oops check. 2 passed
Test: Scan kernel log for errors and warnings.
Kernel log error check. 1 passed
Test: General ACPI information test.
Determine Kernel ACPI version. 1 info only
Determine machine's ACPI version.
Determine AML compiler. 1 info only
Test: UEFI secure boot test.
Test aborted..
Test: Test firmware has set PCI Express MaxReadReq to a higher value on n..
Test firmware settings MaxReadReq for PCI Express de.. 1 passed
Test: PCIe ASPM test.
Segmentation faultest. : 42.9% |
root@alp2:~#

root@alp2:~# uname -a
Linux alp2 4.2.0-21-generic #25~14.04.1-Ubuntu SMP Thu Dec 3 13:55:42 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
root@alp2:~#

Regards
Praveen

vaishnavi (vaishnavi)
affects: ubuntu → fwts (Ubuntu)
Changed in fwts (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Canonical Kernel Team (canonical-kernel-team)
Revision history for this message
Colin Ian King (colin-king) wrote :

I believe this is exactly the same bug as https://bugs.launchpad.net/bugs/1452201, which as fixed and uploaded today for Vivid and Wily. Please update and re-test with the latest version.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-12-19 18:55 EDT-------
(In reply to comment #9)
> I believe this is exactly the same bug as
> https://bugs.launchpad.net/bugs/1452201, which as fixed and uploaded today
> for Vivid and Wily. Please update and re-test with the latest version.

Hi

I tried to upgrade and re run the test but it fails , I think for LTS is not updated can you please back port this patch for ubuntu 14.04.04

LOG:

root@system:~# cat /etc/issue
Ubuntu 14.04.3 LTS \n \l

root@system:~# uname -a
Linux alp2 4.2.0-22-generic #27~14.04.1-Ubuntu SMP Fri Dec 18 10:56:52 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
root@alp2:~# dpkg -l | grep fwts
ii fwts 14.03.01-0ubuntu2 ppc64el FirmWare Test Suite
ii libfwts1 14.03.01-0ubuntu2 ppc64el FirmWare Test Suite core support library
ii libfwtsacpica1 14.03.01-0ubuntu2 ppc64el FirmWare Test Suite ACPICA core built for acpiexec functionality
ii libfwtsiasl1 14.03.01-0ubuntu2 ppc64el FirmWare Test Suite ACPICA core built for iasl functionality
root@system:~# fwts --batch --interactive --power-states
Running 14 tests, results appended to results.log
Test: Gather kernel system information.
Gather kernel signature. 1 info only
Gather kernel system information. 1 info only
Gather kernel boot command line. 1 info only
Gather ACPI driver version. 1 info only
Test: Scan kernel log for Oopses.
Kernel log oops check. 2 passed
Test: Scan kernel log for errors and warnings.
Kernel log error check. 1 passed
Test: General ACPI information test.
Determine Kernel ACPI version. 1 info only
Determine machine's ACPI version.
Determine AML compiler. 1 info only
Test: UEFI secure boot test.
Test aborted..
Test: Test firmware has set PCI Express MaxReadReq to a higher value on n..
Test firmware settings MaxReadReq for PCI Express de.. 1 passed
Test: PCIe ASPM test.
Segmentation faultest. : 42.9% /
root@system:~#

bugproxy (bugproxy)
tags: added: severity-high targetmilestone-inin14044
removed: severity-medium targetmilestone-inin14043
Revision history for this message
Colin Ian King (colin-king) wrote :

OK, will backport that to 14.04 and get a SRU out for it ASAP

Revision history for this message
Colin Ian King (colin-king) wrote :

This is a different bug, requires upstream fix:

commit 69992dcca169282ab967177cc8bdac94eee66c93
Author: Colin Ian King <email address hidden>
Date: Thu Apr 23 12:57:38 2015 +0100

    pci: aspm: check that a table exists, fixes segv on arm64

    A recently tested ARM64 platform did not load a FACP causing the
    table to be null and a null pointer deference occurred. Fix this
    by checking for a null before proceeding with the test.

    Signed-off-by: Colin Ian King <email address hidden>
    Acked-by: Alex Hung <email address hidden>
    Acked-by: Ivan Hu<email address hidden>

Revision history for this message
Colin Ian King (colin-king) wrote :

I've also added in two more fixes:

https://lists.ubuntu.com/archives/fwts-devel/2015-December/007215.html
https://lists.ubuntu.com/archives/fwts-devel/2015-December/007217.html

I've uploaded these and the build in -proposed for trusty should be available in an hour or so.

Revision history for this message
Colin Ian King (colin-king) wrote :

[SRU Justification][Trusty]

fwts segfaults because the ASPM test on this machine is returning no ACPI tables and the test is not checking for a NULL table and hence dereferencing it causing the segfault While debugging this I also noticed that if /dev/mem is not available then two /dev/mem mmaps may also cause a segfault, so I've added fixes for this too.

[Fix]
Upstream fix 9992dcca169282ab967177cc8bdac94eee66c93
https://lists.ubuntu.com/archives/fwts-devel/2015-December/007215.html
https://lists.ubuntu.com/archives/fwts-devel/2015-December/007217.html

[Testcase]
Run fwts on a system without ACPI tables. Will segfault. With the fix, it runs w/o a segfault

Changed in fwts (Ubuntu):
importance: Undecided → High
status: New → In Progress
Changed in fwts (Ubuntu):
assignee: Canonical Kernel Team (canonical-kernel-team) → Colin Ian King (colin-king)
Revision history for this message
Colin Ian King (colin-king) wrote :
description: updated
Mathew Hodson (mhodson)
Changed in fwts (Ubuntu Trusty):
importance: Undecided → Medium
importance: Medium → High
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted fwts into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/fwts/14.03.01-0ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in fwts (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Colin Ian King (colin-king) wrote :

<email address hidden> - can you retest fwts using the version in -proposed?

Revision history for this message
Colin Ian King (colin-king) wrote :

I've tested this in a trusty chroot with /dev/mem and /sys not accessible to reproduce the original conditions and the ASPM test does not segfault and instead skips the test as it can't load the ACPI FACP, as expected:

king:~$ dpkg -l | grep fwts
ii fwts 14.03.01-0ubuntu3 amd64 FirmWare Test Suite
ii fwts-efi-runtime-dkms 14.03.01-0ubuntu3 amd64 Firmware Test Suite UEFI Runtime Service kernel driver
ii libfwts1 14.03.01-0ubuntu3 amd64 FirmWare Test Suite core support library
ii libfwtsacpica1 14.03.01-0ubuntu3 amd64 FirmWare Test Suite ACPICA core built for acpiexec functionality
ii libfwtsiasl1 14.03.01-0ubuntu3 amd64 FirmWare Test Suite ACPICA core built for iasl functionality

sudo fwts aspm -
Results generated by fwts: Version V14.03.01 (2014-03-27 02:14:17).

Some of this work - Copyright (c) 1999 - 2014, Intel Corp. All rights reserved.
Some of this work - Copyright (c) 2010 - 2014, Canonical.

This test run on 06/01/16 at 17:56:25 on host Linux sharkbay-nvme 4.4.0-0-generic #7-Ubuntu SMP Tue Dec 22 20:03:48 UTC 2015 x86_64.

Command: "fwts aspm -".
Running tests: aspm.

aspm: PCIe ASPM test.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Test 1 of 2: PCIe ASPM ACPI test.
SKIPPED: Test 1, No valid FACP information present: cannot test ASPM.

... and no segfault.

So I'm marking this as tested successfully.

tags: added: verification-done
removed: verification-needed
Changed in fwts (Ubuntu Trusty):
assignee: nobody → Colin Ian King (colin-king)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fwts - 14.03.01-0ubuntu3

---------------
fwts (14.03.01-0ubuntu3) trusty; urgency=low

  * pci: aspm: check that a table exists, fixes segv on ppc64le (LP: #1527460)
  * acpi: pcc: fwts_mmap failure is FWTS_MAP_FAILED and not NULL
  * bios: ebdadump: fwts_mmap failure is FWTS_MAP_FAILED and not MAP_FAILED

 -- Colin King <email address hidden> Wed, 23 Dec 2015 01:45:00 +0000

Changed in fwts (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for fwts has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in fwts (Ubuntu):
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-02-23 05:19 EDT-------
Hi

Tested with fwts 14.03.01-0ubuntu3 and it seem me fix

root@system:~# fwts --batch --interactive --power-states
Running 14 tests, results appended to results.log
Test: Gather kernel system information.
Gather kernel signature. 1 skipped, 1 info only
Gather kernel system information. 1 info only
Gather kernel boot command line. 1 info only
Gather ACPI driver version. 1 info only
Test: Scan kernel log for Oopses.
Kernel log oops check. 2 passed
Test: Scan kernel log for errors and warnings.
Kernel log error check. 1 passed
Test: General ACPI information test.
Determine Kernel ACPI version. 1 info only
Determine machine's ACPI version.
Determine AML compiler. 1 info only
Test: UEFI secure boot test.
Test aborted..
Test: Test firmware has set PCI Express MaxReadReq to a higher value on n..
Test firmware settings MaxReadReq for PCI Express de.. 1 passed
Test: PCIe ASPM test.
PCIe ASPM ACPI test. 1 skipped
PCIe ASPM registers test.
Test: CPU frequency scaling tests.
CPU Frequency tests. 1 warning
Test: HDA Audio Pin Configuration test.
HDA Audio Pin Configuration test. 1 skipped
Test: ACPI Wakealarm tests.
Test: Re-assemble DSDT and find syntax errors and warnings. : 64.3% \
Disassemble and reassemble DSDT
Disassemble and reassemble SSDT
Test: ACPI DSDT Method Semantic tests.
Test aborted..
Test: ACPI table checksum test.
ACPI table checksum test.
Test: ACPI table settings sanity tests.
Test ACPI tables.
root@system:~#

Regards
Praveen

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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