ignore_eacces and ignore_erofs patches don't work properly

Bug #1903351 reported by Vincent Fazio
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
Fix Released
Medium
Unassigned
Focal
Fix Released
Medium
Brian Murray
Groovy
Fix Released
Medium
Brian Murray
Hirsute
Fix Released
Undecided
Brian Murray

Bug Description

The patches used to ignore errors in containers no longer work as of 3.3.16 due to upstream commit https://gitlab.com/procps-ng/procps/-/commit/7af88da373bb4d515a98ec2f0f5d56c63904f932

The ignore_eacces patch was fuzzed and gets applied to ReadSetting, not WriteSetting
Both patches ignore the change that rc is no longer propagated up and instead everything is trapped by:

                if (!ignore_failure && errno != ENOENT)
                    rc = -1;

Versions affected: focal+

root@bfee89058713:/tmp# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.10 (Groovy Gorilla)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.10"
VERSION_ID="20.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=groovy
UBUNTU_CODENAME=groovy

root@bfee89058713:/# dpkg -l procps
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=================-============-=================================
ii procps 2:3.3.16-5ubuntu2 amd64 /proc file system utilities

root@bfee89058713:/# echo "kernel.shmmax = 17179869184" > shmmax.conf
root@bfee89058713:/# sysctl -e -p shmmax.conf; echo $?
sysctl: setting key "kernel.shmmax": Read-only file system
255
root@bfee89058713:/# echo "-kernel.shmmax = 17179869184" > shmmax.conf
root@bfee89058713:/# sysctl -e -p shmmax.conf; echo $?
sysctl: setting key "kernel.shmmax": Read-only file system
0

Revision history for this message
Vincent Fazio (vfazio) wrote :

Attaching debdiff for groovy. Same changes should work for focal

built via pbuilder-dist and tested

root@659bc6500a59:/# dpkg -i /home/vfazio/pbuilder/groovy_result/procps_3.3.16-5ubuntu3_amd64.deb
(Reading database ... 4259 files and directories currently installed.)
Preparing to unpack .../procps_3.3.16-5ubuntu3_amd64.deb ...
Unpacking procps (2:3.3.16-5ubuntu3) over (2:3.3.16-5ubuntu2) ...
Setting up procps (2:3.3.16-5ubuntu3) ...
root@659bc6500a59:/# dpkg -l procps
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=================-============-=================================
ii procps 2:3.3.16-5ubuntu3 amd64 /proc file system utilities

root@bfee89058713:/# echo "kernel.shmmax = 17179869184" > shmmax.conf
root@bfee89058713:/# sysctl -e -p shmmax.conf; echo $?
sysctl: setting key "kernel.shmmax", ignoring: Read-only file system
0
root@bfee89058713:/tmp# echo "-kernel.shmmax = 17179869184" > shmmax.conf
root@bfee89058713:/tmp# sysctl -e -p shmmax.conf; echo $?
sysctl: setting key "kernel.shmmax", ignoring: Read-only file system
0

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "groovy debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

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

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

Changed in procps (Ubuntu):
status: New → Confirmed
tags: added: rls-gg-incoming
Revision history for this message
Vincent Fazio (vfazio) wrote :

if focal needs a separate debdiff for it to get applied on that branch, let me know. focal is in need of other updates like the .tarball-version fix included in -5 in upstream debian

tags: added: fr-924
tags: removed: rls-gg-incoming
Mathew Hodson (mhodson)
Changed in procps (Ubuntu):
importance: Undecided → Medium
Changed in procps (Ubuntu Focal):
importance: Undecided → Medium
Changed in procps (Ubuntu Groovy):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.3 KiB)

This bug was fixed in the package procps - 2:3.3.17-5ubuntu1

