This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brandtbucher
Recipients brandtbucher
Date 2019-06-26.22:22:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561587746.71.0.976232092459.issue37420@roundup.psfhosted.org>
In-reply-to
Content
This is related to bpo-37417: os.sched_setaffinity doesn't properly handle errors that arise during iteration of the mask argument:

Python 3.9.0a0 (heads/master:d52a83a, Jun 26 2019, 15:13:41) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> bad_iter = map(int, "0X")
>>> os.sched_setaffinity(0, bad_iter)
ValueError: invalid literal for int() with base 10: 'X'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: <built-in function sched_setaffinity> returned a result with an error set

It looks like this bug is also present on all versions of Python 3. I've attached a patch with a fix and a regression test.
History
Date User Action Args
2019-06-26 22:22:26brandtbuchersetrecipients: + brandtbucher
2019-06-26 22:22:26brandtbuchersetmessageid: <1561587746.71.0.976232092459.issue37420@roundup.psfhosted.org>
2019-06-26 22:22:26brandtbucherlinkissue37420 messages
2019-06-26 22:22:26brandtbuchercreate
Morty Proxy This is a proxified and sanitized view of the page, visit original site.