[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > Yes, I've verified that: (...) Cool, thanks for the bug report and for the check. It's now fixed. In the meanwhile, you can workaround the issue by limiting yourself calls to os.urandom() to 1024 bytes (and then concatenate the result). --

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb7628e8dfef by Victor Stinner in branch '3.5': Fix os.urandom() on Solaris 11.3 https://hg.python.org/cpython/rev/fb7628e8dfef -- nosy: +python-dev ___ Python tracker

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Matthew Ryan
Matthew Ryan added the comment: Yes, I've verified that: * the issue existed in the default branch as of this morning. * the patch applies cleanly against both 3.5 and default, and addresses the issue in both branches. -- ___ Python tracker

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > The new patch looks fine Do you mean that it fixes your issue? Can it be applied to Python 3.5 & 3.6? -- ___ Python tracker

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Matthew Ryan
Matthew Ryan added the comment: The new patch looks fine; I used __sun__ rather than sun out of habit (C standard requires system specific macros be in the reserved namespace), but either will work. I found the original problem through debugging with GDB, so I know getrandom() was being called,

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > I've attached a possible patch for this issue, against the 3.5.1 source tree. I guess that you are already using Python 3.5.1 which uses getrandom(). You should try to confirm using strace. I updated your patch. I replaced "#if defined(__sun__)" with

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #25003 and the changeset 835085cc28cd: Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom() function instead of the getentropy() function. The getentropy() function is blocking to generate very good quality entropy,

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread SilentGhost
Changes by SilentGhost : -- components: +Interpreter Core nosy: +haypo stage: -> patch review ___ Python tracker ___

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-11 Thread Matthew Ryan
New submission from Matthew Ryan: On Solaris 11.3 (intel tested, but I assume issue is on SPARC as well), I found the following fails: import os os.urandom(2500) The above throws OSError: [Errno 22] Invalid argument. It turns out that the Solaris version of getrandom() is limited to