View Issue Details

IDProjectCategoryView StatusLast Update
0000555Other Unix PortBugpublic2020-08-24 03:13
ReporterSteven Levine Assigned Topsmedley  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformeCS/OS2OSeComstation or OS/2OS Version1.x 2.x or 4.5
Summary0000555: hg mercurial fails attempting to access /dev/urandom
DescriptionMercurial needs to avoid unprotected attempts to access /dev/urandom
Steps To ReproduceFrom an existing mozilla repo (or probably any hg repo) do

  hg pull -u

This results in

pulling from http://hg.mozilla.org/mozilla-central/
searching for changes
adding changesets
adding manifests
adding file changes
added 431 changesets with 1801 changes to 1136 files
abort: No such file or directory: /dev/urandom


Additional InformationIt is the update operation that is triggering the abort. To locate the code that needs to be modified, do

  hg --traceback update

which results in the attached tmp.out. The output indicates that

  File "D:/usr/python27/Lib/random.py", line 111, in seed
    a = long(_hexlify(_urandom(16)), 16)

needs to be dealt with.
TagsNo tags attached.
Attached Files
tmp.out (3,760 bytes)

Activities

psmedley

2012-12-13 08:22

administrator   ~0002369

I fixed this. I triggered the bug testing virtualenv.

New python27.dll is at http://smedley.id.au/python-2.7.3-fix.zip

New diff - http://smedley.id.au/Python-2.7.3.diff see random.c for the fix - which is to use the openssl random stuff like vms does.

Steven Levine

2012-12-14 01:29

manager   ~0002370

Works fine here. I'm working with the mozilla sources, which is a good stress test. Thanks.

psmedley

2012-12-15 21:58

administrator   ~0002371

Fixed in latest 2.7.3 code that's currently on my hd :)

Issue History

Date Modified Username Field Change
2012-12-11 08:27 Steven Levine New Issue
2012-12-11 08:33 Steven Levine File Added: tmp.out
2012-12-11 08:35 Steven Levine Additional Information Updated
2012-12-13 08:22 psmedley Note Added: 0002369
2012-12-14 01:29 Steven Levine Note Added: 0002370
2012-12-15 21:58 psmedley Note Added: 0002371
2012-12-15 21:58 psmedley Status new => resolved
2012-12-15 21:58 psmedley Resolution open => fixed
2012-12-15 21:58 psmedley Assigned To => psmedley
2020-08-24 03:13 psmedley Status resolved => closed