You are not logged in.

#1 2017-06-18 03:05:28

T-Minus
Member
Registered: 2016-01-07
Posts: 13

Error with Python 3.6.1

Hi guys, i'm having trouble with Python 3.6.1 sometimes it works fine, but sometimes it just dies (suddenly) and only throws one os this messages (sorry if i can't translate them appropriately)

Illegal instruction (core dumped)
Segmentation fault (core dumped)

I would appreciate any help.

Last edited by T-Minus (2017-06-18 05:25:35)

Offline

#2 2017-06-18 04:56:40

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 4,122
Website

Re: Error with Python 3.6.1

What exactly are you doing when it crashes? Are you running it interactively, or through a script?

For posting output in English, take a look at this: https://wiki.archlinux.org/index.php/Co … s_and_code

Moving to 'Apps & DE'.

Offline

#3 2017-06-18 05:17:25

Potomac
Member
Registered: 2011-12-25
Posts: 373

Re: Error with Python 3.6.1

be sure your system is up to date,

do a "pacman -Syu" and check also if your pacman repos are ok,

if you use additionnal python module ( in a virtualenv, aka located in your home ) then check if they are up to date ( with "pip install <module name> --upgrade" after activating your virtualenv )

https://virtualenv.pypa.io/en/stable/

Last edited by Potomac (2017-06-18 05:19:19)

Offline

#4 2017-06-18 05:42:14

T-Minus
Member
Registered: 2016-01-07
Posts: 13

Re: Error with Python 3.6.1

x33a wrote:

What exactly are you doing when it crashes? Are you running it interactively, or through a script?

For posting output in English, take a look at this: https://wiki.archlinux.org/index.php/Co … s_and_code

Moving to 'Apps & DE'.

In both cases it crashes (even when i try to run it from the terminal without any parameters).


Potomac wrote:

be sure your system is up to date,
do a "pacman -Syu" and check also if your pacman repos are ok,
if you use additionnal python module ( in a virtualenv, aka located in your home ) then check if they are up to date ( with "pip install <module name> --upgrade" after activating your virtualenv )
https://virtualenv.pypa.io/en/stable/

I'm sure the system is up to date, i've been having this problem since i updated from Python 3.6.0 to Python 3.6.1. And like i said before, it even crashes when i try to run the interpreter fom the terminal.

Thank you guys for answer.

Offline

#5 2017-06-18 05:45:46

Potomac
Member
Registered: 2011-12-25
Posts: 373

Re: Error with Python 3.6.1

is it possible to post the python script which triggers these random crashes ?
you can have more information about the cause of the crash by typing "dmesg" just after the crash,

check also if you have enough disk space in your home and /var , /usr directories,

in a console type : "which python"

you should see as output : "/usr/bin/python"

then type :

ls -ial /usr/bin/python

python should be a symbolic link of python3,

as a last ressort you can recompile the python package, I remember having troubles with a package, and it was due to a gcc option compilation related to a CPU optimization, maybe your CPU is not in the target of the python binary  ?

Last edited by Potomac (2017-06-18 05:55:58)

Offline

#6 2017-06-18 05:57:12

T-Minus
Member
Registered: 2016-01-07
Posts: 13

Re: Error with Python 3.6.1

Potomac wrote:

is it possible to post the python script which triggers these random crashes ?

you can have more information about the cause of the crash by typing "dmesg" just after the crash

I mean, only by writing "python" in the terminal causes Python to crash.

The scripts i used to run are from a project i'm working on in computer vision so i need to use libraries like OpenCV and numpy and i know they are not causing the problem since they work fine with Python 3.6.0 and sometimes the same script runs and sometimes doesn't.

This is what i'm getting with: dmesg |grep python

