Bug 105910
Summary: | Oops/Freeze by System V semaphore | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Jun'ichi NOMURA <junichi.nomura> | ||||||||||
Component: | kernel | Assignee: | Ernie Petrides <petrides> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> | ||||||||||
Severity: | high | Docs Contact: | |||||||||||
Priority: | medium | ||||||||||||
Version: | 3.0 | CC: | kenneth.w.chen, mingo | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2005-10-19 01:35:30 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Jun'ichi NOMURA
2003-09-29 13:28:54 UTC
Created attachment 94812 [details]
Fix ipc_lock()
The patch moves lock variable from struct kern_ipc_perm to struct ipc_id.
The lock is held before reading the pointer to kern_ipc_perm.
The stock 2.4 kernel does not have this problem because it has big lock
over whole subsystem of SystemV semaphore.
The problem is introduced by semaphore scaling patch which split the
lock for each semaphore id.
Created attachment 94813 [details]
test program to reproduce the semop race
Running the attached program on SMP machine could reproduce the problem.
Example of execution:
# cc test.c
# while true; do ./a.out 256; done
Created attachment 94909 [details]
Fix ipc race (better performance)
The previous patch (#94812) had cache bouncing problem by packing
spinlocks in the array.
The attached patch instead utilize write lock of BR_SEMAPHORE_LOCK
for ipc_rmid.
Thank you very much for the reproducer program. We've made fixes to the IPC locking in RHEL 3 U1, and with your sem-crash test, I've just now verified that the fixes resolve the problem. The fixes were committed on 23-Oct-2003 in the (internal-only) build of kernel version 2.4.21-4.6.EL. Created attachment 96221 [details]
version of IPC locking fix committed to RHEL 3 U1
Here is a copy of the patch that was committed to RHEL 3 U1
to fix the IPC locking races.
|