Bug 1227117

Summary: systemd-sysctl[189]: Couldn't write '4194304' to 'kernel/pid_max': Invalid argument
Product: [openSUSE] openSUSE Tumbleweed Reporter: Guillaume GARDET <guillaume.gardet>
Component: BasesystemAssignee: Michal Koutný <mkoutny>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: kukuk, mhocko
Version: Current   
Target Milestone: ---   
Hardware: armv7   
OS: Other   
URL: https://openqa.opensuse.org/tests/4302790/modules/journal_check/steps/11
See Also: https://bugzilla.opensuse.org/show_bug.cgi?id=1219038
Whiteboard:
Found By: openQA Services Priority:
Business Priority: Blocker: Yes
Marketing QA Status: --- IT Deployment: ---

Description Guillaume GARDET 2024-06-27 08:02:23 UTC
## Observation

openQA test in scenario opensuse-Tumbleweed-JeOS-for-AArch64-arm-jeos@aarch32-HD20G fails in
[journal_check](https://openqa.opensuse.org/tests/4302790/modules/journal_check/steps/11)

On armv7 (32-bit arm) we have the following problem since snapshot 20240625 (20240624 was fine):
**********
systemd-sysctl[189]: Couldn't write '4194304' to 'kernel/pid_max': Invalid argument
**********


## Test suite description
Maintainer: fvogt, mnowak

Start JeOS from the HDD image, configure it using the firstboot wizard and then run basic tests. console=tty0 added as needed for aarch64.


## Reproducible

Fails since (at least) Build [20240625](https://openqa.opensuse.org/tests/4301144)


## Expected result

Last good: [20240624](https://openqa.opensuse.org/tests/4298579) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=arm&distri=opensuse&flavor=JeOS-for-AArch64&machine=aarch32-HD20G&test=jeos&version=Tumbleweed)
Comment 2 Michal Hocko 2024-06-27 08:23:19 UTC
/*
 * This controls the default maximum pid allocated to a process
 */
#define PID_MAX_DEFAULT (IS_ENABLED(CONFIG_BASE_SMALL) ? 0x1000 : 0x8000)

/*
 * A maximum of 4 million PIDs should be enough for a while.
 * [NOTE: PID/TIDs are limited to 2^30 ~= 1 billion, see FUTEX_TID_MASK.]
 */ 
#define PID_MAX_LIMIT (IS_ENABLED(CONFIG_BASE_SMALL) ? PAGE_SIZE * 8 : \
        (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))

So on 32b this is 32k

Michal could you take a look please?
Comment 3 Michal Koutný 2024-06-27 08:35:51 UTC
32b, I didn't thought of them.
The simplest seems to

    -kernel.pid_max = 4194304
    +-kernel.pid_max = 4194304

So that write failures won't fail whole sysctl invocation. That should satisfy all cases.
Comment 4 Michal Koutný 2024-06-27 08:48:08 UTC
This should fix it
https://github.com/openSUSE/aaa_base/pull/156