---------------
procps (2:3.3.17-5ubuntu1) impish; urgency=low

  * Merge from Debian unstable.
    Remaining changes:
      - autopkgtest for LP: #1874824. Submitted to debian as bug 988792
      - debian/sysctl.d (Ubuntu-specific):
        + 10-console-messages.conf: stop low-level kernel messages on console.
        + 10-kernel-hardening.conf: add the kptr_restrict setting
        + 10-ipv6-privacy.conf: add a file to sysctl.d to apply the defaults
          for IPv6 privacy extensions for interfaces. (LP: #176125, #841353)
        + 10-magic-sysrq.conf: Disable most magic sysrq by default, allowing
          critical sync, remount, reboot functions. (LP: #194676, LP: #1025467)
        + 10-network-security.conf: enable rp_filter.
        + 10-ptrace.conf: describe new PTRACE setting.
        + 10-zeropage.conf: safe mmap_min_addr value for graceful fall-back.
          for armhf, and arm64.
        + 10-qemu.conf.s390x for qemu.
        + README: describe how this directory is supposed to work.
      - debian/rules: Fix cross build
      - ignore_eaccess.patch: If we get eaccess when opening a sysctl file for
        writing, don't error out. Otherwise package upgrades can fail,
        especially in containers.
        - Adjust logic due to rc no longer being propagated (LP: #1903351)
      - ignore_erofs.patch: Same as ignore_eaccess but for the case where
        part of /proc is read/only.
        - Adjust logic due to rc no longer being propagated (LP: #1903351)
      - debian/procps.maintscript: handle migration of link-protect.conf from
        /etc to /usr.
    Justification of dropped patches
      - missing_potfiles_in: Debian has now added this code in POTFILES.in
        so the patch is no longer needed
      - pmap_test: This patch disables some tests that are not causing
        any problems. These tests are run in Debian so should be run
        in Ubuntu as well
      - top_config_file_bwcompat: Debian has applied this code upstream so
        the patch is no longer needed
      - tar-version: Debian has applied this code upstream so the patch is
        no longer needed
      - stack_limit: Debian has applied this code upstream so the patch is
        no longer needed

procps (2:3.3.17-5) unstable; urgency=medium

  * Add break/replace for conflicting manpages-fr-extra Closes: #986276

procps (2:3.3.17-4) unstable; urgency=medium

  * Remove w alternative in postinst Closes: #982803

procps (2:3.3.17-3) unstable; urgency=medium

  * Install language files Closes: #982437
  * Add epoch to manpages-pl Replaces/Breaks Closes: #982566
  * Remove conflict with w-bassman as removed in 2010
  * Remove w alternative as there is no alternative Closes: #982440
  * Update to debhelper 13
  * d/control: Remove conflict from non-existent pgrep package

procps (2:3.3.17-2) unstable; urgency=medium

  * Rename pwait to pidwait Closes: #982391
  * Mark autopkgtest as superficial Closes: #974459
  * Actually install the translated manpages Closes: #953743

procps (2:3.3.17-1) unstable; urgency=medium

  * New upstream source
    - sysctl: Match systemd directory order Closes: ...

Read more...

Changed in procps (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

I've gone ahead and uploaded the patches for F, G and H.

Changed in procps (Ubuntu Focal):
assignee: nobody → Brian Murray (brian-murray)
status: New → In Progress
Changed in procps (Ubuntu Groovy):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
Changed in procps (Ubuntu Hirsute):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Steve Langasek (vorlon) wrote :

+ case EROFS:
+ ignore_failure = true;
+ xwarn(_("setting key \"%s\"%s"), outname, (ignore_failure?_(", ignoring"):""));
+ break;
                default:
                        xwarn(_("setting key \"%s\"%s"), outname, (ignore_failure?_(", ignoring"):""));
                        break;

Instead of reproducing the xwarn() call, I believe this should be:

+ case EROFS:
+ ignore_failure = true;
                default:
                        xwarn(_("setting key \"%s\"%s"), outname, (ignore_failure?_(", ignoring"):""));
                        break;

I would prefer to see this reconciled before proceeding with the SRU.

Revision history for this message
William Wilson (jawn-smith) wrote :

The attached patch cleans up the switch statement to not replicate the xwarn.

Revision history for this message
Brian Murray (brian-murray) wrote :

I've reconciled the concern raised in comment #7 now.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Vincent, or anyone else affected,

Accepted procps into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/procps/2:3.3.16-5ubuntu3.1 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, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. 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 for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in procps (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Changed in procps (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed-groovy
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Vincent, or anyone else affected,

Accepted procps into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/procps/2:3.3.16-5ubuntu2.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, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. 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 for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in procps (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Vincent, or anyone else affected,

Accepted procps into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/procps/2:3.3.16-1ubuntu2.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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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 for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Vincent Fazio (vfazio) wrote (last edit ):
Download full text (5.4 KiB)

I've tested focal/groovy/hirsute and the changes seem to work.

---

root@9ff1aefae2e8:/tmp# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

root@9ff1aefae2e8:/tmp# sysctl -V
sysctl from procps-ng UNKNOWN

root@9ff1aefae2e8:/tmp# dpkg -l procps
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-===================-============-=================================
ii procps 2:3.3.16-1ubuntu2.2 amd64 /proc file system utilities

root@9ff1aefae2e8:/tmp# echo "kernel.shmmax = 17179869184" > shmmax.conf
root@9ff1aefae2e8:/tmp# sysctl -e -p shmmax.conf; echo $?
sysctl: setting key "kernel.shmmax", ignoring: Read-only file system
0

root@9ff1aefae2e8:/tmp# echo "-kernel.shmmax = 17179869184" > shmmax.conf
root@9ff1aefae2e8:/tmp# sysctl -e -p shmmax.conf; echo $?
sysctl: setting key "kernel.shmmax", ignoring: Read-only file system
0

root@9ff1aefae2e8:/tmp# useradd test
root@9ff1aefae2e8:/tmp# su test
$ bash

test@9ff1aefae2e8:/tmp$ echo "kernel.shmmax = 17179869184" > shmmax.conf
test@9ff1aefae2e8:/tmp$ sysctl -e -p shmmax.conf; echo $?
sysctl: permission denied on key "kernel.shmmax", ignoring
0

test@9ff1aefae2e8:/tmp$ echo "-kernel.shmmax = 17179869184" > shmmax.conf
test@9ff1aefae2e8:/tmp$ sysctl -e -p shmmax.conf; echo $?
sysctl: permission denied on key "kernel.shmmax", ignoring
0

---

root@bc651792633c:/tmp# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.10 (Groovy Gorilla)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.10"
VERSION_ID="20.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=groovy
UBUNTU_CODENAME=groovy

root@bc651792633c:/tmp# sysctl -V
sysctl from procps-ng 3.3.16

root@bc651792633c:/tmp# dpkg -l procps
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-===================-============-=================================
ii procps 2:3.3.16-5ubuntu2.2 amd64 /proc file system utilities

root@bc651792633c:/tmp# echo "kernel.shmmax = 17179869184" > shmmax.conf
root@bc651792633c:/tmp# sysctl -e -p shmmax.conf; echo $?
sysctl: setting key "kernel.shmmax", ignoring: Read-only file system
0

root@bc651792633c:/tmp# echo "-kernel.shmmax = 17179869184" > shmmax.conf
root@bc651792633c:/tmp# sysctl -e -p shmmax.conf; echo $?
sysctl: setting key "kernel.shmmax", ign...

Read more...

Vincent Fazio (vfazio)
tags: added: verification-done verification-done-focal verification-done-groovy verification-done-hirsute
removed: verification-needed verification-needed-focal verification-needed-groovy verification-needed-hirsute
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, this SRU has been accepted without a clear test case or regression potential. I am a bit weary about releasing it in this state. I will assume there were enough SRU eyes on this one to still consider it 'good to go' even with this state of affairs - and I guess there has been some solid verification done as well. I will conditionally release this, but let's try to have a well defined SRU situation before accepting into -proposed - there are exceptions, like when it's all clear and doesn't need any explanation, but it feels a different case here.

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

This bug was fixed in the package procps - 2:3.3.16-5ubuntu3.1

---------------
procps (2:3.3.16-5ubuntu3.1) hirsute; urgency=medium

  * d/p/ignore_eaccess.patch
    - Fix conflict with 7af88da3 and adjust logic (LP: #1903351)
  * d/p/ignore_erofs.patch
    - Fix conflict with 7af88da3 and adjust logic (LP: #1903351)

 -- Brian Murray <email address hidden> Fri, 28 May 2021 09:50:58 -0700

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

The verification of the Stable Release Update for procps has completed successfully and the package is now being 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
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package procps - 2:3.3.16-5ubuntu2.2

---------------
procps (2:3.3.16-5ubuntu2.2) groovy; urgency=medium

  * d/p/ignore_eaccess.patch
    - Fix conflict with 7af88da3 and adjust logic (LP: #1903351)
  * d/p/ignore_erofs.patch
    - Fix conflict with 7af88da3 and adjust logic (LP: #1903351)

 -- Brian Murray <email address hidden> Fri, 28 May 2021 10:00:45 -0700

Changed in procps (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Vincent Fazio (vfazio) wrote :

I see the fix in -proposed for Focal, will that also be released?

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

This bug was fixed in the package procps - 2:3.3.16-1ubuntu2.2

---------------
procps (2:3.3.16-1ubuntu2.2) focal; urgency=medium

  * d/p/ignore_eaccess.patch
    - Fix conflict with 7af88da3 and adjust logic (LP: #1903351)
  * d/p/ignore_erofs.patch
    - Fix conflict with 7af88da3 and adjust logic (LP: #1903351)

 -- Brian Murray <email address hidden> Fri, 28 May 2021 10:27:30 -0700

Changed in procps (Ubuntu Focal):
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.