[41982.304781] traps: python[21360] general protection ip:7eff7aa63053 sp:7ffefa2d0c80 error:0 in libpython3.6m.so.1.0[7eff7a89d000+2c7000]
[42410.654663] traps: python[21741] trap invalid opcode ip:7f642c2dc359 sp:7ffd4320a850 error:0 in libpython3.6m.so.1.0[7f642c116000+2c7000]
[53145.070684] python[26187]: segfault at 1 ip 00007f723605ab00 sp 00007ffc866ae418 error 6 in libpython3.6m.so.1.0[7f7235f06000+2c7000]
[53344.264924] traps: python[26262] general protection ip:7f83a1369053 sp:7fff271064e0 error:0 in libpython3.6m.so.1.0[7f83a11a3000+2c7000]
[53353.497938] traps: python[26275] general protection ip:7ff4479b5053 sp:7ffc0810bea0 error:0 in libpython3.6m.so.1.0[7ff4477ef000+2c7000]
[53368.879520] python[26296]: segfault at 8c ip 00007fbfe158e3f7 sp 00007ffcc64b46e0 error 4 in libpython3.6m.so.1.0[7fbfe14ac000+2c7000]
[53387.593293] traps: python[26315] trap invalid opcode ip:7fcf85885359 sp:7ffd11835d40 error:0 in libpython3.6m.so.1.0[7fcf856bf000+2c7000]
[53411.600767] traps: python[26340] general protection ip:7feb44c3b053 sp:7ffe4ca609d0 error:0 in libpython3.6m.so.1.0[7feb44a75000+2c7000]
[53438.251127] python[26367]: segfault at 95 ip 00007fd1c8be23f7 sp 00007ffd98d3f5c0 error 4 in libpython3.6m.so.1.0[7fd1c8b00000+2c7000]
[53472.855844] traps: python[26409] general protection ip:7f44c0f5d053 sp:7fff49b1d820 error:0 in libpython3.6m.so.1.0[7f44c0d97000+2c7000]
[53504.550766] python[26443]: segfault at 1 ip 00007f4c23aa3b00 sp 00007fff885892c8 error 6 in libpython3.6m.so.1.0[7f4c2394f000+2c7000]
[53508.975624] traps: python[26452] trap invalid opcode ip:7fa192962359 sp:7ffcb2e94bf0 error:0 in libpython3.6m.so.1.0[7fa19279c000+2c7000]
[54849.099365] traps: python[26884] trap invalid opcode ip:7f117c181359 sp:7ffd4bca1d90 error:0 in libpython3.6m.so.1.0[7f117bfbb000+2c7000]

Offline

#7 2017-06-18 07:05:11

seth
Member
Registered: 2012-09-03
Posts: 3,271

Re: Error with Python 3.6.1

It dumps a core, so you want to look into that, "man coredumpctl"

Offline

#8 2017-06-18 07:06:36

Potomac
Member
Registered: 2011-12-25
Posts: 373

Re: Error with Python 3.6.1

this is strange, I don't have this problem when I type python in a console ( I use konsole ),  python is the only package on your PC which triggers these random crashes ?
no crash with other softwares ?

"Invalid opcode" seems to mean that an illegal instruction has been called by python, or an instruction not supported by your hardware,

if your system is up to date, with no suspicious AUR packages, no hardware problems ( ram modules, CPU cooling )  then I have no other ideas,

as I said you can try to recompile the python3 package with makepkg or a git/beta version, in order to see if it helps

Last edited by Potomac (2017-06-18 07:09:28)

Offline

#9 2017-06-18 23:25:02

circleface
Member
Registered: 2012-05-26
Posts: 231

Re: Error with Python 3.6.1

Did you enable microcode updates for your processor?  That can cause all sorts of weird and random problems if you don't have the microcode updates installed.

Online

#10 2017-06-19 03:50:58

T-Minus
Member
Registered: 2016-01-07
Posts: 13

Re: Error with Python 3.6.1

Yes, Python it's the only one i'm having trouble with.

I recompile Python but the error persists and now, i'm also having trouble importing OpenCV.

circleface wrote:

Did you enable microcode updates for your processor?  That can cause all sorts of weird and random problems if you don't have the microcode updates installed.

Yes, i have microcode updates enabled.

Offline

#11 2017-06-19 05:25:45

seth
Member
Registered: 2012-09-03
Posts: 3,271

Re: Error with Python 3.6.1

Again: if you look at the coredumps, you'll have increased knowledge on why it segfaults, thus a better chance to find a fix.

Offline

#12 2017-06-19 06:48:08

T-Minus
Member
Registered: 2016-01-07
Posts: 13

Re: Error with Python 3.6.1

