seccomp in ubuntu_stress_smoke_test failed on ARM64/Power8 Trusty

Bug #1801856 reported by Po-Hsu Lin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stress-ng
Fix Released
High
Colin Ian King
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned
stress-ng (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Trusty by Po-Hsu Lin
Cosmic
Fix Released
Undecided
Unassigned

Bug Description

SRU Request [Cosmic]

== Justification ==

When running stress-ng with the seccomp stressor on kernels that do not support seccomp will fail with prctl PR_SET_SECCOMP failed, errno=22 (Invalid argument) error.

== Fix ==

Upstream commit http://kernel.ubuntu.com/git/cking/stress-ng.git/commit/?id=5a26fac6bfa000960aca295fc2772abb38d7f9fa

== Testing ==

Run:

sudo stress-ng --seccomp 1

With out the fix, the test will error out with errno=22 EINVAL. With the fix the stress test will be gracefully skipped.

== Regression Potential ==

Minimal, this fix affects just the seccomp stress-ng stressor on systems that do not support seccomp prctl PR_SET_SECCOMP.

----------

Didn't see this on amd64 / i386, but it can be reproduced on power8 and ARM64

  seccomp STARTING
  seccomp RETURNED 2
  seccomp FAILED
  stress-ng: debug: [7528] 8 processors online, 8 processors configured
  stress-ng: info: [7528] dispatching hogs: 4 seccomp
  stress-ng: debug: [7528] /sys/devices/system/cpu/cpu0/cache does not exist
  stress-ng: info: [7528] cache allocate: using built-in defaults as unable to determine cache details
  stress-ng: debug: [7528] cache allocate: default cache size: 2048K
  stress-ng: debug: [7528] starting stressors
  stress-ng: debug: [7529] stress-ng-seccomp: started [7529] (instance 0)
  stress-ng: debug: [7528] 4 stressors spawned
  stress-ng: debug: [7530] stress-ng-seccomp: started [7530] (instance 1)
  stress-ng: fail: [7533] stress-ng-seccomp: prctl PR_SET_SECCOMP failed, errno=22 (Invalid argument)
  stress-ng: fail: [7534] stress-ng-seccomp: prctl PR_SET_SECCOMP failed, errno=22 (Invalid argument)
  stress-ng: debug: [7531] stress-ng-seccomp: started [7531] (instance 2)
  stress-ng: fail: [7530] stress-ng-seccomp: aborting because of unexpected failure in child process
  stress-ng: debug: [7530] stress-ng-seccomp: exited [7530] (instance 1)
  stress-ng: fail: [7529] stress-ng-seccomp: aborting because of unexpected failure in child process
  stress-ng: debug: [7529] stress-ng-seccomp: exited [7529] (instance 0)
  stress-ng: debug: [7532] stress-ng-seccomp: started [7532] (instance 3)
  stress-ng: error: [7528] process 7529 (stress-ng-seccomp) terminated with an error, exit status=1 (stress-ng core failure)
  stress-ng: debug: [7528] process [7529] terminated
  stress-ng: error: [7528] process 7530 (stress-ng-seccomp) terminated with an error, exit status=1 (stress-ng core failure)
  stress-ng: debug: [7528] process [7530] terminated
  stress-ng: fail: [7535] stress-ng-seccomp: prctl PR_SET_SECCOMP failed, errno=22 (Invalid argument)
  stress-ng: fail: [7536] stress-ng-seccomp: prctl PR_SET_SECCOMP failed, errno=22 (Invalid argument)
  stress-ng: fail: [7532] stress-ng-seccomp: aborting because of unexpected failure in child process
  stress-ng: debug: [7531] stress-ng-seccomp: exited [7531] (instance 2)
  stress-ng: error: [7528] process 7531 (stress-ng-seccomp) terminated with an error, exit status=1 (stress-ng core failure)
  stress-ng: debug: [7528] process [7531] terminated
  stress-ng: error: [7528] process 7532 (stress-ng-seccomp) terminated with an error, exit status=1 (stress-ng core failure)
  stress-ng: debug: [7528] process [7532] terminated
  stress-ng: info: [7528] unsuccessful run completed in 0.00s

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.13.0-161-generic 3.13.0-161.211
ProcVersionSignature: User Name 3.13.0-161.211-generic 3.13.11-ckt39
Uname: Linux 3.13.0-161-generic aarch64
AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.14.1-0ubuntu3.29
Architecture: arm64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
CRDA: Error: [Errno 2] No such file or directory: 'iw'
CurrentDmesg:

Date: Tue Nov 6 06:23:27 2018
IwConfig:
 lo no wireless extensions.

 enp1s0 no wireless extensions.

 enp1s0d1 no wireless extensions.
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
PciMultimedia:

ProcFB:

ProcKernelCmdLine: console=ttyS0,9600n8r ro
RelatedPackageVersions:
 linux-restricted-modules-3.13.0-161-generic N/A
 linux-backports-modules-3.13.0-161-generic N/A
 linux-firmware 1.127.24
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
tags: added: ppc64el
summary: - seccomp in ubuntu_stress_smoke_test failed on ARM64 Trusty
+ seccomp in ubuntu_stress_smoke_test failed on ARM64/Power8 Trusty
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
status: New → Confirmed
Revision history for this message
Colin Ian King (colin-king) wrote :

CONFIG_SECCOMP_FILTER does not appear to be configured for the ARM64 system, I presume this is the same for the Power8 box too.

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

The arches don't have HAVE_ARCH_SECCOMP_FILTER enabled as this has not been implemented, so seccomp filtering does not exist. I'll fix stress-ng to handle this corner case without an error.

Changed in stress-ng:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Colin Ian King (colin-king)
no longer affects: linux (Ubuntu)
Revision history for this message
Colin Ian King (colin-king) wrote :

Added check in stress-ng to ensure that the system call is implemented before testing: commit pushed:

http://kernel.ubuntu.com/git/cking/stress-ng.git/commit/?id=5a26fac6bfa000960aca295fc2772abb38d7f9fa

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Verified on both ARM64 and Power8 boxes, the fix works as expected.
Thanks!

Changed in ubuntu-kernel-tests:
status: Confirmed → Fix Released
Changed in stress-ng:
status: In Progress → Fix Released
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Po-Hsu, or anyone else affected,

Accepted stress-ng into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/stress-ng/0.09.42-1ubuntu1 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-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. 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 stress-ng (Ubuntu):
status: New → Fix Released
Changed in stress-ng (Ubuntu Cosmic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Colin Ian King (colin-king) wrote :

verified fixed with 0.09.42-1ubuntu1 on ARM64 cosmic

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for stress-ng 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
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package stress-ng - 0.09.42-1ubuntu1

---------------
stress-ng (0.09.42-1ubuntu1) cosmic; urgency=medium

  * stress-affinity: fix set affinity setting across all
    stressors (LP: #1803322)
    - fixes --seq 0 affinity setting stopping all CPUs from being used
  * stress-seccomp: add sanity check to see if SECCOMP_SET_MODE_FILTER
    works (LP: #1801856)
    - fixes false failure errors if filtering is not enabled
  * stress-dev: remove FIBMAP ioctl on device (LP: #1800609)
    - fixes error of incorrect ioctl on block device
  * stress-revio: ensure fiemap extent struct is zero'd (LP: #1798566)
    - fixes fiemap ioctl failures because of garbage in struct

 -- Colin King <email address hidden> Wed, 14 Nov 2018 17:28:22 +0000

Changed in stress-ng (Ubuntu Cosmic):
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.