[SOLVED] Python app install give segmentation fault

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
lbunch
Level 2
Level 2
Posts: 57
Joined: Mon Aug 12, 2013 12:32 pm

[SOLVED] Python app install give segmentation fault

Post by lbunch »

Mint 18.3 Cinnamon. Not a programmer, running linux 6 or 7 years.

Installing in terminal, command: python3 install.py (installer for a photography program):
Terminal output:

Code: Select all

Successfully installed PyPrind-2.11.2 arrow-0.12.1 certifi-2018.10.15 chardet-3.0.4 colorlog-3.1.4 colour-0.1.5 easygui-0.97.4 gphoto2-1.8.5 idna-2.8 psutil-5.4.8 pymediainfo-3.0 python-dateutil-2.7.5 pyxdg-0.26 pyzmq-15.1.0 rawkit-0.6.0 requests-2.20.1 setuptools-40.6.2 six-1.12.0 sortedcontainers-2.1.0 tornado-4.5.3 urllib3-1.24.1
Segmentation fault
Syslog:

Code: Select all

Dec 10 14:13:44 les-ThinkPad-T450s kernel: [39667.705381] EXT4-fs error (device sda5): ext4_ext_check_inode:505: inode #1114121: comm pool: pblk 0 bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)
Dec 10 14:14:33 les-ThinkPad-T450s kernel: [39716.490101] python3[28149]: segfault at a9 ip 0000000000514154 sp 00007fff804aff08 error 4 in python3.5[400000+3aa000
So we know what memory is a problem. Now what?
I've rebooted to get the memory check. OK, no change.
Any ideas?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Python app install give segmentation fault

Post by phd21 »

HI lbunch,

What python photography program?
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
gm10

Re: Python app install give segmentation fault

Post by gm10 »

lbunch wrote: Mon Dec 10, 2018 4:42 pm

Code: Select all

Dec 10 14:13:44 les-ThinkPad-T450s kernel: [39667.705381] EXT4-fs error (device sda5): ext4_ext_check_inode:505: inode #1114121: comm pool: pblk 0 bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)
Corrupt filesystem? Running 4.19 or 4.20 mainline kernel by any chance? lol. enjoy.

As to your script error, I'd talk to whoever wrote the script. We are not psychic, we don't know what it's doing (and frankly I'm not interested - in any case it's not a bug with your memory, it's likely a bug with your script, although if I'm right about the kernel that might also be to blame).
lbunch
Level 2
Level 2
Posts: 57
Joined: Mon Aug 12, 2013 12:32 pm

Re: Python app install give segmentation fault

Post by lbunch »

The kernel is 4.4 something. A clue:(?)
This segfault occurred only after I uninstalled the program, not realizing an instance was still running. That froze the computer, and on rebooting to clear it, the error occurs when I attempt to reinstall the program.
gm10

Re: Python app install give segmentation fault

Post by gm10 »

No, not likely the kernel then (at least 4.4 doesn't have a known filesystem corruption issue).

Regarding your python issue, you'd have to debug the code to find where it bugs out.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Python app install give segmentation fault

Post by rene »

Note, it's the Python interpreter that is segfaulting; certainly possibly as a reproducible result of something in his install.py but still shouldn't happen; a Python code error would normally get you a nice backtrace and an as far as the system itself is concerned graceful program exit.

No one can say anything definitive without more information on what photography program downloaded from where so that we could try to reproduce -- but I would given the above make sure to have updated Python; isn't 3.6 available for 18.3 as well?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Python app install give segmentation fault

Post by MrEen »

rene wrote: Mon Dec 10, 2018 5:48 pm isn't 3.6 available for 18.3 as well?
Doesn't look like it:

Code: Select all

scott@scott-HP ~ $ apt policy python3
python3:
  Installed: 3.5.1-3
  Candidate: 3.5.1-3
  Version table:
 *** 3.5.1-3 500
        500 http://mirrors.advancedhosters.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
scott@scott-HP ~ $ 
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Python app install give segmentation fault

Post by rene »

Mmmpf. Having /usr/bin/python3 be a link to 3.6 rater than his 3.5 would've been an easy try if it were available but guess not then. Nothing to do then until more information comes in...
gm10

Re: Python app install give segmentation fault

Post by gm10 »

rene wrote: Mon Dec 10, 2018 6:02 pm Mmmpf. Having /usr/bin/python3 be a link to 3.6 rater than his 3.5 would've been an easy try if it were available but guess not then. Nothing to do then until more information comes in...
That would also be a good way to kill off his system. Never touch your system default python installation. Too much depends on it.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Python app install give segmentation fault

Post by rene »

He'd supposedly be free to change it back immediately after running install.py. Or to simply run python3.6 install.py explicitly.
lbunch
Level 2
Level 2
Posts: 57
Joined: Mon Aug 12, 2013 12:32 pm

Re: Python app install give segmentation fault

Post by lbunch »

Thanks for all the interest. The program is Rapid Photo Downloader at https://damonlynch.net/rapid/.
It did install fine until I uninstalled it with it running in the background. Here's the entire failed install code from terminal.

Code: Select all

les@les-ThinkPad-T450s /media/les/Data/Downloads $ python3 install.py 
Detected Linux distribution Linuxmint 18.3
Downloading https://launchpad.net/rapid/pyqt/0.9.13/+download/rapid-photo-downloader-0.9.13.tar.gz (6.8 MB)
0% [##############################] 100% | ETA: 00:00:00
Total time elapsed: 00:00:01
Querying package system to see if an older version of Rapid Photo Downloader is installed (this may take a while)...
Checking if previous version installed with pip...

Installing application requirements...

Collecting psutil>=3.4.2 (from -r /tmp/tmpa65xyspf (line 4))
Collecting gphoto2>=1.4.0 (from -r /tmp/tmpa65xyspf (line 5))
Collecting pyzmq<=15.1.0,>=14.4.1 (from -r /tmp/tmpa65xyspf (line 6))
Collecting pyxdg>=0.25 (from -r /tmp/tmpa65xyspf (line 8))
  Using cached https://files.pythonhosted.org/packages/39/03/12eb9062f43adb94e30f366743cb5c83fd15fef026500cd4de42c7c12280/pyxdg-0.26-py2.py3-none-any.whl
Collecting arrow>=0.6.0 (from -r /tmp/tmpa65xyspf (line 9))
Collecting python-dateutil>=2.2 (from -r /tmp/tmpa65xyspf (line 10))
  Using cached https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl
Collecting rawkit>=0.6.0 (from -r /tmp/tmpa65xyspf (line 11))
  Using cached https://files.pythonhosted.org/packages/33/a1/b99402cc6b1d7296163a0e3e3a37f132d62e7a9e1662ada4749e419edaf7/rawkit-0.6.0-py2.py3-none-any.whl
Collecting PyPrind>=2.9.4 (from -r /tmp/tmpa65xyspf (line 12))
  Using cached https://files.pythonhosted.org/packages/1e/30/e76fb0c45da8aef49ea8d2a90d4e7a6877b45894c25f12fb961f009a891e/PyPrind-2.11.2-py3-none-any.whl
Collecting colorlog>=2.6 (from -r /tmp/tmpa65xyspf (line 13))
  Using cached https://files.pythonhosted.org/packages/69/eb/58ae10d3c46a0195ffdd0e3943d255d0d5029d71e5457785ecd665bcf0f3/colorlog-3.1.4-py2.py3-none-any.whl
Collecting easygui<=0.97.4 (from -r /tmp/tmpa65xyspf (line 16))
  Using cached https://files.pythonhosted.org/packages/c6/4d/79f8dd1d3c9e2bdc134ae07a5821831a37fb4e8f3f1243a069b8e70fdd2c/easygui-0.97.4-py2.py3-none-any.whl
Collecting colour (from -r /tmp/tmpa65xyspf (line 17))
  Using cached https://files.pythonhosted.org/packages/74/46/e81907704ab203206769dee1385dc77e1407576ff8f50a0681d0a6b541be/colour-0.1.5-py2.py3-none-any.whl
Collecting pymediainfo>=2.2.0 (from -r /tmp/tmpa65xyspf (line 18))
Collecting sortedcontainers (from -r /tmp/tmpa65xyspf (line 19))
  Using cached https://files.pythonhosted.org/packages/13/f3/cf85f7c3a2dbd1a515d51e1f1676d971abe41bba6f4ab5443240d9a78e5b/sortedcontainers-2.1.0-py2.py3-none-any.whl
Collecting requests (from -r /tmp/tmpa65xyspf (line 20))
  Using cached https://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl
Collecting tornado<5.0 (from -r /tmp/tmpa65xyspf (line 21))
Collecting six>=1.5 (from python-dateutil>=2.2->-r /tmp/tmpa65xyspf (line 10))
  Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting setuptools (from pymediainfo>=2.2.0->-r /tmp/tmpa65xyspf (line 18))
  Using cached https://files.pythonhosted.org/packages/e7/16/da8cb8046149d50940c6110310983abb359bbb8cbc3539e6bef95c29428a/setuptools-40.6.2-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->-r /tmp/tmpa65xyspf (line 20))
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->-r /tmp/tmpa65xyspf (line 20))
  Using cached https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests->-r /tmp/tmpa65xyspf (line 20))
  Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests->-r /tmp/tmpa65xyspf (line 20))
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Installing collected packages: psutil, gphoto2, pyzmq, pyxdg, six, python-dateutil, arrow, rawkit, PyPrind, colorlog, easygui, colour, setuptools, pymediainfo, sortedcontainers, chardet, certifi, urllib3, idna, requests, tornado
Successfully installed PyPrind-2.11.2 arrow-0.12.1 certifi-2018.10.15 chardet-3.0.4 colorlog-3.1.4 colour-0.1.5 easygui-0.97.4 gphoto2-1.8.5 idna-2.7 psutil-5.4.8 pymediainfo-3.0 python-dateutil-2.7.5 pyxdg-0.26 pyzmq-15.1.0 rawkit-0.6.0 requests-2.20.1 setuptools-40.6.2 six-1.11.0 sortedcontainers-2.1.0 tornado-4.5.3 urllib3-1.24.1
Segmentation fault
les@les-ThinkPad-T450s /media/les/Data/Downloads $ 
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Python app install give segmentation fault

