nedbat / coveragepy

The code coverage tool for Python
https://coverage.readthedocs.io
Apache License 2.0
3.01k stars 433 forks source link

edge case: coverage for installing coverage #333

Closed nedbat closed 4 years ago

nedbat commented 10 years ago

Originally reported by Buck Evan (Bitbucket: bukzor, GitHub: bukzor)


I have a system which attempts to wrap pip. I need to test installing things. I chose to install the coverage package as a test scenario. The test is being run under coverage. I get a "bus error".

On closer inspection, the bus error occurs while cpython is calling call_trace() for a python-level call to copyfile() of the tracer.so, and afterwards the .so file is an empty file.

I can work around this by not using coverage as a test scenario, but there might be bugs revealed by this scenario that you'd be interested in fixing.

Here's a trace of the core dump, first at a python level, then at a C level:

warning: core file may not match specified executable file.
[New LWP 23086]

warning: Can't read pathname for load map: Input/output error.
Error while mapping shared library sections:
`/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/coverage/tracer.cpython-34dm.so': not in executable format: File truncated
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff8c000000
Core was generated by `/home/travis/Yelp/venv-update/.tox/py34-test/bin/python3.4 /home/travis/Yelp/ve'.
Program terminated with signal 7, Bus error.
#0  0x00007f7866439545 in ?? ()

Thread 1 (Thread 0x7f7869607700 (LWP 23086)):
Traceback (most recent call first):
  File "/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/shutil.py", line 109, in copyfile
    copyfileobj(fsrc, fdst)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/shutil.py", line 244, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/wheel.py", line 209, in clobber
    shutil.copy2(srcfile, destfile)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/venv_update.py", line 80, in pip
    result = pipmodule.main(list(args))
  File "/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/venv_update.py", line 186, in do_install
    pip(install + ('--no-index',) + requirements_as_options)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/venv_update.py", line 223, in main
    exit_code = do_install(reqs)
  File "/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update", line 9, in <module>
    load_entry_point('venv-update==0.0a2', 'console_scripts', 'venv-update')()

