Commit Graph

17 Commits

Author SHA1 Message Date
Claude
f4e265a562 fix(shmem): lock the region mutexes in one order
- GetRegion() locks the local region mutex first and then the
  session-wide shmem mutex; CreateRegion() locked them in the opposite
  order
- a thread that creates a region and a thread that opens a region of
  another process in the same session can deadlock (ABBA)
- lock the local region mutex first also in CreateRegion()
- add a regression test

Refs: #334
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 13:37:01 +01:00
Claude
139111a0c5 fix(shmem): do not hold region locks while region acks stop
- RemoveRegion() held the session-wide shmem mutex and the local region
  mutex while it joined the ack threads of the region
- the ack receiver calls the user callback for each outstanding ack
  during the linger period; a callback that calls into the transport
  (e.g. GetRegionInfo(), or a message destruction that opens a region)
  waits for one of these mutexes, and the destruction never ends
- the shmem mutex is shared by all processes of the session, so the
  other processes hang also, and new processes hang at startup
- stop the acks without a lock, then lock each mutex separately and
  only for the access to the shared data
- add a regression test

Refs: #334
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 13:37:01 +01:00
Alexey Rybalchenko
45663189a9 Turn shm-monitor off by default
resolves #459
2023-02-24 14:28:18 +01:00
Alexey Rybalchenko
ac661dfd63 Add test for externally (outside the session) created shmem region 2022-10-05 09:13:37 +02:00
Dennis Klein
b798b1e098 test: Increase robustness of the test suite for high -j 2022-08-11 15:30:25 +02:00
Alexey Rybalchenko
b747a8787c shm: check region size when opening existing 2022-02-08 09:09:25 +01:00
Alexey Rybalchenko
f4d39d224b Avoid fixed ports in the test suites 2022-01-25 11:55:38 +01:00
Alexey Rybalchenko
bfd08bb33f Don't use to-be-deprecated names 2022-01-24 06:40:24 +01:00
Alexey Rybalchenko
692576a5b1 shm: add APIs for implementing keep-alive process 2021-12-16 16:27:07 +01:00
Alexey Rybalchenko
bce380d871 Implement shmem msg zero-copy 2021-09-07 20:53:16 +02:00
Alexey Rybalchenko
4fdf9d340b Fix stack-use-after-scope 2021-06-24 14:11:43 +02:00
Alexey Rybalchenko
87e0ca5450 add region cache test 2021-05-07 14:20:00 +02:00
Alexey Rybalchenko
9b48b31a75 shm: Make sure all region events are fired 2021-03-11 12:14:00 +01:00
Alexey Rybalchenko
d9a5e82160 Cleanup tools includes 2021-01-25 13:46:40 +01:00
Alexey Rybalchenko
73109fe6d3 Shm: configurable allocation strategy 2020-09-08 16:56:35 +02:00
Alexey Rybalchenko
d22023bcb5 Implement bulk callbacks for unmanaged regions 2020-05-18 14:32:19 +02:00
Alexey Rybalchenko
8cfc04721e Add unit tests for regions 2020-05-11 12:02:19 +02:00