Bug 1218801

Summary: apr breaks with kernel 6.7
Product: [openSUSE] openSUSE Tumbleweed Reporter: Jiri Slaby <jslaby>
Component: KernelAssignee: Jiri Slaby <jslaby>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: david.anes
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: reproducer
reproducer

Description Jiri Slaby 2024-01-15 09:08:21 UTC
From https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:G/apr/standard/x86_64:
testprocmutex       :  Line 122: child did not terminate with success

the child dies on https://github.com/apache/apr/blob/trunk/test/testprocmutex.c#L93:
                while ((rv = apr_proc_mutex_timedlock(proc_lock, 1))) {
                    if (!APR_STATUS_IS_TIMEUP(rv))
                        exit(1); <----- here

The test creates 6 children and does some pthread_mutex_lock/unlock in parallel. And it expects one of the to fail under some circumstances. That does not happen in 6.7.

If I revert:
commit fbeb558b0dd0d6348e0872bbbbe96e30c65867b7
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Fri Sep 15 17:19:44 2023 +0200

    futex/pi: Fix recursive rt_mutex waiter state

it works.

The test could be broken too.
Comment 1 Jiri Slaby 2024-01-15 12:52:11 UTC
Created attachment 871875 [details]
reproducer
Comment 2 Jiri Slaby 2024-01-16 07:58:14 UTC
Created attachment 871886 [details]
reproducer

There is now a band-aid (not a fix):
https://lore.kernel.org/all/20240115183338.xW3GS3Ex@linutronix.de/
Comment 3 Jiri Slaby 2024-01-16 14:01:42 UTC
fix:
https://lore.kernel.org/all/20240116130810.ji1YCxpg@linutronix.de/

committed to master. Will merge to stable later.