pip crashes when reinstalling native wheels
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pip |
Fix Released
|
Unknown
|
|||
python-pip (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On Ubuntu 18.04 (and ,
Running 'pip install simplejson' or 'pip install PyOpenSSL' twice
crashes on exit because their shared libraries are overwritten while in use.
To reproduce:
$ sudo apt install python-pip
$ pip install simplejson
$ pip install simplejson
Segmentation fault (core dumped)
Running (on some machines, at least) under gdb is illuminating:
$ sudo apt install python-dbg
$ gdb python
(gdb) set args -m pip install simplejson
(gdb) run
Starting program: /usr/bin/python -m pip install simplejson
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
Collecting simplejson
Installing collected packages: simplejson
Successfully installed simplejson-3.16.0
Program received signal SIGSEGV, Segmentation fault.
0x000055555562ae84 in visit_decref () at ../Modules/
360 ../Modules/
(gdb) bt
#0 0x000055555562ae84 in visit_decref ()
at ../Modules/
#1 0x000055555562b004 in dict_traverse.
at ../Objects/
#2 0x0000555555629da5 in subtract_refs ()
at ../Modules/
#3 collect.lto_priv () at ../Modules/
#4 0x0000555555686721 in PyGC_Collect ()
at ../Modules/
#5 0x0000555555685923 in Py_Finalize () at ../Python/
#6 0x00005555556a9bc8 in Py_Exit (sts=sts@entry=0)
at ../Python/
That backtrace that looks similar to
https:/
Happily, the fix that was committed for the bug seems simple and plausible, and cherrypicking it seems to prevent the crash.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: python-pip 9.0.1-2.3~ubuntu1
ProcVersionSign
Uname: Linux 4.15.0-46-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
Date: Sat Mar 23 21:46:31 2019
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: python-pip
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in pip: | |
status: | Unknown → Fix Released |
https:/ /launchpad. net/~dank/ +archive/ ubuntu/ python- fixes contains an updated pip with the cherrypicked fix. kegel.com/ linux/howto- ppa/ happens to document how it was prepared.)
(Also, http://