lkml.org 
[lkml]   [2017]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: linux-next 20170519 - semaphores broken
From
Date
Hi valdis,

On 05/20/2017 10:18 PM, valdis.kletnieks@vt.edu wrote:
> Seeing problems with programs that use semaphores. The one
> that I'm getting bit by is jackd. strace says:
>
> getuid() = 967
> semget(0x282929, 0, 000) = 229376
> semop(229376, [{0, -1, SEM_UNDO}], 1) = -1 EIDRM (Identifier removed)
> write(2, "JACK semaphore error: semop (Ide"..., 49JACK semaphore error: semop (Identifier removed)
> ) = 49
>
> Bisects down to this commit, and reverting it from 20170519 makes things work
> again. No idea why this causes indigestion, there's probably something subtly
> wrong here....
Duh, thanks.
There was another report that got a 99% improvement, which I did not
understand.

Probable root cause:
> sma = container_of(ipc_rcu_alloc(size), struct sem_array,
> sem_perm);
> if (!sma)
> return -ENOMEM;
>
> memset(sma, 0, size);
>
sma->sem_perm.refcount was initialized by ipc_rcu_alloc.
And due to the SEM_UNDO, the refcount is relevant.

Thanks for bisecting it, I'll update the patch.

--
Manfred

\
 
 \ /
  Last update: 2017-05-21 16:10    [W:1.300 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site