Thread 1 (Thread 0x7f7869607700 (LWP 23086)):
#0  0x00007f7866439545 in ?? ()
#1  0x00000000005b1d2a in call_trace (func=0x7f7866439545, obj=<unknown at remote 0x7f78682794d8>, tstate=0x268f670, frame=Frame 0x2e291b8, for file /home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/shutil.py, line 109, in copyfile (src='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage/coverage/tracer.cpython-34dm.so', dst='/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/coverage/tracer.cpython-34dm.so', follow_symlinks=True, fn='/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/coverage/tracer.cpython-34dm.so', st=(33277, [12190430 (bb)](https://bitbucket.org/ned/coveragepy/commits/12190430), 56, 1, 1000, 1000, 33162, [1415225740 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225740), [1415225726 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225726), [1415225726 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225726)), fsrc=<_io.BufferedReader at remote 0x7f78626bc838>, fdst=<_io.BufferedWriter at remote 0x7f7861b6e838>), what=2, arg=None) at Python/ceval.c:3918
#2  0x00000000005b1ef5 in maybe_call_line_trace (func=0x7f7866439545, obj=<unknown at remote 0x7f78682794d8>, tstate=0x268f670, frame=Frame 0x2e291b8, for file /home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/shutil.py, line 109, in copyfile (src='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage/coverage/tracer.cpython-34dm.so', dst='/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/coverage/tracer.cpython-34dm.so', follow_symlinks=True, fn='/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/coverage/tracer.cpython-34dm.so', st=(33277, [12190430 (bb)](https://bitbucket.org/ned/coveragepy/commits/12190430), 56, 1, 1000, 1000, 33162, [1415225740 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225740), [1415225726 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225726), [1415225726 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225726)), fsrc=<_io.BufferedReader at remote 0x7f78626bc838>, fdst=<_io.BufferedWriter at remote 0x7f7861b6e838>), instr_lb=0x7fff8bed7a7c, instr_ub=0x7fff8bed7a78, instr_prev=0x7fff8bed7a80) at Python/ceval.c:3966
#3  0x000000000059b8ab in PyEval_EvalFrameEx (f=Frame 0x2e291b8, for file /home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/shutil.py, line 109, in copyfile (src='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage/coverage/tracer.cpython-34dm.so', dst='/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/coverage/tracer.cpython-34dm.so', follow_symlinks=True, fn='/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/coverage/tracer.cpython-34dm.so', st=(33277, [12190430 (bb)](https://bitbucket.org/ned/coveragepy/commits/12190430), 56, 1, 1000, 1000, 33162, [1415225740 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225740), [1415225726 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225726), [1415225726 (bb)](https://bitbucket.org/ned/coveragepy/commits/1415225726)), fsrc=<_io.BufferedReader at remote 0x7f78626bc838>, fdst=<_io.BufferedWriter at remote 0x7f7861b6e838>), throwflag=0) at Python/ceval.c:1304
#4  0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f7866425400>, globals={'__all__': ['copyfileobj', 'copyfile', 'copymode', 'copystat', 'copy', 'copy2', 'copytree', 'move', 'rmtree', 'Error', 'SpecialFileError', 'ExecError', 'make_archive', 'get_archive_formats', 'register_archive_format', 'unregister_archive_format', 'get_unpack_formats', 'register_unpack_format', 'unregister_unpack_format', 'unpack_archive', 'ignore_patterns', 'chown', 'which', 'disk_usage'], '__name__': 'shutil', 'sys': <module at remote 0x7f78683bd7d8>, '_find_unpack_format': <function at remote 0x7f78661804a8>, 'ExecError': <type at remote 0x288cde8>, '_copyxattr': <function at remote 0x7f786617f058>, 'copymode': <function at remote 0x7f786617cf70>, 'unregister_unpack_format': <function at remote 0x7f78661801c8>, 'collections': <module at remote 0x7f78681edb58>, '__doc__': "Utility functions for copying and archiving files and directory trees.\n\nXXX The functions here don't copy the resource fork or other metadata on Mac.\n\n", 'rmtree': <function at remote 0x7f786617f618>, 'copy2': <function at remote 0x7f...(truncated), locals=0x0, args=0x2e4f230, argcount=2, kws=0x2e4f240, kwcount=1, defs=0x0, defcount=0, kwdefs={'follow_symlinks': True}, closure=0x0) at Python/ceval.c:3585
#5  0x00000000005b35b2 in fast_function (func=<function at remote 0x7f786617ceb8>, pp_stack=0x7fff8bed8190, n=4, na=2, nk=1) at Python/ceval.c:4341
#6  0x00000000005b30c6 in call_function (pp_stack=0x7fff8bed8190, oparg=258) at Python/ceval.c:4259
#7  0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x2e4f088, for file /home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/shutil.py, line 244, in copy2 (src='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage/coverage/tracer.cpython-34dm.so', dst='/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/coverage/tracer.cpython-34dm.so', follow_symlinks=True), throwflag=0) at Python/ceval.c:2836
#8  0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f7866425ac0>, globals={'__all__': ['copyfileobj', 'copyfile', 'copymode', 'copystat', 'copy', 'copy2', 'copytree', 'move', 'rmtree', 'Error', 'SpecialFileError', 'ExecError', 'make_archive', 'get_archive_formats', 'register_archive_format', 'unregister_archive_format', 'get_unpack_formats', 'register_unpack_format', 'unregister_unpack_format', 'unpack_archive', 'ignore_patterns', 'chown', 'which', 'disk_usage'], '__name__': 'shutil', 'sys': <module at remote 0x7f78683bd7d8>, '_find_unpack_format': <function at remote 0x7f78661804a8>, 'ExecError': <type at remote 0x288cde8>, '_copyxattr': <function at remote 0x7f786617f058>, 'copymode': <function at remote 0x7f786617cf70>, 'unregister_unpack_format': <function at remote 0x7f78661801c8>, 'collections': <module at remote 0x7f78681edb58>, '__doc__': "Utility functions for copying and archiving files and directory trees.\n\nXXX The functions here don't copy the resource fork or other metadata on Mac.\n\n", 'rmtree': <function at remote 0x7f786617f618>, 'copy2': <function at remote 0x7f...(truncated), locals=0x0, args=0x2e4d308, argcount=2, kws=0x2e4d318, kwcount=0, defs=0x0, defcount=0, kwdefs={'follow_symlinks': True}, closure=0x0) at Python/ceval.c:3585
#9  0x00000000005b35b2 in fast_function (func=<function at remote 0x7f786617f280>, pp_stack=0x7fff8bed9c10, n=2, na=2, nk=0) at Python/ceval.c:4341
#10 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bed9c10, oparg=2) at Python/ceval.c:4259
#11 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x2e4d0c8, for file /home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/wheel.py, line 209, in clobber (source='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage/', dest='/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages', is_base=True, fixer=None, filter=None, dir='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage/coverage', subdirs=['__pycache__', 'htmlfiles'], files=['xmlreport.py', 'cmdline.py', 'version.py', 'phystokens.py', 'annotate.py', 'parser.py', 'html.py', 'bytecode.py', '__main__.py', 'files.py', 'misc.py', 'control.py', 'collector.py', 'codeunit.py', 'report.py', 'results.py', 'backward.py', 'summary.py', 'templite.py', 'execfile.py', 'tracer.cpython-34dm.so', '__init__.py', 'config.py', 'debug.py', 'data.py'], basedir='coverage', destdir='/home/travis/Yelp/...(truncated), throwflag=0) at Python/ceval.c:2836
#12 0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f786322e640>, globals={'dist_info_re': <_sre.SRE_Pattern at remote 0x7f78637f7538>, 'move_wheel_files': <function at remote 0x7f7862fb6058>, '__name__': 'pip.wheel', 'logger': <Logger(in_progress_hanging=False, in_progress=None, explicit_levels=False, consumers=[(<float at remote 0x7f7864e94b38>, <_io.TextIOWrapper at remote 0x7f78683cf790>), (10, <built-in method append of list object at remote 0x7f7861cb7a68>)], last_message='', indent=2) at remote 0x7f78649259b0>, 'sys': <module at remote 0x7f78683bd7d8>, 'wheel_ext': '.whl', '__doc__': '\nSupport for installing and building the "wheel" binary package format.\n', 'make_path_relative': <function at remote 0x7f78638b78f8>, 'uninstallation_paths': <function at remote 0x7f7862fb6280>, 'WheelBuilder': <type at remote 0x2be7bf8>, 'wheel_version': <function at remote 0x7f7862fb6338>, '__cached__': '/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/__pycache__/wheel.cpython-34.pyc', 'call_subprocess': <f...(truncated), locals=0x0, args=0x2e33040, argcount=3, kws=0x2e33058, kwcount=0, defs=0x7f78629dea20, defcount=2, kwdefs=0x0, closure=(<cell at remote 0x7f7861bde658>, <cell at remote 0x7f7861bde958>, <cell at remote 0x7f7861be9d18>, <cell at remote 0x7f7861be9e98>)) at Python/ceval.c:3585
#13 0x00000000005b35b2 in fast_function (func=<function at remote 0x7f7861ba1a68>, pp_stack=0x7fff8bedb690, n=3, na=3, nk=0) at Python/ceval.c:4341
#14 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bedb690, oparg=3) at Python/ceval.c:4259
#15 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x2e32d38, for file /home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/wheel.py, line 215, in move_wheel_files (name='coverage', user=None, home=None, root=None, pycompile=True, scheme={'data': '/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run', 'purelib': '/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages', 'platlib': '/home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages', 'headers': '/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/include/site/python3.4/coverage', 'scripts': '/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/bin'}, source='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage/', generated=[], ...(truncated), throwflag=0) at Python/ceval.c:2836
#16 0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f786322ec40>, globals={'dist_info_re': <_sre.SRE_Pattern at remote 0x7f78637f7538>, 'move_wheel_files': <function at remote 0x7f7862fb6058>, '__name__': 'pip.wheel', 'logger': <Logger(in_progress_hanging=False, in_progress=None, explicit_levels=False, consumers=[(<float at remote 0x7f7864e94b38>, <_io.TextIOWrapper at remote 0x7f78683cf790>), (10, <built-in method append of list object at remote 0x7f7861cb7a68>)], last_message='', indent=2) at remote 0x7f78649259b0>, 'sys': <module at remote 0x7f78683bd7d8>, 'wheel_ext': '.whl', '__doc__': '\nSupport for installing and building the "wheel" binary package format.\n', 'make_path_relative': <function at remote 0x7f78638b78f8>, 'uninstallation_paths': <function at remote 0x7f7862fb6280>, 'WheelBuilder': <type at remote 0x2be7bf8>, 'wheel_version': <function at remote 0x7f7862fb6338>, '__cached__': '/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/__pycache__/wheel.cpython-34.pyc', 'call_subprocess': <f...(truncated), locals=0x0, args=0x2e32c70, argcount=3, kws=0x2e32c88, kwcount=4, defs=0x7f7863239328, defcount=5, kwdefs=0x0, closure=0x0) at Python/ceval.c:3585
#17 0x00000000005b35b2 in fast_function (func=<function at remote 0x7f7862fb6058>, pp_stack=0x7fff8bedd110, n=11, na=3, nk=4) at Python/ceval.c:4341
#18 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bedd110, oparg=1027) at Python/ceval.c:4259
#19 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x2e32ac8, for file /home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/req.py, line 901, in move_wheel_files (self=<InstallRequirement(as_egg=None, extras=(), _is_bundle=None, target_dir=None, _temp_build_dir=None, editable_options={}, _egg_info_path=None, update=True, editable=False, pycompile=True, prereleases=False, req=<Requirement(unsafe_name='coverage', _Requirement__hash=-1676130159457039919, extras=(...), hashCmp=('coverage', (), frozenset()), index=[], key='coverage', project_name='coverage', specs=[]) at remote 0x7f7861cb8468>, source_dir='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage', comes_from='-r requirements.txt (line 3)', conflicts_with=None, from_bundle=False, url='file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache/coverage-3.7.1-cp34-cp34dm-linux_x86_64.whl', use_user_site=None, sati...(truncated), throwflag=0) at Python/ceval.c:2836
#20 0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f7862926f40>, globals={'InstallRequirement': <type at remote 0x2c59558>, '_build_req_from_url': <function at remote 0x7f78629453f0>, 'ask_path_exists': <function at remote 0x7f78638b3d48>, '__name__': 'pip.req', 'logger': <Logger(in_progress_hanging=False, in_progress=None, explicit_levels=False, consumers=[(<float at remote 0x7f7864e94b38>, <_io.TextIOWrapper at remote 0x7f78683cf790>), (10, <built-in method append of list object at remote 0x7f7861cb7a68>)], last_message='', indent=2) at remote 0x7f78649259b0>, 'UninstallationError': <type at remote 0x29d35b8>, 'is_installable_dir': <function at remote 0x7f78638b7560>, 'HTTPError': <type at remote 0x29de528>, 'wheel_ext': '.whl', '__doc__': None, 'uses_pycache': True, 'is_vcs_url': <function at remote 0x7f7863293e00>, 'urlparse': <module at remote 0x7f7864eed358>, 'is_archive_file': <function at remote 0x7f7863293bd8>, '_scheme_re': <_sre.SRE_Pattern at remote 0x7f78638c7880>, 'change_root': <function at remote 0x7f7863e66338>, 'write_delete_marker_file': <function at remote 0x7f...(truncated), locals=0x0, args=0x2e32748, argcount=2, kws=0x2e32758, kwcount=1, defs=0x7f78629420e8, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3585
#21 0x00000000005b35b2 in fast_function (func=<function at remote 0x7f7862941d48>, pp_stack=0x7fff8bedeb90, n=4, na=2, nk=1) at Python/ceval.c:4341
#22 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bedeb90, oparg=257) at Python/ceval.c:4259
#23 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x2e32548, for file /home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/req.py, line 671, in install (self=<InstallRequirement(as_egg=None, extras=(), _is_bundle=None, target_dir=None, _temp_build_dir=None, editable_options={}, _egg_info_path=None, update=True, editable=False, pycompile=True, prereleases=False, req=<Requirement(unsafe_name='coverage', _Requirement__hash=-1676130159457039919, extras=(...), hashCmp=('coverage', (), frozenset()), index=[], key='coverage', project_name='coverage', specs=[]) at remote 0x7f7861cb8468>, source_dir='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage', comes_from='-r requirements.txt (line 3)', conflicts_with=None, from_bundle=False, url='file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache/coverage-3.7.1-cp34-cp34dm-linux_x86_64.whl', use_user_site=None, satisfied_by=...(truncated), throwflag=0) at Python/ceval.c:2836
#24 0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f7862926640>, globals={'InstallRequirement': <type at remote 0x2c59558>, '_build_req_from_url': <function at remote 0x7f78629453f0>, 'ask_path_exists': <function at remote 0x7f78638b3d48>, '__name__': 'pip.req', 'logger': <Logger(in_progress_hanging=False, in_progress=None, explicit_levels=False, consumers=[(<float at remote 0x7f7864e94b38>, <_io.TextIOWrapper at remote 0x7f78683cf790>), (10, <built-in method append of list object at remote 0x7f7861cb7a68>)], last_message='', indent=2) at remote 0x7f78649259b0>, 'UninstallationError': <type at remote 0x29d35b8>, 'is_installable_dir': <function at remote 0x7f78638b7560>, 'HTTPError': <type at remote 0x29de528>, 'wheel_ext': '.whl', '__doc__': None, 'uses_pycache': True, 'is_vcs_url': <function at remote 0x7f7863293e00>, 'urlparse': <module at remote 0x7f7864eed358>, 'is_archive_file': <function at remote 0x7f7863293bd8>, '_scheme_re': <_sre.SRE_Pattern at remote 0x7f78638c7880>, 'change_root': <function at remote 0x7f7863e66338>, 'write_delete_marker_file': <function at remote 0x7f...(truncated), locals=0x0, args=0x7f7861caf788, argcount=3, kws=0x7f78629c7b00, kwcount=1, defs=0x7f78629b8c50, defcount=2, kwdefs=0x0, closure=0x0) at Python/ceval.c:3585
#25 0x0000000000663c11 in function_call (func=<function at remote 0x7f78629416d0>, arg=(<InstallRequirement(as_egg=None, extras=(), _is_bundle=None, target_dir=None, _temp_build_dir=None, editable_options={}, _egg_info_path=None, update=True, editable=False, pycompile=True, prereleases=False, req=<Requirement(unsafe_name='coverage', _Requirement__hash=-1676130159457039919, extras=(...), hashCmp=('coverage', (), frozenset()), index=[], key='coverage', project_name='coverage', specs=[]) at remote 0x7f7861cb8468>, source_dir='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage', comes_from='-r requirements.txt (line 3)', conflicts_with=None, from_bundle=False, url='file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache/coverage-3.7.1-cp34-cp34dm-linux_x86_64.whl', use_user_site=None, satisfied_by=None, install_succeeded=None, uninstalled=None) at remote 0x7f7861cb8128>, [], []), kw={'root': None}) at Objects/funcobject.c:632
#26 0x0000000000461905 in PyObject_Call (func=<function at remote 0x7f78629416d0>, arg=(<InstallRequirement(as_egg=None, extras=(), _is_bundle=None, target_dir=None, _temp_build_dir=None, editable_options={}, _egg_info_path=None, update=True, editable=False, pycompile=True, prereleases=False, req=<Requirement(unsafe_name='coverage', _Requirement__hash=-1676130159457039919, extras=(...), hashCmp=('coverage', (), frozenset()), index=[], key='coverage', project_name='coverage', specs=[]) at remote 0x7f7861cb8468>, source_dir='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/coverage', comes_from='-r requirements.txt (line 3)', conflicts_with=None, from_bundle=False, url='file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache/coverage-3.7.1-cp34-cp34dm-linux_x86_64.whl', use_user_site=None, satisfied_by=None, install_succeeded=None, uninstalled=None) at remote 0x7f7861cb8128>, [], []), kw={'root': None}) at Objects/abstract.c:2067
#27 0x00000000005b45f6 in ext_do_call (func=<function at remote 0x7f78629416d0>, pp_stack=0x7fff8bee0650, flags=3, na=3, nk=0) at Python/ceval.c:4558
#28 0x00000000005ab7a1 in PyEval_EvalFrameEx (f=Frame 0x2e2ca48, for file /home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/req.py, line 1435, in install (self=<RequirementSet(unnamed_requirements=[], src_dir='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/src', successfully_downloaded=[<InstallRequirement(as_egg=None, extras=(), _is_bundle=None, target_dir=None, _temp_build_dir=None, editable_options={}, _egg_info_path=None, update=True, editable=False, pycompile=True, prereleases=False, req=<Requirement(unsafe_name='simplejson', _Requirement__hash=8747952537791240648, extras=(...), hashCmp=('simplejson', (), frozenset()), index=[], key='simplejson', project_name='simplejson', specs=[]) at remote 0x7f7861cb8538>, source_dir='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/build/simplejson', comes_from='-r requirements.txt (line 1)', conflicts_with=None, from_bundle=Fal...(truncated), throwflag=0) at Python/ceval.c:2876
#29 0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f7862933ac0>, globals={'InstallRequirement': <type at remote 0x2c59558>, '_build_req_from_url': <function at remote 0x7f78629453f0>, 'ask_path_exists': <function at remote 0x7f78638b3d48>, '__name__': 'pip.req', 'logger': <Logger(in_progress_hanging=False, in_progress=None, explicit_levels=False, consumers=[(<float at remote 0x7f7864e94b38>, <_io.TextIOWrapper at remote 0x7f78683cf790>), (10, <built-in method append of list object at remote 0x7f7861cb7a68>)], last_message='', indent=2) at remote 0x7f78649259b0>, 'UninstallationError': <type at remote 0x29d35b8>, 'is_installable_dir': <function at remote 0x7f78638b7560>, 'HTTPError': <type at remote 0x29de528>, 'wheel_ext': '.whl', '__doc__': None, 'uses_pycache': True, 'is_vcs_url': <function at remote 0x7f7863293e00>, 'urlparse': <module at remote 0x7f7864eed358>, 'is_archive_file': <function at remote 0x7f7863293bd8>, '_scheme_re': <_sre.SRE_Pattern at remote 0x7f78638c7880>, 'change_root': <function at remote 0x7f7863e66338>, 'write_delete_marker_file': <function at remote 0x7f...(truncated), locals=0x0, args=0x2c9b158, argcount=3, kws=0x2c9b170, kwcount=1, defs=0x7f78629422f0, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3585
#30 0x00000000005b35b2 in fast_function (func=<function at remote 0x7f7862944f70>, pp_stack=0x7fff8bee20d0, n=5, na=3, nk=1) at Python/ceval.c:4341
#31 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bee20d0, oparg=258) at Python/ceval.c:4259
#32 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x2c9af38, for file /home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/commands/install.py, line 283, in run (self=<InstallCommand(cmd_opts=<OptionGroup(_short_opt={'-h': <Option(callback=None, choices=None, const=None, metavar=None, type=None, help='Show help.', container=<OptionGroup(_short_opt={...}, conflict_handler='error', description=None, option_class=<type at remote 0x28d38a8>, option_list=[<...>, <Option(callback=None, choices=None, const=None, metavar=None, type=None, help='SUPPRESSHELP', container=<...>, callback_kwargs=None, _short_opts=[], action='store_true', callback_args=None, _long_opts=['--require-virtualenv', '--require-venv'], dest='require_venv', nargs=None, default=False) at remote 0x7f7861cca398>, <Option(callback=None, choices=None, const=None, metavar=None, type=None, help='Give more output. Option is additive, and can be used up to 3 times.', container=<...>, callback_kwargs=None, _short_opts=['-...(truncated), throwflag=0) at Python/ceval.c:2836
#33 0x00000000005b3480 in fast_function (func=<function at remote 0x7f7862946d48>, pp_stack=0x7fff8bee3970, n=3, na=3, nk=0) at Python/ceval.c:4331
#34 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bee3970, oparg=2) at Python/ceval.c:4259
#35 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x2c99ff8, for file /home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/basecommand.py, line 122, in main (self=<InstallCommand(cmd_opts=<OptionGroup(_short_opt={'-h': <Option(callback=None, choices=None, const=None, metavar=None, type=None, help='Show help.', container=<OptionGroup(_short_opt={...}, conflict_handler='error', description=None, option_class=<type at remote 0x28d38a8>, option_list=[<...>, <Option(callback=None, choices=None, const=None, metavar=None, type=None, help='SUPPRESSHELP', container=<...>, callback_kwargs=None, _short_opts=[], action='store_true', callback_args=None, _long_opts=['--require-virtualenv', '--require-venv'], dest='require_venv', nargs=None, default=False) at remote 0x7f7861cca398>, <Option(callback=None, choices=None, const=None, metavar=None, type=None, help='Give more output. Option is additive, and can be used up to 3 times.', container=<...>, callback_kwargs=None, _short_opts=['-v'],...(truncated), throwflag=0) at Python/ceval.c:2836
#36 0x00000000005b3480 in fast_function (func=<function at remote 0x7f7862946a68>, pp_stack=0x7fff8bee5210, n=2, na=2, nk=0) at Python/ceval.c:4331
#37 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bee5210, oparg=1) at Python/ceval.c:4259
#38 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x2c45a98, for file /home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/python3.4/site-packages/pip/__init__.py, line 185, in main (initial_args=['install', '--ignore-installed', '--use-wheel', '--download-cache=/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', '--find-links=file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', '--no-index', '--requirement=requirements.txt'], cmd_name='install', cmd_args=['--ignore-installed', '--use-wheel', '--download-cache=/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', '--find-links=file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', '--no-index', '--requirement=requirements.txt'], command=<InstallCommand(cmd_opts=<OptionGroup(_short_opt={'-h': <Option(callback=None, choices=None, const=None, metavar=None, type=...(truncated), throwflag=0) at Python/ceval.c:2836
#39 0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f7864eaeac0>, globals={'git': <module at remote 0x7f78638c16d8>, 'status_codes': <module at remote 0x7f78629439d8>, '__name__': 'pip', 'PipError': <type at remote 0x29d2b08>, 'logger': <Logger(in_progress_hanging=False, in_progress=None, explicit_levels=False, consumers=[(<float at remote 0x7f7864e94b38>, <_io.TextIOWrapper at remote 0x7f78683cf790>), (10, <built-in method append of list object at remote 0x7f7861cb7a68>)], last_message='', indent=2) at remote 0x7f78649259b0>, 'get_summaries': <function at remote 0x7f7862994788>, 'sys': <module at remote 0x7f78683bd7d8>, 'exceptions': <module at remote 0x7f7864913f58>, 'pip': <module at remote 0x7f7864913658>, 'basecommand': <module at remote 0x7f7862943658>, 'CommandError': <type at remote 0x29d48c8>, 'backwardcompat': <module at remote 0x7f786493d2d8>, '__doc__': None, 'util': <module at remote 0x7f7863df7cd8>, 'locations': <module at remote 0x7f7863b54858>, '__cached__': '/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/virtualenv_run/lib/pyt...(truncated), locals=0x0, args=0x26d92c8, argcount=1, kws=0x26d92d0, kwcount=0, defs=0x7f78638b2aa8, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3585
#40 0x00000000005b35b2 in fast_function (func=<function at remote 0x7f78628fb058>, pp_stack=0x7fff8bee6c90, n=1, na=1, nk=0) at Python/ceval.c:4341
#41 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bee6c90, oparg=1) at Python/ceval.c:4259
#42 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x26d9118, for file /home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/venv_update.py, line 80, in pip (args=('install', '--ignore-installed', '--use-wheel', '--download-cache=/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', '--find-links=file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', '--no-index', '--requirement=requirements.txt'), pipmodule=<module at remote 0x7f7864913658>, sys=<module at remote 0x7f78683bd7d8>), throwflag=0) at Python/ceval.c:2836
#43 0x00000000005b3480 in fast_function (func=<function at remote 0x7f786490bbd8>, pp_stack=0x7fff8bee8530, n=1, na=1, nk=0) at Python/ceval.c:4331
#44 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bee8530, oparg=1) at Python/ceval.c:4259
#45 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x295c168, for file /home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/venv_update.py, line 186, in do_install (reqs=('requirements.txt',), requirements_as_options=('--requirement=requirements.txt',), pip_download_cache='/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', cache_opts=('--download-cache=/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', '--find-links=file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache'), install=('install', '--ignore-installed', '--use-wheel', '--download-cache=/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache', '--find-links=file:///home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache'), wheel=('wheel', '--download-cache=/home/travis/Yelp/venv-update/.tox/py34-test/tmp/pytest-0/test_second_install_faster0/.pip/cache'...(truncated), throwflag=0) at Python/ceval.c:2836
#46 0x00000000005b3480 in fast_function (func=<function at remote 0x7f7864914110>, pp_stack=0x7fff8bee9dd0, n=1, na=1, nk=0) at Python/ceval.c:4331
#47 0x00000000005b30c6 in call_function (pp_stack=0x7fff8bee9dd0, oparg=1) at Python/ceval.c:4259
#48 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x299e7c8, for file /home/travis/Yelp/venv-update/.tox/py34-test/lib/python3.4/site-packages/venv_update.py, line 223, in main (sys=<module at remote 0x7f78683bd7d8>, venv_path='virtualenv_run', reqs=('requirements.txt',), venv_args=(), CalledProcessError=<type at remote 0x2905a88>), throwflag=0) at Python/ceval.c:2836
#49 0x00000000005b3480 in fast_function (func=<function at remote 0x7f7864914338>, pp_stack=0x7fff8beeb670, n=0, na=0, nk=0) at Python/ceval.c:4331
#50 0x00000000005b30c6 in call_function (pp_stack=0x7fff8beeb670, oparg=0) at Python/ceval.c:4259
#51 0x00000000005ab2fe in PyEval_EvalFrameEx (f=Frame 0x7f7865be5bf8, for file /home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update, line 9, in <module> (), throwflag=0) at Python/ceval.c:2836
#52 0x00000000005b04db in PyEval_EvalCodeEx (_co=<code at remote 0x7f78682c57c0>, globals={'sys': <module at remote 0x7f78683bd7d8>, '__spec__': None, 'load_entry_point': <function at remote 0x7f7864eeec90>, '__name__': '__main__', '__doc__': None, '__package__': None, '__file__': '/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', '__cached__': None, '__requires__': 'venv-update==0.0a2', '__loader__': <SourceFileLoader(name='__main__', path='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update') at remote 0x7f78682a6bb8>, '__builtins__': <module at remote 0x7f78683a3358>}, locals={'sys': <module at remote 0x7f78683bd7d8>, '__spec__': None, 'load_entry_point': <function at remote 0x7f7864eeec90>, '__name__': '__main__', '__doc__': None, '__package__': None, '__file__': '/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', '__cached__': None, '__requires__': 'venv-update==0.0a2', '__loader__': <SourceFileLoader(name='__main__', path='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update') at remote 0x7f78682a6bb8>, '__builtins__': <module at remote 0x7f78683a3358>}, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3585
#53 0x000000000059aeac in PyEval_EvalCode (co=<code at remote 0x7f78682c57c0>, globals={'sys': <module at remote 0x7f78683bd7d8>, '__spec__': None, 'load_entry_point': <function at remote 0x7f7864eeec90>, '__name__': '__main__', '__doc__': None, '__package__': None, '__file__': '/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', '__cached__': None, '__requires__': 'venv-update==0.0a2', '__loader__': <SourceFileLoader(name='__main__', path='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update') at remote 0x7f78682a6bb8>, '__builtins__': <module at remote 0x7f78683a3358>}, locals={'sys': <module at remote 0x7f78683bd7d8>, '__spec__': None, 'load_entry_point': <function at remote 0x7f7864eeec90>, '__name__': '__main__', '__doc__': None, '__package__': None, '__file__': '/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', '__cached__': None, '__requires__': 'venv-update==0.0a2', '__loader__': <SourceFileLoader(name='__main__', path='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update') at remote 0x7f78682a6bb8>, '__builtins__': <module at remote 0x7f78683a3358>}) at Python/ceval.c:773
#54 0x0000000000423fc7 in run_mod (mod=0x2922470, filename='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', globals={'sys': <module at remote 0x7f78683bd7d8>, '__spec__': None, 'load_entry_point': <function at remote 0x7f7864eeec90>, '__name__': '__main__', '__doc__': None, '__package__': None, '__file__': '/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', '__cached__': None, '__requires__': 'venv-update==0.0a2', '__loader__': <SourceFileLoader(name='__main__', path='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update') at remote 0x7f78682a6bb8>, '__builtins__': <module at remote 0x7f78683a3358>}, locals={'sys': <module at remote 0x7f78683bd7d8>, '__spec__': None, 'load_entry_point': <function at remote 0x7f7864eeec90>, '__name__': '__main__', '__doc__': None, '__package__': None, '__file__': '/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', '__cached__': None, '__requires__': 'venv-update==0.0a2', '__loader__': <SourceFileLoader(name='__main__', path='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update') at remote 0x7f78682a6bb8>, '__builtins__': <module at remote 0x7f78683a3358>}, flags=0x7fff8beed320, arena=0x2916e60) at Python/pythonrun.c:2180
#55 0x0000000000423d1e in PyRun_FileExFlags (fp=0x2758570, filename_str=0x7f7865be7b20 "/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update", start=257, globals={'sys': <module at remote 0x7f78683bd7d8>, '__spec__': None, 'load_entry_point': <function at remote 0x7f7864eeec90>, '__name__': '__main__', '__doc__': None, '__package__': None, '__file__': '/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', '__cached__': None, '__requires__': 'venv-update==0.0a2', '__loader__': <SourceFileLoader(name='__main__', path='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update') at remote 0x7f78682a6bb8>, '__builtins__': <module at remote 0x7f78683a3358>}, locals={'sys': <module at remote 0x7f78683bd7d8>, '__spec__': None, 'load_entry_point': <function at remote 0x7f7864eeec90>, '__name__': '__main__', '__doc__': None, '__package__': None, '__file__': '/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update', '__cached__': None, '__requires__': 'venv-update==0.0a2', '__loader__': <SourceFileLoader(name='__main__', path='/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update') at remote 0x7f78682a6bb8>, '__builtins__': <module at remote 0x7f78683a3358>}, closeit=1, flags=0x7fff8beed320) at Python/pythonrun.c:2133
#56 0x0000000000421c8f in PyRun_SimpleFileExFlags (fp=0x2758570, filename=0x7f7865be7b20 "/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update", closeit=1, flags=0x7fff8beed320) at Python/pythonrun.c:1606
#57 0x0000000000420a6a in PyRun_AnyFileExFlags (fp=0x2758570, filename=0x7f7865be7b20 "/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update", closeit=1, flags=0x7fff8beed320) at Python/pythonrun.c:1292
#58 0x000000000043ac93 in run_file (fp=0x2758570, filename=0x268f3b0 L"/home/travis/Yelp/venv-update/.tox/py34-test/bin/venv-update", p_cf=0x7fff8beed320) at Modules/main.c:319
#59 0x000000000043b927 in Py_Main (argc=2, argv=0x268e020) at Modules/main.c:751
#60 0x000000000041ac91 in main (argc=2, argv=0x7fff8beed498) at ./Modules/python.c:69

