Skip to content

Segfault on import of clr under Arch Linux64/Mono #110

Closed

Description

@anntzer

Built from today's develop for Python3.4 and from BrisingrAerowing/pythonnet#b7e85f07d7dd2c84d54b0bb4be4be9a810a81d6a (#104) for Python3.5 (I haven't tested other versions of Python yet):

$ python -c 'import clr' 2>&1
Native stacktrace:

        /usr/lib/libmonoboehm-2.0.so.1(+0xd33ca) [0x7f8d1b0a93ca]
        /usr/lib/libmonoboehm-2.0.so.1(+0x488e0) [0x7f8d1b01e8e0]
        /usr/lib/libpthread.so.0(+0x10d60) [0x7f8d1c3efd60]
        /usr/lib/libmonoboehm-2.0.so.1(+0x243a40) [0x7f8d1b219a40]
        /usr/lib/libmonoboehm-2.0.so.1(+0x24bef8) [0x7f8d1b221ef8]
        /usr/lib/libmonoboehm-2.0.so.1(+0x244f3f) [0x7f8d1b21af3f]
        /usr/lib/libmonoboehm-2.0.so.1(+0x244308) [0x7f8d1b21a308]
        /usr/lib/libmonoboehm-2.0.so.1(+0x23af68) [0x7f8d1b210f68]
        /usr/lib/libmonoboehm-2.0.so.1(+0x23b851) [0x7f8d1b211851]
        /usr/lib/libmonoboehm-2.0.so.1(+0x245e6a) [0x7f8d1b21be6a]
        /usr/lib/libmonoboehm-2.0.so.1(+0x245f8e) [0x7f8d1b21bf8e]
        /usr/lib/libmonoboehm-2.0.so.1(+0x1fc0a1) [0x7f8d1b1d20a1]
        /usr/lib/libmonoboehm-2.0.so.1(+0x1d079c) [0x7f8d1b1a679c]
        /usr/lib/libmonoboehm-2.0.so.1(+0x48f1e) [0x7f8d1b01ef1e]
        /home/antony/miniconda3/envs/py34/lib/python3.4/site-packages/clr.cpython-34m.so(PyNet_Init+0x6e) [0x7f8d1b5c3c1e]
        /home/antony/miniconda3/envs/py34/lib/python3.4/site-packages/clr.cpython-34m.so(PyInit_clr+0x46) [0x7f8d1b5c3ca6]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(_PyImport_LoadDynamicModule+0x119) [0x7f8d1c746329]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(+0x146adf) [0x7f8d1c742adf]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalFrameEx+0x5ffe) [0x7f8d1c72c85e]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalCodeEx+0x8b1) [0x7f8d1c72ee41]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalFrameEx+0x6f9a) [0x7f8d1c72d7fa]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalCodeEx+0x8b1) [0x7f8d1c72ee41]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(+0x90f01) [0x7f8d1c68cf01]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyObject_Call+0x59) [0x7f8d1c65d189]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalFrameEx+0x59d6) [0x7f8d1c72c236]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalCodeEx+0x8b1) [0x7f8d1c72ee41]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalFrameEx+0x6f9a) [0x7f8d1c72d7fa]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalFrameEx+0x7156) [0x7f8d1c72d9b6]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalFrameEx+0x7156) [0x7f8d1c72d9b6]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalFrameEx+0x7156) [0x7f8d1c72d9b6]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalCodeEx+0x8b1) [0x7f8d1c72ee41]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(+0x90de2) [0x7f8d1c68cde2]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyObject_Call+0x59) [0x7f8d1c65d189]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(_PyObject_CallMethodIdObjArgs+0xf8) [0x7f8d1c65fd88]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyImport_ImportModuleLevelObject+0x7d7) [0x7f8d1c7447f7]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(+0x1283ff) [0x7f8d1c7243ff]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyObject_Call+0x59) [0x7f8d1c65d189]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_CallObjectWithKeywords+0x43) [0x7f8d1c724e13]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalFrameEx+0x2958) [0x7f8d1c7291b8]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalCodeEx+0x8b1) [0x7f8d1c72ee41]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyEval_EvalCode+0x3b) [0x7f8d1c72ef0b]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyRun_StringFlags+0xca) [0x7f8d1c753fea]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(PyRun_SimpleStringFlags+0x40) [0x7f8d1c754080]
        /home/antony/miniconda3/envs/py34/bin/../lib/libpython3.4m.so.1.0(Py_Main+0x4af) [0x7f8d1c76c51f]
        python(main+0x15d) [0x400acd]
        /usr/lib/libc.so.6(__libc_start_main+0xf0) [0x7f8d1b956610]
        python() [0x4008a9]

Debug info from gdb:

ptrace: Operation not permitted.
No threads.

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Libraries installed from the Arch Linux standard package repository (except that Python3.4 was installed via conda). In particular

$ mono --version
Mono JIT compiler version 4.0.4 (Stable 4.0.4.1/5ab4c0d Mon Sep 14 09:24:50 UTC 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        LLVM:          supported, not enabled.
        GC:            sgen

Any help would be appreciated.

Activity

  1. mikofski commented on Mar 15, 2016

    @mikofski

    Is #119 a duplicate of this? Have you tried adding "PYTHON_WITHOUT_ENABLE_SHARED" to defines in setup.py. Also see this SO Q/A.

  2. anntzer commented on Mar 16, 2016

    @anntzer
    Author

    This does not seem to help, at least on Python 3.5, using today's develop + PYTHON_WITHOUT_ENABLE_SHARED.

  3. den-run-ai commented on Mar 16, 2016

    @den-run-ai
    Contributor

    Are you using 64bit CPython 3.5? Is this from official python.org or one of
    distros or your own build?

    Have a look at Travis CI builds - the tests pass for one of latest Mono
    versions.

    On Tuesday, March 15, 2016, Antony Lee [email protected] wrote:

    This does not seem to help, at least on Python 3.5, using today's develop

    • PYTHON_WITHOUT_ENABLE_SHARED.

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly or view it on GitHub
    #110 (comment)

  4. anntzer commented on Mar 16, 2016

    @anntzer
    Author

    64-bit Python 3.5.1 from the Arch Linux repositories, built (by the packagers) as described here:
    https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/python

  5. anntzer commented on Sep 5, 2016

    @anntzer
    Author

    FWIW I am not using python for .NET anymore.

  6. den-run-ai commented on Sep 5, 2016

    @den-run-ai
    Contributor

    @anntzer no problem, I was able to get and running arch with 32bit, but not 64bit in VirtualBox. Perhaps providing manylinux wheels could resolve these issues.

    #258

  7. vmuriart commented on Sep 6, 2016

    @vmuriart
    Contributor

    @anntzer did you switch to an alternative solution/project?

  8. anntzer commented on Sep 6, 2016

    @anntzer
    Author

    Nope, that was for a side project that I just shelved.

  9. den-run-ai commented on Sep 6, 2016

    @den-run-ai
    Contributor

    I'm closing this issue because based on some reading arch linux is not recommended for production environment (maybe because has no LTS) and not provided on cloud and CI hosting facilities such as Travis CI, DigitalOcean, AWS, Azure.

    travis-ci/travis-ci#1849

  10. den-run-ai commented on Jun 14, 2018

    @den-run-ai
    Contributor
  11. changed the title [-]Segfault on import of clr under Linux64/Mono[/-] [+]Segfault on import of clr under Arch Linux64/Mono[/+] on Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions