[issue33329] sigaddset() can fail on some signal numbers

2019-05-10 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg342090 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33329] sigaddset() can fail on some signal numbers

2019-05-10 Thread Ned Deily
Ned Deily added the comment: New changeset 2226139aa2b69047cb54dbcfd79f5c2e36f98653 by larryhastings (Cheryl Sabella) in branch '3.4': [3.4] bpo-33329: Fix multiprocessing regression on newer glibcs (GH-6575) (#12145) https://github.com/python/cpython/commit/2226139aa2b69047cb54dbcfd79f5c2e3

[issue33329] sigaddset() can fail on some signal numbers

2019-03-03 Thread Larry Hastings
Larry Hastings added the comment: Now fixed in 3.4 and 3.5. I can cut the RCs. Huzzah! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33329] sigaddset() can fail on some signal numbers

2019-03-03 Thread Larry Hastings
Larry Hastings added the comment: New changeset 2226139aa2b69047cb54dbcfd79f5c2e36f98653 by larryhastings (Cheryl Sabella) in branch '3.4': [3.4] bpo-33329: Fix multiprocessing regression on newer glibcs (GH-6575) (#12145) https://github.com/python/cpython/commit/2226139aa2b69047cb54dbcfd79f

[issue33329] sigaddset() can fail on some signal numbers

2019-03-03 Thread Larry Hastings
Larry Hastings added the comment: New changeset 8ec1fd11f2d524859cfefae76458fcfd22decf65 by larryhastings (Cheryl Sabella) in branch '3.5': [3.5] bpo-33329: Fix multiprocessing regression on newer glibcs (GH-6575) (#12144) https://github.com/python/cpython/commit/8ec1fd11f2d524859cfefae76458

[issue33329] sigaddset() can fail on some signal numbers

2019-03-03 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +12145 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue33329] sigaddset() can fail on some signal numbers

2019-03-03 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +12144 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue33329] sigaddset() can fail on some signal numbers

2019-03-01 Thread Miro Hrončok
Miro Hrončok added the comment: I am not able to do PRs right now but here are the Fedora patches: https://src.fedoraproject.org/rpms/python34/blob/master/f/00302-fix-multiprocessing-regression-on-newer-glibcs.patch https://src.fedoraproject.org/rpms/python35/blob/master/f/00302-fix-multiproces

[issue33329] sigaddset() can fail on some signal numbers

2019-03-01 Thread Larry Hastings
Larry Hastings added the comment: These issues also occur on Python 3.4 and 3.5. And I'm now upgraded to Ubuntu 18.10 which I guess has the new version of glibc. The regression test suite for both 3.4 and 3.5 blocks forever on three tests (multiprocessing_fork, multiprocessing_forkserver, a

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Miro Hrončok
Miro Hrončok added the comment: Antoine, thank you very much for swift communication and fix. -- ___ Python tracker ___ ___ Python-b

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Miro, this should be fixed now. Please reopen if it isn't. The sigfillset() functionality will be exposed to Python users in bpo-2. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset b0ca398cabd2d2ea2d66fa50b08e297a60388c75 by Antoine Pitrou in branch '3.6': [3.6] bpo-33329: Fix multiprocessing regression on newer glibcs (GH-6575) (GH-6582) https://github.com/python/cpython/commit/b0ca398cabd2d2ea2d66fa50b08e297a60388c75 -

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +6282 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +njs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 75a3e3d5bc0be1ce41289b661e7c53039cf3d5ba by Antoine Pitrou (Miss Islington (bot)) in branch '3.7': bpo-33329: Fix multiprocessing regression on newer glibcs (GH-6575) (GH-6579) https://github.com/python/cpython/commit/75a3e3d5bc0be1ce41289b661e7c

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +6280 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +6279 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 25038ecfb665bef641abf8cb61afff7505b0e008 by Antoine Pitrou in branch 'master': bpo-33329: Fix multiprocessing regression on newer glibcs (GH-6575) https://github.com/python/cpython/commit/25038ecfb665bef641abf8cb61afff7505b0e008 -- ___

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Adhemerval Zanella
Adhemerval Zanella added the comment: What I mean is for master glibc, which contains BZ#22391, 'sigaddset' will fail do add signal 32 and 33. But since you are now ignoring 'sigaddset' return code, it does not matter. -- ___ Python tracker

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Not sure what you mean. In the example above, I try to block signals 32 and 33 using pthread_sigmask(), but the pthread_sigmask() return value shows they weren't blocked, which is ok. -- ___ Python tracker

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Adhemerval Zanella
Adhemerval Zanella added the comment: Yes, this is the issue I referred in previous comment [1]. Unfortunately it is only fixed on master (which will become 2.28). [1] https://sourceware.org/bugzilla/show_bug.cgi?id=22391 -- ___ Python tracker

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +6276 stage: needs patch -> patch review ___ Python tracker ___ ___ Pyt

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Right, but it seems that even if sigaddset() allowed you to "set" signals 32 and 33, that would be ignored by pthread_sigmask(). This is what I get here (Ubuntu 16.04, glibc 2.23): >>> signal.pthread_sigmask(signal.SIG_BLOCK, range(1, 65)) set() >>> signal.pt

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Adhemerval Zanella
Adhemerval Zanella added the comment: Yes I am aware, but I can't see a really portable way to provide the same functionality as 'sigfillset'. Ideally a libc implementation would return EINVAL on 'sigaddset' for invalid signals, but even for glibc this is not true (the very issue I fixed).