Sorry seth, this is what i'm getting:

          PID: 27979 (python3)
        Signal: 11 (SEGV)
     Timestamp: Sun 2017-06-18 20:15:58 -05 (5h 24min ago)
  Command Line: /usr/bin/python3 -u plugin_server.py 42427 rope
    Executable: /usr/bin/python3.6
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1

       Storage: /var/lib/systemd/coredump/core.python3.1000.a9a899490272415abd0b6e67a3c24322.27979.1497834958000000000000.lz4
       Message: Process 27979 (python3) of user 1000 dumped core.
                
                Stack trace of thread 27979:
                #0  0x00007f43cb1873f7 n/a (libpython3.6m.so.1.0)
                #1  0x00007f43cb1ce1bd n/a (libpython3.6m.so.1.0)
                #2  0x00007f43cb1cde0f n/a (libpython3.6m.so.1.0)
                #3  0x00007f43cb1ce073 n/a (libpython3.6m.so.1.0)
                #4  0x00007f43cb1cef7a n/a (libpython3.6m.so.1.0)
                #5  0x00007f43cb1cf005 n/a (libpython3.6m.so.1.0)
                #6  0x00007f43cb2268af _PyCFunction_FastCallDict (libpython3.6m.so.1.0)
                #7  0x00007f43cb1f99df n/a (libpython3.6m.so.1.0)
                #8  0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #9  0x00007f43cb1f8271 n/a (libpython3.6m.so.1.0)
                #10 0x00007f43cb1f975a n/a (libpython3.6m.so.1.0)
                #11 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #12 0x00007f43cb1af1f4 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #13 0x00007f43cb1f950a n/a (libpython3.6m.so.1.0)
                #14 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #15 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #16 0x00007f43cb1f950a n/a (libpython3.6m.so.1.0)
                #17 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #18 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #19 0x00007f43cb1f950a n/a (libpython3.6m.so.1.0)
                #20 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #21 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #22 0x00007f43cb1f950a n/a (libpython3.6m.so.1.0)
                #23 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #24 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #25 0x00007f43cb1f8f6a _PyFunction_FastCallDict (libpython3.6m.so.1.0)
                #26 0x00007f43cb26134e _PyObject_FastCallDict (libpython3.6m.so.1.0)
                #27 0x00007f43cb261cea _PyObject_CallMethodIdObjArgs (libpython3.6m.so.1.0)
                #28 0x00007f43cb1d0c84 PyImport_ImportModuleLevelObject (libpython3.6m.so.1.0)
                #29 0x00007f43cb1b0c5d _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #30 0x00007f43cb1f9f17 PyEval_EvalCodeEx (libpython3.6m.so.1.0)
                #31 0x00007f43cb1ae0ab PyEval_EvalCode (libpython3.6m.so.1.0)
                #32 0x00007f43cb1b9898 n/a (libpython3.6m.so.1.0)
                #33 0x00007f43cb226c90 PyCFunction_Call (libpython3.6m.so.1.0)
                #34 0x00007f43cb1b3db9 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #35 0x00007f43cb1f8271 n/a (libpython3.6m.so.1.0)
                #36 0x00007f43cb1f975a n/a (libpython3.6m.so.1.0)
                #37 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #38 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #39 0x00007f43cb1f950a n/a (libpython3.6m.so.1.0)
                #40 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #41 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #42 0x00007f43cb1f950a n/a (libpython3.6m.so.1.0)
                #43 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #44 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #45 0x00007f43cb1f950a n/a (libpython3.6m.so.1.0)
                #46 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #47 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #48 0x00007f43cb1f8f6a _PyFunction_FastCallDict (libpython3.6m.so.1.0)
                #49 0x00007f43cb26134e _PyObject_FastCallDict (libpython3.6m.so.1.0)
                #50 0x00007f43cb261cea _PyObject_CallMethodIdObjArgs (libpython3.6m.so.1.0)
                #51 0x00007f43cb1d0c84 PyImport_ImportModuleLevelObject (libpython3.6m.so.1.0)
                #52 0x00007f43cb1b0c5d _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #53 0x00007f43cb1f9f17 PyEval_EvalCodeEx (libpython3.6m.so.1.0)
                #54 0x00007f43cb1ae0ab PyEval_EvalCode (libpython3.6m.so.1.0)
                #55 0x00007f43cb1b9898 n/a (libpython3.6m.so.1.0)
                #56 0x00007f43cb226c90 PyCFunction_Call (libpython3.6m.so.1.0)
                #57 0x00007f43cb1b3db9 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #58 0x00007f43cb1f8271 n/a (libpython3.6m.so.1.0)
                #59 0x00007f43cb1f975a n/a (libpython3.6m.so.1.0)
                #60 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)
                #61 0x00007f43cb1ae3c7 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
                #62 0x00007f43cb1f950a n/a (libpython3.6m.so.1.0)
                #63 0x00007f43cb1f9ac3 n/a (libpython3.6m.so.1.0)

I don't know how to read it

Last edited by T-Minus (2017-06-19 06:52:50)

Offline

#13 2017-06-19 12:38:54

seth
Member
Registered: 2012-09-03
Posts: 3,271

Re: Error with Python 3.6.1

Smells like crashing when loading "some" module. Do you use the vanilla kernel?

uname -a
pacman -Qm
pip list

Offline

#14 2017-06-19 15:24:14

T-Minus
Member
Registered: 2016-01-07
Posts: 13

Re: Error with Python 3.6.1

Yes looks like i'm using the vanilla kernel:

uname -a