Post by rene »

I believe this indicates the problem is actually with pip. Does pip3 show --user work? Will have to leave it at that (possible) hint; can not reproduce an issue. If all else fails, manually blowing away ~/.local/lib/python3.5 could do something useful -- and could also blow away things you don't want blown away.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Python app install give segmentation fault

Post by phd21 »

Hi lbunch,

That application Rapid Photo Downloader is already in the Software Manager or Synaptic Package Manager (SPM)...
Last edited by phd21 on Mon Dec 10, 2018 11:55 pm, edited 1 time in total.
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Python app install give segmentation fault

Post by rene »

Much more useful reply....
lbunch
Level 2
Level 2
Posts: 57
Joined: Mon Aug 12, 2013 12:32 pm

Re: Python app install give segmentation fault

Post by lbunch »

Solved: As Rene hinted, pip was old. When I ran the command Rene suggested it reported pip was at 8. and should be at 18. So I ran update pip.
THEN, when I ran the install.py program it succeeded. Interestingly, the last line in terminal was, "(If a segmentation fault occurs at exit, you can ignore it ...)"
--->The program may have been installed all along, but I never looked for it because of the reported error!?
Thanks for persevering. Isn't Linux great!
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: [SOLVED] Python app install give segmentation fault

Post by rene »

Well, nice to have been useful, but I believe you should give preference to phd21's reply: Rapid Photo Downloader is in fact nicely available from the repositories on Mint 19...
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: [SOLVED] Python app install give segmentation fault

Post by phd21 »

Hi rene and lbunch,

Glad that is working now for lbunch when that should have been simple to install and use. Nicely done Rene...

I am pretty sure Rapid Photo Downloader is and has been in the Software Manager or Synaptic Package Manager (SPM) since Linux Mint 17.x, 18.x and now 19.x versions.

It is recommended to always check the Software Manager or Synaptic Package Manager (SPM) first for software you want, then if there is some compelling reason(s) to install the software from outside of the Mint repositories, then do that. AFAIK...

There is also a PPA for Linux Mint 18.x and 17.x with a slightly older version.

Rapid Photo Downloader: Installation in Ubuntu
http://damonlynch.net/rapid/legacy/ubuntu.html
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
lbunch
Level 2
Level 2
Posts: 57
Joined: Mon Aug 12, 2013 12:32 pm

Re: [SOLVED] Python app install give segmentation fault

Post by lbunch »

phd & Rene,
I wanted the later version (09+), not 04+.
Got it now.
Thanks again & bye.
Locked

Return to “Software & Applications”