[issue33329] sigaddset() can fail on some signal numbers

2018-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think we want to be in the business of maintaining a list of cross-platform of supported signal values. Python may be compiled on bizarre non-glibc systems (or even systems with a proprietary libc). -- ___

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Adhemerval Zanella
Adhemerval Zanella added the comment: One option would be to create a list of possible defined signals and check if the signal is on the list. For realtime signals, it just a matter to check if SIGRTMIN <= signal <= SIGRTMAX. The glibc defined signals can be checked at tst-signal.c [1] or fr

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Change by Antoine Pitrou : -- assignee: -> pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Why not export and use the canonical way of > sigemptyset/sigfillset/sigaddset/sigdelset/sigismember instead of pushing for > more potential non-conformant code? I agree this is the proper fix and that's what I plan to do in Python 3.8. For Python 3.7 an

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Adhemerval Zanella
Adhemerval Zanella added the comment: Also keep in mind that POSIX [1] specifies that sigaddset *may* fail with EINVAL for not support signals, so a conforming implementation may not fail on sigaddset and still remove the internal signal in a sigprocmask (uclibc for instance). [1] http://pub

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Adhemerval Zanella
Adhemerval Zanella added the comment: Why not export and use the canonical way of sigemptyset/sigfillset/sigaddset/sigdelset/sigismember instead of pushing for more potential non-conformant code? For glibc sigfillset will correctly fill all the signal set structure while removing the internal

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Miro Hrončok
Miro Hrončok added the comment: This indeed makes the tests pass again: # python3.7 -m test.regrtest test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spawn Run tests sequentially 0:00:00 load avg: 1.02 [1/3] test_multiprocessing_fork /usr/lib64/python3.7/multiproc

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Miro, can you give the following patch a try? diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 7916160..ca76a20 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -819,7 +819,6 @@ iterable_to_sigset(PyObject *iterable, sigset_

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > We could do that, but I'd rather something not multiprocessing-specific ... and also not Linux-specific. -- ___ Python tracker ___

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: We could do that, but I'd rather something not multiprocessing-specific. I think we have to ignore the return value of sigaddset() until issue2 allows us to be smarter. -- ___ Python tracker

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Miro Hrončok
Miro Hrončok added the comment: Should the fix be to exclude 32 and 33 from multiprocessing.resource_sharer:_serve? if hasattr(signal, 'pthread_sigmask'): signal.pthread_sigmask(signal.SIG_BLOCK, range(1, signal.NSIG)) -- ___ Python tra

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Setting as release blocker as it impacts functionality of the multiprocessing module. -- nosy: +ned.deily priority: critical -> release blocker ___ Python tracker __

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Miro Hrončok
Miro Hrončok added the comment: Python 2 testsuite runs fine. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Running the whole test suite sounds fine. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Miro Hrončok
Miro Hrončok added the comment: I cannot find a corresponding test in 2.7. Running the entire build (incl. tests) to see what happens. Is there a command or a couple I could try instead? I'm afraid I don't understand how does that test work (I seems a bit complicated) -- ___

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Miro, could you check whether 2.7 is affected too? -- ___ Python tracker ___ ___ Python-bugs-list

[issue33329] sigaddset() can fail on some signal numbers

2018-04-22 Thread Antoine Pitrou
Change by Antoine Pitrou : -- priority: normal -> critical stage: -> needs patch title: test_multiprocessing_fork, _forkserver, _spawn hangs: ValueError: signal number 32 out of range -> sigaddset() can fail on some signal numbers type: -> behavior versions: +Python 3.8 -Python 3.4, P