[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError

Marc Schlaich report at bugs.python.org
Mon Mar 17 10:53:02 CET 2014


Marc Schlaich added the comment:

This comes from http://bugs.python.org/issue12098. Python 3.3 is affected, too.

Reproduction can be minimized by running the following script:


import multiprocessing


def main():
    p = multiprocessing.Process(target=lambda: None)
    p.start()
    p.join()


if __name__ == '__main__':
    main()

as

$ PYTHONHASHSEED=2147483647 python test.py
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    main()
  File "test.py", line 7, in main
    p.start()
  File "c:\Python27\lib\multiprocessing\process.py", line 130, in start
    self._popen = Popen(self)
  File "c:\Python27\lib\multiprocessing\forking.py", line 258, in __init__
    cmd = get_command_line() + [rhandle]
  File "c:\Python27\lib\multiprocessing\forking.py", line 364, in get_command_line
    opts = util._args_from_interpreter_flags()
  File "c:\Python27\lib\subprocess.py", line 508, in _args_from_interpreter_flags
    args.append('-' + opt * v)
MemoryError

----------
versions: +Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20954>
_______________________________________


More information about the Python-bugs-list mailing list