nedbat commented 7 years ago

Original comment by Loic Dachary (Bitbucket: dachary, GitHub: dachary)


I vote this is closed as Won't fix.

nedbat commented 9 years ago

Original comment by Buck Evan (Bitbucket: bukzor, GitHub: bukzor)


This still reproduces today :)

nedbat commented 9 years ago

Original comment by Buck Evan (Bitbucket: bukzor, GitHub: bukzor)


I 100% understand. In case you ever do want to come back to it, I have an automated reproduction here:

The main mystery is: why is python reloading the tracer.so so late? I would have expected it to be loaded into memory much earlier, making filesystem operations irrelevant. Is it reloading the .so on each call_trace()?

nedbat commented 10 years ago

Buck: you've made an impressive scenario here. I'll be honest with you: I don't think I am going to be able to dig into it.

nedbat commented 10 years ago

Original comment by Buck Evan (Bitbucket: bukzor, GitHub: bukzor)


Using the above procedure, I get about 50% reproduction rate under the travis vm (ubunut 12.04) and our workstations (ubuntu 10.04). I don't get reproduction under OSX.

nedbat commented 10 years ago

Original comment by Buck Evan (Bitbucket: bukzor, GitHub: bukzor)


This seems to be a minimal reproduction:

mkdir tmp2
cd tmp2/
virtualenv tmpvenv
./tmpvenv/bin/pip install --upgrade pip wheel coverage
./tmpvenv/bin/pip wheel coverage
./tmpvenv/bin/python -m coverage.__main__ run -m pip install --no-index --ignore-installed --find-links wheelhouse/ coverage

Output:

Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking coverage
Installing collected packages: coverage
Bus error (core dumped)

Notable features:

  1. This bug only happens with wheels. I believe that a "normal" install replaces the file, while a wheel install copies the files, yielding an empty .so file for some small amount of time.
  2. While in my own scenario I would have expected the coverage .so to be loaded from elsewhere, this scenario has it being installed while in use. I still wouldn't expect this to matter, expecting that the .so file is loaded persistently into memory well ahead of the copyfile operation.
  3. I get the error under pip 1.5.6, but can't reproduce it under 1.5.4.