lspci fails with 'Error reading sysfs label: Operation not permitted'

Bug #1746666 reported by Sujith Pandel
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dellserver
Fix Released
Undecided
Michael Reed
pciutils (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
High
Chris J Arges

Bug Description

Description:
On a 4 socket server, when #lspci is run, it fails with output:
lspci: Error reading /sys/bus/pci/devices/0000:9a:00.0/label: Operation not permitted

How Reproducible:
Always

Version
pciutils-3.3.1-1.1ubuntu1.1

Steps:
1. Install Ubuntu-Server-16.04.3
2. Observe #lspci

Additional Info:
* Upstream master branch from pciutils works fine in this setup. (https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils/)

* v3.4.0 also works fine in this setup.

* v3.3.1 fails.

* Going through code quickly, looks like one of the required patches is :
https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils/+/ef6c9ec3a45992d9e7ef4716d444252baf2013e1

Not sure what other patches might be required for fixing this.

affects: dellserver → pciutils (Ubuntu)
Revision history for this message
Sujith Pandel (sujithpandel) wrote :

This also is required:

Sysfs: Read failures of optional attributes are not fatal
https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils/+/e5bb28afa6124b26cd25506892214a5d3cb9eb60

Revision history for this message
Michael Reed (mreed8855) wrote :

Hi Sujith,

Can you also include the "uname -a" output?

Revision history for this message
Sujith Pandel (sujithpandel) wrote :

# uname -r
4.13.0-32-generic

information type: Public → Private
information type: Private → Public
information type: Public → Private
information type: Private → Public
Revision history for this message
Michael Reed (mreed8855) wrote :

Hi Sujith,

I have received some feedback for this bug and I need you to identify the "exact" patch and/or patches that will fix this problem.

Revision history for this message
Sujith Pandel (sujithpandel) wrote :

Hi Michael,
This is the only and mandatory patch over the existing pciutils_3.3.1-1.1ubuntu1.1_amd64.deb that is required to fix this:

Sysfs: Read failures of optional attributes are not fatal
https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils/+/e5bb28afa6124b26cd25506892214a5d3cb9eb60

Verified on the repro-setup, lspci does not crash.

Hope this helps,
Sujith

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pciutils (Ubuntu Xenial):
status: New → Confirmed
Changed in pciutils (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris J Arges (arges) wrote :

I can reproduce this on a local xenial machine.
The artful/bionic packages do not have this problem.

Changed in pciutils (Ubuntu):
status: Confirmed → Fix Released
Changed in dellserver:
assignee: nobody → Jeff Lane (bladernr)
Revision history for this message
Chris J Arges (arges) wrote :
Changed in pciutils (Ubuntu Xenial):
assignee: nobody → Chris J Arges (arges)
importance: Undecided → Critical
importance: Critical → High
Revision history for this message
Chris J Arges (arges) wrote :

uploaded patch into xenial SRU queue for review

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Sujith, or anyone else affected,

Accepted pciutils into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pciutils/1:3.3.1-1.1ubuntu1.2 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 on 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

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

Changed in pciutils (Ubuntu Xenial):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Chris J Arges (arges) wrote :

Tested proposed package:
```
# lspci | head -n2
pcilib: Error reading /sys/bus/pci/devices/0000:18:00.0/label: Operation not permitted
00:00.0 Host bridge: Intel Corporation Device 2020 (rev 04)
00:05.0 System peripheral: Intel Corporation Sky Lake-E MM/Vt-d Configuration Registers (rev 04)
```

Before I would have gotten the 'Operation not permitted' error and no further output.

tags: added: verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Sujith Pandel (sujithpandel) wrote :

Verified on the repro-setup with pciutils-amd64-1:3.3.1-1.1ubuntu1.2.
Issue is fixed, lspci does not crash with error anymore.

Changed in dellserver:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pciutils - 1:3.3.1-1.1ubuntu1.2

---------------
pciutils (1:3.3.1-1.1ubuntu1.2) xenial; urgency=medium

  * debian/patches/08-Sysfs-Read-failures-of-optional-attributes-are-not-f.patch:
    Cherry-pick from upstream to support machines in which we have read
    failures of optional attributes. (LP: #1746666)

 -- Chris J Arges <email address hidden> Wed, 14 Mar 2018 15:57:44 -0500

Changed in pciutils (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for pciutils 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.

Revision history for this message
Andrea Bravetti (andreabravetti) wrote :

First of all, I'm not opening a new bug because I'm on Mint 18.3 however I think this is an Ubuntu bug anyway... right now I can't install regular 16.04 Ubuntu, I will try as soon as possible.

With latest pciutils/libpci3 3.3.1-1.1ubuntu1.2 I cant see my external display on DP-1-1 any more and also with xrandr that display is missing:

---------------------------------------------
andrea@sibilla ~ $ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
LVDS1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080 60.02*+ 50.03 59.93
......omit......
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
---------------------------------------------

With old pciutils/libpci3 3.3.1-1.1ubuntu1 or 3.3.1-1.1ubuntu1.1 I have:

---------------------------------------------
andrea@sibilla ~ $ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
LVDS1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080 60.02*+ 50.03 59.93
......omit......
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
LVDS-1-2 disconnected (normal left inverted right x axis y axis)
VGA-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080 60.00*+
......omit......
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)
  1680x1050 (0x4a) 119.000MHz +HSync -VSync
......omit......
---------------------------------------------

I tried many time upgrading and downgrading and the issue is absolutely confirmed.

I tried a lot of different config and the only way to get my external monitor working is downgrading pciutils/libpci3.

My hardware is a Lenovo ThinkPad W530.

andrea@sibilla ~ $ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1000M] (rev a1)

If you need some more info I'll be glad to help.

Revision history for this message
Sujith Pandel (sujithpandel) wrote :

Hi @Andrea,
What happens with master branch of pciutils? https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils/
i.e uninstall existing pciutils, clone the master, build and make install.

The only change I see from this defect is the change of error to warning when some optional attributes (like sysfs-label) is missing.

Revision history for this message
Jeff Lane  (bladernr) wrote :

Michael, can you verify and handle the bug appropriately?

Changed in dellserver:
assignee: Jeff Lane (bladernr) → Michael Reed (mreed8855)
tags: added: tpp
Revision history for this message
Andrea Bravetti (andreabravetti) wrote :

Hi @sujithpandel,
tried with master branch of pciutils (3.5.6) and also with tags/v3.3.1:

In both case it work, I'm writing on my external monitor on DP-1-1 right now.

Revision history for this message
Sujith Pandel (sujithpandel) wrote :

@andreabravetti -
Can you please try to bisect more? pointing to the one specific patch where pass <-> fail changes?
May be try git checkout code using commit-ids..

Revision history for this message
Andrea Bravetti (andreabravetti) wrote :

@sujithpandel,
I will try to bisect more as soon as possible.

Right now I can say only this:

pciutils/libpci3 git master (3.5.6) work

pciutils/libpci3 git tag/v3.3.1 work

pciutils/libpci3 3.3.1-1.1ubuntu1.1 work

pciutils/libpci3 3.3.1-1.1ubuntu1.2 does NOT work

Revision history for this message
Chris J Arges (arges) wrote : Re: [Bug 1746666] Re: lspci fails with 'Error reading sysfs label: Operation not permitted'

Also trying commit
https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils/+/ef6c9ec3a45992d9e7ef4716d444252baf2013e1
specifically to see if that one is good or bad. Perhaps there are some
other patches required for backporting this change?

On Thu, Mar 29, 2018 at 2:12 AM, Andrea Bravetti <email address hidden>
wrote:

> @sujithpandel,
> I will try to bisect more as soon as possible.
>
> Right now I can say only this:
>
> pciutils/libpci3 git master (3.5.6) work
>
> pciutils/libpci3 git tag/v3.3.1 work
>
> pciutils/libpci3 3.3.1-1.1ubuntu1.1 work
>
> pciutils/libpci3 3.3.1-1.1ubuntu1.2 does NOT work
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1746666
>
> Title:
> lspci fails with 'Error reading sysfs label: Operation not permitted'
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dellserver/+bug/1746666/+subscriptions
>

Jeff Lane  (bladernr)
Changed in dellserver:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Andrea Bravetti (andreabravetti) wrote :

@arges

dpkg --purge --force-all pciutils libpci3
git checkout -b test ef6c9ec3a45992d9e7ef4716d444252baf2013e1
make clean && make SHARED=yes install && \
  make install-lib && reboot

It work without any problem.

After that I accidentally upgraded to 3.3.1-1.1ubuntu1.2 and now it work, nothing else should be changed from last week, I don't understand.

xrandr show LVDS-1-2, VGA-1-2 and DP-1-* as expected

Michael Reed (mreed8855)
Changed in dellserver:
status: Fix Committed → Fix Released
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.