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

Error "Segmentation fault: 11" in MacOS #22

Closed
nbosc opened this issue Apr 19, 2018 · 16 comments
Closed

Error "Segmentation fault: 11" in MacOS #22

nbosc opened this issue Apr 19, 2018 · 16 comments

Comments

@nbosc
Copy link

nbosc commented Apr 19, 2018

I am doing the tutorial. When I try to build the model I get Segmentation fault: 11

I have installed the environment you provide on a macOS 10.13.3 machine.

Also the file I use as training set is caco2.sdf.

@manuelpastor
Copy link
Member

The message was not informative enough to diagnose the problem. Please update the code to the last version in the master branch and if it reproduces, contact me by e-mail to carry out some testing. Thanks for your feedback!

@nbosc
Copy link
Author

nbosc commented Jun 5, 2018

Here what I can say about this error.

First, I use macOS 13.3.4 and Jupyter's version is 4.3.0. I have downloaded the latest version of the repo.

I can activate flame and use 'manage' to create a new model or to see the list of models.

The problem occurs when I use 'build' or 'predict'. In both cases, there is no additional information but 'Segmentation fault: 11'

Of course, I have the same problem if I use the GUI.

Unfortunately, this is all I can say...

image

@manuelpastor
Copy link
Member

The "Segmentation fault: 11" could be related with a well documented iOS bug. Please check this thread

https://stackoverflow.com/questions/19531969/segmentation-fault-11-in-os-x

They propose some solutions. I would be gratefull if you keep me informed

@nbosc
Copy link
Author

nbosc commented Jun 6, 2018

Thanks Manuel! Your link put me on the track and I have found the solution. Apparently there is an incompatibility between the default python and anaconda for OSX.
As mentioned in this thread deeptools/pyBigWig#58, I had to install python 3.6.4 from conda-forge. It solved the segfault issue but then I had to manually install the requests package.
Now the issue is solved and I can use flame.

@manuelpastor manuelpastor reopened this Feb 5, 2019
@manuelpastor
Copy link
Member

The same issue appeared again at UNIVIE in a Mac OS 10.14. The user solved it by installing Python from the conda-forge channel

The problem needs to be solved, as soon as we can get Apple hardware, reproduce it locally and test appropriate solutions

@manuelpastor manuelpastor changed the title model training failure Error "Segmentation fault: 11" in MacOS Feb 5, 2019
@manuelpastor
Copy link
Member

Implemented a MacOS machine in the Travis testing system.
We were able to reproduce the problem and is now under investigation (Biel)

@BielStela
Copy link
Contributor

related issue deeptools/pyBigWig#58

@BielStela
Copy link
Contributor

I reproduced the error in macOS 10.13 and found some dirty fix uninstalling python and installing python from conda-forge channel:

conda install -c conda-forge python=3.6.8

But this solution blows up the environment and the dependencies must be reinstalled.
Also debugging in Travis is slow and problematic since the debug session terminates whenever Travis servers want (job timeout, or indecipherable exit codes). I will halt the investigation until I can get my hands on a mac laptop.

@BielStela
Copy link
Contributor

Well I think I have a workaround for this:

  • Set conda-forge as the only channel in environment.yml
  • add libgfortran=3.0 to the env.yml to force conda to use this version because the conda-forge numpy dependency is libgfortran4.0.0 and this dependency is broken

@annacnev
Copy link

annacnev commented Feb 9, 2019

Having this same issue right now... I have Python 3.7 installed with home-brew running on Mojave 10.14.1. I am trying to extract data from a relatively large .json file using pandas. The function I wrote to read over the lines of select columns works for some of the columns of the dataset, but on others it stops my python completely and gives me a segmentation 11 error. Any thoughts ? I have a conda forged 3.4 installed as well and it gives the same error.

@BielStela
Copy link
Contributor

sorry for late response @annacnev, it looks like you are running the local (brew) python install. If you have conda installed, try to create an env with python from conda-forge with the following commands:

conda create -n test
conda activate test
conda install python -c conda-forge

then install all the needed packages in the same environment (test)

@annacnev
Copy link

No worries, @BielStela thanks for getting back to me! I did try that recommendation at the time and had no luck. I did eventually figure out the issue though- so incase anyone stumbles upon this in the future, here might be your problem: one of the lines in my json file was an empty list that when I was running my code, I was inadvertently plugging into a pandas function and then getting the seg fault on. I noticed too when I was researching on a few forums about this problem, some were also eventually attributed to trying to perform functions on empty values in datasets. Adding a "try" and "except" to your code might fix the issue- it did for me!

@BielStela
Copy link
Contributor

Great you fixed it. Anyway, looks like this is a weird old bug with python interpreter in osx that shouldn't be around...

@BielStela
Copy link
Contributor

Testing on a Mac with Mojave 10.14.4 I am not able to reproduce the error.
I installed Miniconda3, cloned the master branch, created the environment, installed flame, ran the tests, created and predicted with a model and no segfault happened.

@bio-informatician
Copy link

Testing on a Mac with Mojave 10.14.4 I am not able to reproduce the error.
I installed Miniconda3, cloned the master branch, created the environment, installed flame, ran the tests, created and predicted with a model and no segfault happened.

Hi, unfortunately, I have the same problem with Mojave 10.14.3 on my MacPro. When I want to open a BigWig file by write permission this error comes up. I installed python directly from its web site https://www.python.org/downloads/release/python-372/ without conda. I will follow what you have done by Miniconda3.

@manuelpastor
Copy link
Member

Fixed once we relaxed the rules to build the environment, thus allowing conda to select the most suitable versions for Mac Platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants