Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
I believe this is caused by incomplete SHM_STAT_ANY enablement in bug 1592475. Upstream had the same issue.
Comment 4Eugene Syromiatnikov
2021-07-01 23:10:42 UTC
ipc_msg strace test has also caught the similar issue with MSG_STAT_ANY on ppc64le. SEM_STAT_ANY is likely needs fixing as well, but it seems to have slipped away from the test suite.
Red Hat Enterprise Linux 7 is in Maintenance Support 2 Phase and as such we won't be adjusting the semaphore, message, or sysv ipc interfaces to support additional flags. If we have a direct customer issue or workload that is being impacted we could reconsider this decision, but that would be on a case-by-case basis (we would want to understand the exact use case). This is the same issue as bug 1912670 where this is in the progress of being fixed for Red Hat Enterprise Linux 8.5.0.
I'm marking this as CLOSED/WONTFIX.
Applications have started to pass IPC_64 explicitly in the command argument, but this is not compatible with current glibc. I filed an upstream bug:
Restore IPC_64 support in sysvipc *ctl functions
https://sourceware.org/bugzilla/show_bug.cgi?id=29771
(A potential backport of the upstream bug needs to be handled in a different downstream bug.)
Description of problem: glibc doesn't add IPC_64 flag to SHM_STAT_ANY shmctl calls, which leads to incorrect results on ppc64/ppc64le. Version-Release number of selected component (if applicable): glibc-2.17-317.el7.ppc64, glibc-2.17-324.el7.ppc64 glibc-2.17-317.el7.ppc64le How reproducible: Easily and consistently, after some initial effort Steps to Reproduce: Reproducer: ---8<--- #include <assert.h> #include <errno.h> #include <stdio.h> #include <sys/ipc.h> #include <sys/shm.h> int main() { struct shmid_ds ds; struct shmid_ds ds_any; int id; id = shmget(IPC_PRIVATE, 4096, IPC_CREAT | 0600); if (id < 0) { perror("shmget"); return 2; } if (shmctl(id, SHM_STAT, &ds) < 0) { perror("shmctl(SHM_STAT)"); return 3; } printf("SHM_STAT shm_cpid: %#x\n", ds.shm_cpid); printf("SHM_STAT shm_atime: %#llx\n", (unsigned long long) ds.shm_atime); printf("SHM_STAT shm_dtime: %#llx\n", (unsigned long long) ds.shm_dtime); printf("SHM_STAT shm_ctime: %#llx\n", (unsigned long long) ds.shm_ctime); printf("\n"); if (shmctl(id, SHM_STAT_ANY|0x100, &ds_any) < 0) { perror("shmctl(SHM_STAT_ANY)"); return 4; } printf("SHM_STAT_ANY|IPC_64 shm_cpid: %#x\n", ds_any.shm_cpid); printf("SHM_STAT_ANY|IPC_64 shm_atime: %#llx\n", (unsigned long long) ds_any.shm_atime); printf("SHM_STAT_ANY|IPC_64 shm_dtime: %#llx\n", (unsigned long long) ds_any.shm_dtime); printf("SHM_STAT_ANY|IPC_64 shm_ctime: %#llx\n", (unsigned long long) ds_any.shm_ctime); printf("\n"); if (shmctl(id, SHM_STAT_ANY, &ds_any) < 0) { perror("shmctl(SHM_STAT_ANY)"); return 4; } printf("SHM_STAT_ANY shm_cpid: %#x\n", ds_any.shm_cpid); printf("SHM_STAT_ANY shm_atime: %#llx\n", (unsigned long long) ds_any.shm_atime); printf("SHM_STAT_ANY shm_dtime: %#llx\n", (unsigned long long) ds_any.shm_dtime); printf("SHM_STAT_ANY shm_ctime: %#llx\n", (unsigned long long) ds_any.shm_ctime); printf("\n"); assert(ds.shm_cpid == ds_any.shm_cpid); assert(ds.shm_atime == ds_any.shm_atime); assert(ds.shm_ctime == ds_any.shm_ctime); assert(ds.shm_dtime == ds_any.shm_dtime); if (shmctl(id, IPC_RMID, NULL) < 0) perror("shmctl(IPC_RMID)"); return 0; } --->8--- Compile: gcc -D_GNU_SOURCE=1 -std=c99 -Wall -Wextra -Werror ipc_repro.c -o ipc_repro Run: ./ipc_repro Actual results: Reproducer exits with exit code 0. Expected results: Reproducer aborts on the first assertion: ---8<--- ipc_repro: ipc_repro.c:53: main: Assertion `ds.shm_cpid == ds_any.shm_cpid' failed. Aborted --->8--- Additional info: Discovered by strace test suite, ipc_shm test. The same issue might occur with MSG_STAT_ANY and SEM_STAT_ANY.