Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault when importing osmium and torch #123

Closed
SBCV opened this issue Jan 17, 2020 · 4 comments
Closed

Segmentation fault when importing osmium and torch #123

SBCV opened this issue Jan 17, 2020 · 4 comments

Comments

@SBCV
Copy link

SBCV commented Jan 17, 2020

Running

import torch
import osmium

causes

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

I'm running Ubuntu 18.04 with miniconda.
pip list shows me that I'm using osmium 2.15.3 and torch 1.3.1.

@lonvia
Copy link
Member

lonvia commented Jan 18, 2020

This is likely a similar issue like #116 with incompatible libraries. Try installing pyosmium from source with: pip install --no-binary :all: osmium (you need to have the prerequisites installed as mentioned in the README).

@lonvia
Copy link
Member

lonvia commented Feb 4, 2020

https://uwekorn.com/2019/09/15/how-we-build-apache-arrows-manylinux-wheels.html describes the issue in detail and also the solution. It comes down to restricting the exported symbols.

@lonvia
Copy link
Member

lonvia commented Feb 5, 2020

Digging more into this: torch is heavily exporting all kinds of stuff from the stdlibc++, pyosmium doesn't export any symbols. So maybe the symbols are not the issue.

pybind/pybind11#1262 mentions that two modules using pybind11 might clash. For that issue an update to pybind11 2.4 would help. The latest release is still shipped with 2.3.

@lonvia
Copy link
Member

lonvia commented Mar 5, 2020

Fixed with manylinux2010 binary wheels. Please be aware that a recent version of pip is needed. The version shipped with Ubuntu is too old.

@lonvia lonvia closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants