stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)

Bug #1973214 reported by Michael Reed
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stress-ng
Fix Released
Undecided
Colin Ian King
stress-ng (Ubuntu)
Fix Released
Undecided
Colin Ian King
Jammy
Won't Fix
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Colin Ian King

Bug Description

On 22.04 stress-ng with the shm-sysv option gives error messages while appearing to pass.

stress-ng: info: [1600030] setting to a 300 second (5 mins, 0.00 secs) run per stressor
stress-ng: info: [1600030] dispatching hogs: 160 shm-sysv
stress-ng: fail: [1600332] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600049] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600369] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600364] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600179] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600110] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600370] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600214] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600045] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600276] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: fail: [1600293] stress-ng-shm-sysv: shmat failed, errno=22 (Invalid argument)
stress-ng: info: [1600030] successful run completed in 300.11s (5 mins, 0.11 secs)

Steps to reproduce:
stress-ng --aggressive --verify --timeout 300 --shm-sysv 0

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

$ uname -a
Linux 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ sudo apt-cache policy stress-ng
stress-ng:
  Installed: 0.13.12-2
  Candidate: 0.13.12-2
  Version table:
 *** 0.13.12-2 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status

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

The same issue is not seen on 20.04

$ stress-ng --aggressive --verify --timeout 300 --shm-sysv 0
stress-ng: info: [7859] dispatching hogs: 224 shm-sysv
stress-ng: info: [7859] successful run completed in 301.19s (5 mins, 1.19 secs)

$ uname -a
Linux 5.4.0-110-generic #124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ sudo apt-cache policy stress-ng
stress-ng:
  Installed: 0.11.07-1ubuntu2
  Candidate: 0.11.07-1ubuntu2
  Version table:
 *** 0.11.07-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.11.07-1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

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

Is there a stress-ng log in the submission you can attach here? I know you said it's new to Jammy, so likely this IS related to a potential regression in 5.15, but your passing output is from running a single test case out of context and your failing output is from a full stress-ng run with multiple stressors before and after that could affect the result, and is filtered through the lens of a python wrapper.

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

Here is the output from the the certification run.

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

Fix committed upstream:

commit 6f7aaab0cb6fa29bcd64f36797acc40ef1eab987 (HEAD -> master)
Author: Colin Ian King <email address hidden>
Date: Fri Sep 9 15:28:53 2022 +0100

    stress-shm-sysv: move exercise_shmat to end of each test round

    Exercise shmat after the main round of testing so that any invalid
    failures don't cause shmat failures in the main test loop. Also ensure
    any failures in the child process get passed back to the main process
    via the exit return code from the child.

    Fixes: https://github.com/ColinIanKing/stress-ng/issues/227

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

I'll try and SRU this sooner than later

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

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

---------------
stress-ng (0.14.03-1ubuntu1) kinetic; urgency=medium

  * Fix shmat failure and fix error handling (LP: #1973214)
    Upstream fix f7aaab0cb6fa29bcd64f36797acc40ef1eab987
    ("stress-shm-sysv: move exercise_shmat to end of each test round")

 -- Colin Ian King <email address hidden> Fri, 9 Sep 2022 15:55:11 +0100

Changed in stress-ng (Ubuntu Kinetic):
status: New → Fix Released
Changed in stress-ng (Ubuntu Jammy):
status: New → Won't Fix
Changed in stress-ng:
status: New → Fix Released
assignee: nobody → Colin Ian King (colin-king)
Changed in stress-ng (Ubuntu Kinetic):
assignee: nobody → Colin Ian King (colin-king)
Changed in stress-ng (Ubuntu):
assignee: nobody → Colin Ian King (colin-king)
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.