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 on cythonizing #2199
Comments
Could you try installing Cython from a PyPI wheel instead of conda? |
@scoder we tried - again segfault: https://travis-ci.org/tardis-sn/tardis/jobs/365640859 - |
Do I understand correctly that you cannot reproduce this locally, but only on travis? Ok, travis uses an old Ubuntu version, but apart from that, it's entirely non-obvious to me what might trigger a crash here. I've never seen something like this in years. But I admit that I also don't remember seeing anyone use conda on travis yet. |
@scoder I've seen many people use conda on TRAVIS - but I have not seen that bug. Not sure where it comes from as we also can not reproduce it locally. I filed a bug on TRAVIS - maybe they can help. |
@scoder - I think we are getting closer. TRAVIS's @BanzaiMan gave me access to the debug mode and I got a core dump:
|
…iguration module is not set up yet. See #2199.
The traceback looks like the problem could at least be worked around by explicitly disabling the feature of including the C code lines in tracebacks at runtime. When building Cython itself, set the C macro I found a case in the code that could trigger such a crash, a use before init on very early errors during the module initialisation, and pushed a fix. Would be nice if you could try the latest master build somehow. |
I definitely can try this - it’s on the master right? |
@scoder I've used the cython master in this build and it still crashes: https://travis-ci.org/tardis-sn/tardis/jobs/381891389 |
produced this error: [ 6/13] Cythonizing /home/travis/cython/Cython/Compiler/Pythran.py
[ 7/13] Cythonizing /home/travis/cython/Cython/Compiler/Scanning.py
[ 8/13] Cythonizing /home/travis/cython/Cython/Compiler/Visitor.py
[ 9/13] Cythonizing /home/travis/cython/Cython/Plex/Actions.py
[10/13] Cythonizing /home/travis/cython/Cython/Plex/Scanners.py
[11/13] Cythonizing /home/travis/cython/Cython/Runtime/refnanny.pyx
[12/13] Cythonizing /home/travis/cython/Cython/StringIOTree.py
[13/13] Cythonizing /home/travis/cython/Cython/Tempita/_tempita.py
building 'Cython.Plex.Scanners' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/home
creating build/temp.linux-x86_64-2.7/home/travis
creating build/temp.linux-x86_64-2.7/home/travis/cython
creating build/temp.linux-x86_64-2.7/home/travis/cython/Cython
creating build/temp.linux-x86_64-2.7/home/travis/cython/Cython/Plex
gcc -pthread -B /home/travis/miniconda/envs/tardis/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0=1 -I/home/travis/miniconda/envs/tardis/include/python2.7 -c /home/travis/cython/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-2.7/home/travis/cython/Cython/Plex/Scanners.o
/home/travis/cython/Cython/Plex/Scanners.c: In function ‘__Pyx_AddTraceback’:
<command-line>:0:28: error: lvalue required as left operand of assignment
/home/travis/cython/Cython/Plex/Scanners.c:1465:53: note: in expansion of macro ‘CYTHON_CLINE_IN_TRACEBACK’
#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
^
/home/travis/cython/Cython/Plex/Scanners.c:11195:18: note: in expansion of macro ‘__Pyx_CLineForTraceback’
c_line = __Pyx_CLineForTraceback(tstate, c_line);
^
error: command 'gcc' failed with exit status 1 |
I meant something like |
@scoder that worked - it doesn't crash. What's the best way to get this into the travis? |
@scoder we integrated this into travis in the following way: https://github.com/tardis-sn/tardis/blob/master/.travis.yml (using the compile flags). At what point can we use a standard release version of cython again? |
Hmm, looks like the fix didn't make it into the changelog. It's included in 0.28.3, though. |
@scoder - it still crashes https://travis-ci.org/tardis-sn/tardis/jobs/405443747 |
it's the OSX version - any idea why that would causing trouble? |
@scoder this looks like the same bug. It occurs on OSX with clang using cython 0.28.4:
|
We are trying to cythonize our code (github.com/tardis-sn/tardis) within our TRAVIS environment and we get a segmentation fault during the cythonizing (cython 0.27.3 and 0.28) step (see https://travis-ci.org/tardis-sn/tardis/jobs/362581597).
Here's the log:
I'm also pinging @unoebauer as he was helping to debug this problem
The text was updated successfully, but these errors were encountered: