When running pytest on projects using pyarrow==0.14.0 on Linux, I am getting segmentation faults, but interestingly only when run via pytest-runner (which provides the setup.py pytest command)
This works (i.e. pytest directly):
$pytestTestsessionstarts (platform: linux, Python3.7.3, pytest5.0.0, pytest-sugar0.9.2)
benchmark: 3.2.2 (defaults: timer=time.perf_counterdisable_gc=Falsemin_rounds=5min_time=0.000005max_time=1.0calibration_precision=10warmup=Falsewarmup_iterations=100000)
rootdir: /home/josh/scratch/pyarrow-issueplugins: sugar-0.9.2, Flask-Dance-2.2.0, env-0.6.2, mock-1.10.4, xdist-1.29.0, requests-mock-1.6.0, forked-1.0.2, dash-1.0.0, cov-2.7.1, html-1.21.1, benchmark-3.2.2, metadata-1.8.0collecting ...
tests/test_pyarrow.py ✓ 100% ██████████
Results (0.09s):
1passed
However, this does not work, ending in a segmentation fault, even though the tests pass:
$pythonsetup.pypytestrunningpytestrunningegg_infowritingpyarrow_issue.egg-info/PKG-INFOwritingdependency_linkstopyarrow_issue.egg-info/dependency_links.txtwritingrequirementstopyarrow_issue.egg-info/requires.txtwritingtop-levelnamestopyarrow_issue.egg-info/top_level.txtreadingmanifestfile'pyarrow_issue.egg-info/SOURCES.txt'writingmanifestfile'pyarrow_issue.egg-info/SOURCES.txt'runningbuild_extTestsessionstarts (platform: linux, Python3.7.3, pytest5.0.0, pytest-sugar0.9.2)
benchmark: 3.2.2 (defaults: timer=time.perf_counterdisable_gc=Falsemin_rounds=5min_time=0.000005max_time=1.0calibration_precision=10warmup=Falsewarmup_iterations=100000)
rootdir: /home/josh/scratch/pyarrow-issueplugins: sugar-0.9.2, Flask-Dance-2.2.0, env-0.6.2, mock-1.10.4, xdist-1.29.0, requests-mock-1.6.0, forked-1.0.2, dash-1.0.0, cov-2.7.1, html-1.21.1, benchmark-3.2.2, metadata-1.8.0collecting ...
tests/test_pyarrow.py ✓ 100% ██████████
Results (0.07s):
1passedzsh: segmentationfault (coredumped) pythonsetup.pypytest
backtrace from gdb
Thread1"python"receivedsignalSIGSEGV, Segmentationfault.
0x00007ffff7c10b58in ?? () from /usr/lib/libpython3.7m.so.1.0
(gdb) bt
#00x00007ffff7c10b58in ?? () from /usr/lib/libpython3.7m.so.1.0
#10x00007ffff7ae46ccin ?? () from /usr/lib/libpython3.7m.so.1.0
#20x00007ffff023a6b3inarrow::py::PyExtensionType::~PyExtensionType() ()
from /home/josh/.virtualenvs/default/lib/python3.7/site-packages/pyarrow/./libarrow_python.so.14
#30x00007fffed5e6467instd::unordered_map<std::string, std::shared_ptr<arrow::ExtensionType>, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::stringconst, std::shared_ptr<arrow::ExtensionType> > > >::~unordered_map() ()
from /home/josh/.virtualenvs/default/lib/python3.7/site-packages/pyarrow/./libarrow.so.14
#40x00007ffff7de5e70in__run_exit_handlers () from /usr/lib/libc.so.6
#50x00007ffff7de5faeinexit () from /usr/lib/libc.so.6
#60x00007ffff7dcfeeain__libc_start_main () from /usr/lib/libc.so.6
#70x000055555555505ein_start ()
I have observed this behaviour on my machine running natively, and also via docker. Also, 0.13.0 does not exhibit this behaviour
Environment: $ uname -a
Linux aleph 5.1.15-arch1-1-ARCH #1 SMP PREEMPT Tue Jun 25 04:49:39 UTC 2019 x86_64 GNU/Linux
$ python --version
Python 3.7.3
$ pip freeze | grep -P "(pyarrow|pytest)"
pyarrow==0.14.0
pytest==5.0.0
pytest-benchmark==3.2.2
pytest-cov==2.7.1
pytest-env==0.6.2
pytest-forked==1.0.2
pytest-html==1.21.1
pytest-metadata==1.8.0
pytest-mock==1.10.4
pytest-runner==5.1
pytest-sugar==0.9.2
pytest-xdist==1.29.0
Reporter: Josh Bode
Assignee: Wes McKinney / @wesm
Original Issue Attachments:
PRs and other links:
Note: This issue was originally created as ARROW-5863. Please see the migration documentation for further details.
When running
pyteston projects usingpyarrow==0.14.0on Linux, I am getting segmentation faults, but interestingly only when run viapytest-runner(which provides thesetup.py pytestcommand)This works (i.e.
pytestdirectly):However, this does not work, ending in a segmentation fault, even though the tests pass:
backtrace from
gdbI have observed this behaviour on my machine running natively, and also via docker. Also, 0.13.0 does not exhibit this behaviour
Environment: $ uname -a
Linux aleph 5.1.15-arch1-1-ARCH #1 SMP PREEMPT Tue Jun 25 04:49:39 UTC 2019 x86_64 GNU/Linux
$ python --version
Python 3.7.3
$ pip freeze | grep -P "(pyarrow|pytest)"
pyarrow==0.14.0
pytest==5.0.0
pytest-benchmark==3.2.2
pytest-cov==2.7.1
pytest-env==0.6.2
pytest-forked==1.0.2
pytest-html==1.21.1
pytest-metadata==1.8.0
pytest-mock==1.10.4
pytest-runner==5.1
pytest-sugar==0.9.2
pytest-xdist==1.29.0
Reporter: Josh Bode
Assignee: Wes McKinney / @wesm
Original Issue Attachments:
PRs and other links:
Note: This issue was originally created as ARROW-5863. Please see the migration documentation for further details.