New GitHub issue #102874 from YvesDup:<br>

<hr>

<pre>
# Crash report

I'm working on a PR (https://github.com/python/cpython/pull/102499) and have a lot of 'Fatal Python error : Segmentation fault' in **Ubuntu** tests. 
These errors are only on the `multiprocessing.Queue` class and are mainly on the `test_compileall` and `test_concurrent_futures` unit tests.

Here are two examples of them:

 + ./python -m unittest test.test_concurrent_futures.ProcessPoolForkserverProcessPoolShutdownTest.test_submit_after_interpreter_shutdown, on https://github.com/python/cpython/actions/runs/4461678241/jobs/7835693302?pr=102499#step:17:4833
 + ./python -m unittest test.test_compileall.CommandLineTestsWithSourceEpoch.test_workers, on (https://github.com/python/cpython/actions/runs/4461678241/jobs/7835693302?pr=102499#step:17:466)

# Error messages
Partial result is:
```zsh
../..

stdout:
---
runtime-error
---

stderr:
---
Fatal Python error: Segmentation fault

Current thread 0x00007f7db45f34c0 (most recent call first):

  File "<string>", line 3 in getvalue
 File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/multiprocessing/queues.py", line 113 in get
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/concurrent/futures/process.py", line 246 in _process_worker
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/multiprocessing/process.py", line 108 in run
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/multiprocessing/process.py", line 314 in _bootstrap
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/multiprocessing/spawn.py", line 133 in _main
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/multiprocessing/forkserver.py", line 313 in _serve_one
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/multiprocessing/forkserver.py", line 274 in main
  File "<string>", line 1 in <module>
```

>From the detail of these references, I'm assuming the problem is in the `get` method of `multiprocessing.Queue`, called  from  the `ProcessPoolExecutor` function. There is indeed a queue derived from `multiprocessing.Queue` in this function. And in the `get` method, there is a test on an attribut create as a `multiprocessing.Value`.

All unit tests dedicated to this class succeed. To realize the evolution linked to the PR, I  have used a `multiprocessing.Value` to share a state. May be I used it badly ?

All tests succeed with **OSX** and **Win**. Working on OSX, I have no idea how to help and go further.

# Your environment

- CPython versions tested on: Python 3.12.0a6+
- Operating system and architecture: Ubuntu
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/102874">View on GitHub</a>
<p>Labels: type-crash</p>
<p>Assignee: </p>