Linux localhost 4.11.5-1-ARCH #1 SMP PREEMPT Wed Jun 14 16:19:27 CEST 2017 x86_64 GNU/Linux

pacman -Qm

cower 17-2
evince2-light 2.32.0-7
opera-ffmpeg-codecs 58.0.3029.110-1
pacaur 4.7.9-1

pip list

alabaster (0.7.10)
appdirs (1.4.3)
astroid (1.5.3)
Babel (2.4.0)
bleach (2.0.0)
chardet (3.0.4)
cycler (0.10.0)
decorator (4.0.11)
docutils (0.13.1)
entrypoints (0.2.2)
html5lib (0.999999999)
idna (2.5)
imagesize (0.7.1)
ipykernel (4.5.2)
ipython (5.3.0)
ipython-genutils (0.1.0)
ipywidgets (6.0.0)
isort (4.2.15)
jedi (0.10.2)
Jinja2 (2.9.6)
jsonschema (2.6.0)
jupyter-client (5.0.1)
jupyter-console (5.1.0)
jupyter-core (4.3.0)
lazy-object-proxy (1.3.1)
MarkupSafe (1.0)
matplotlib (2.0.2)
mccabe (0.6.1)
mistune (0.7.4)
nbconvert (5.1.1)
nbformat (4.3.0)
notebook (5.0.0)
numpy (1.13.0)
numpydoc (0.6.0)
olefile (0.43)
packaging (16.8)
pandocfilters (1.4.1)
pep8 (1.7.0)
pexpect (4.2.1)
pickleshare (0.7.4)
Pillow (4.1.1)
pip (9.0.1)
prompt-toolkit (1.0.14)
psutil (5.2.1)
ptyprocess (0.5.1)
pycodestyle (2.3.1)
pyflakes (1.5.0)
Pygments (2.2.0)
pylint (1.7.1)
pyparsing (2.2.0)
python-dateutil (2.6.0)
python-sane (2.8.3)
pytz (2017.2)
pyzmq (16.0.2)
QtAwesome (0.4.4)
qtconsole (4.3.0)
QtPy (1.2.1)
requests (2.18.1)
rope (0.10.5)
rope-py3k (0.9.4.post1)
scipy (0.19.0)
setuptools (36.0.1)
simplegeneric (0.8.1)
six (1.10.0)
snowballstemmer (1.2.1)
Sphinx (1.6.2)
sphinx-rtd-theme (0.2.4)
sphinxcontrib-websupport (1.0.1.dev20170522)
spyder (3.1.4)
SQLAlchemy (1.1.10)
team (1.0)
terminado (0.6)
testpath (0.3)
tornado (4.5.1)
traitlets (4.3.2)
urllib3 (1.21.1)
wcwidth (0.1.7)
webencodings (0.5.1)
Whoosh (2.7.4)
widgetsnbextension (2.0.0)
wrapt (1.10.10)

Offline

#15 2017-06-19 20:13:35

seth
Member
Registered: 2012-09-03
Posts: 3,271

Re: Error with Python 3.6.1

Impreseeinve PIP list (mine has 14 entries)
Check

pip list -o # outdated ones
pip list --user # your user only
pip list --not-required # leaf packages, ie. not pulled in as dependency

If you recall packages that you installed via "pip install", they'll make great candidates for the culprit

Offline

#16 2017-06-19 23:04:08

T-Minus
Member
Registered: 2016-01-07
Posts: 13

Re: Error with Python 3.6.1

seth wrote:

Impreseeinve PIP list (mine has 14 entries)

I work a lot  with Python, but almost all of that packages are dependencies of Spyder.

seth wrote:

Check

pip list -o # outdated ones
pip list --user # your user only
pip list --not-required # leaf packages, ie. not pulled in as dependency

If you recall packages that you installed via "pip install", they'll make great candidates for the culprit

I reinstall the entire system, and i'm getting the same error so i doubt it's a problem with the packages.

Last edited by T-Minus (2017-06-19 23:04:26)

Offline

#17 2017-06-19 23:35:23

loqs
Member
Registered: 2014-03-06
Posts: 2,411

Re: Error with Python 3.6.1

Can you check with the minimal set of dependancies in a clean chroot if the issue still exists?

$ mkdir acleanchroot
# pacstrap -cd acleanchroot base python
# arch-chroot acleanchroot/
# python

Offline

#18 2017-06-21 02:18:25

T-Minus
Member
Registered: 2016-01-07
Posts: 13

Re: Error with Python 3.6.1

Hi guys, i just decide to compile the las release (Python 3.6.2rc1) that came out yesterday and everything it's working fine.

Thank you all guys for your time and help.

Offline

Board footer

Powered by FluxBB