segfault on startup after upgrade

Bug #1872338 reported by Michael Aschauer on 2020-04-12
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Rapid Photo Downloader
High
Damon Lynch

Bug Description

I am getting a segfault starting up rapid-photo-downloader after the automatic upgrade to 0.9.22 on Debian 10.

Fatal Python error: Segmentation fault

Current thread 0x00007f749b6b1740 (most recent call first):
  File "/home/mash/.local/lib/python3.7/site-packages/raphodo/viewutils.py", line 409 in any_screen_scaled_qt
  File "/home/mash/.local/lib/python3.7/site-packages/raphodo/viewutils.py", line 422 in any_screen_scaled
  File "/home/mash/.local/lib/python3.7/site-packages/raphodo/rapid.py", line 6388 in main
  File "/home/mash/.local/bin/rapid-photo-downloader", line 8 in <module>

I am tracing this is somehow related to the QT libraries
(changing the code to just return False here .. and so on .. down the line a segfault happens each time a qt*application call is made....)

Related branches

Damon Lynch (dlynch3) wrote :

Include in your bug report the log files, which are found in the log directory ~/.cache/rapid-photo-downloader/log. You must include rapid-photo-downloader.log, but attaching the other log files is often helpful. You can open the log file directory by clicking on the link in the "Report a Problem" dialog window. If possible, please also include the configuration file found in the directory ~/.config/Rapid Photo Downloader/.

Changed in rapid:
status: New → Incomplete
Michael Aschauer (q8q6-m-ks2g) wrote :

sorry, but I just verified:

- There is not even any logline (or file) written at the point of failure yet
- having no config file yields the same result

(I upgraded from version 0.9.18 which worked fine)

Damon Lynch (dlynch3) wrote :

It doesn't matter if the segfault is not reflected in the logs. I still need the most recent log files, thanks.

Michael Aschauer (q8q6-m-ks2g) wrote :

I am sorry but I don't have the old logs anymore.

Damon Lynch (dlynch3) wrote :

then run this:

rapid-photo-downloader --detailed-version

and paste all the output into this report

Michael Aschauer (q8q6-m-ks2g) wrote :

The output is again:

Fatal Python error: Segmentation fault

Current thread 0x00007fa9abf5f740 (most recent call first):
  File "/home/mash/.local/lib/python3.7/site-packages/raphodo/viewutils.py", line 409 in any_screen_scaled_qt
  File "/home/mash/.local/lib/python3.7/site-packages/raphodo/viewutils.py", line 422 in any_screen_scaled
  File "/home/mash/.local/lib/python3.7/site-packages/raphodo/rapid.py", line 6388 in main
  File "/home/mash/.local/bin/rapid-photo-downloader", line 8 in <module>

Damon Lynch (dlynch3) wrote :

Oh yes it is calling the routine before outputting version numbers.

How did you install Rapid Photo Downloader? Is it using the system supplied PyQt5 (i.e. from Debian archives) or the PyQt5 that the install.py / in-program updater installs? Run this to figure it out:

python3 -m pip show pyqt5

There is no segfault with Debian unstable using the system PyQt5:

Rapid Photo Downloader: 0.9.22
Platform: Linux-5.5.0-1-amd64-x86_64-with-glibc2.29
Memory: 693.76 MB used of 4.13 GB
Confinement: none
Installed using pip: yes
Python: 3.8.2
Python executable: /usr/bin/python3
Qt: 5.12.5
PyQt: 5.14.2
SIP: 4.19.22
ZeroMQ: 4.3.2
Python ZeroMQ: 18.1.1 (cython backend)
gPhoto2: 2.5.24
Python gPhoto2: 2.2.2
ExifTool: 11.93
pymediainfo: 4.1
GExiv2: 0.12.0
Gstreamer: 1.16.2
PyGObject: 3.36.0
libraw: 0.19.5
rawkit: 0.6.0 (not functional)
psutil: 5.6.7
Exiv2: 0.27.2
glibc: 2.30
Arrow: 0.15.5
Tornado: 5.1.1
Can read HEIF/HEIC metadata: yes
Pyheif: 0.4
libheif: 1.6.1
Session: x11
Desktop scaling: not set
Desktop scaling detection: undetected
Desktop: GNOME (gnome)
Default file manager: nautilus (regular)

Damon Lynch (dlynch3) on 2020-04-12
Changed in rapid:
status: Incomplete → Triaged
Michael Aschauer (q8q6-m-ks2g) wrote :

I am using a local version:

$ python3 -m pip show pyqt5
Name: PyQt5
Version: 5.14.2
Summary: Python bindings for the Qt cross platform application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: <email address hidden>
License: GPL v3
Location: /home/mash/.local/lib/python3.7/site-packages
Requires: PyQt5-sip
Required-by: rapid-photo-downloader

After uninstalling local versions, I still get the same segfault, with

$ python3 -m pip show pyqt5
WARNING: Package(s) not found: pyqt5

Damon Lynch (dlynch3) wrote :

run this:

python3 install.py --use-system-PyQt5

then:

rapid-photo-downloader

Michael Aschauer (q8q6-m-ks2g) wrote :

call it progress, it is segfauling on a different code line now:

Fatal Python error: Segmentation fault

Current thread 0x00007f69d4fd9740 (most recent call first):
  File "/home/mash/.local/lib/python3.7/site-packages/raphodo/rapid.py", line 5843 in __init__
  File "/home/mash/.local/lib/python3.7/site-packages/raphodo/rapid.py", line 6648 in main
  File "/home/mash/.local/bin/rapid-photo-downloader", line 8 in <module>

Damon Lynch (dlynch3) wrote :

I can only conclude something is wrong on your system, either software or hardware. The code is segfaulting in places it really should not be. That's not normal behavior, at all. I've never seen this before, and no one has ever reported a bug like this.

I am fairly certain this is not a bug in Rapid Photo Downloader itself.

Install the program retext, which is also coded using PyQt5:

https://packages.debian.org/search?keywords=retext

See if that can run without crashing.

Michael Aschauer (q8q6-m-ks2g) wrote :

I have retext installed and it runs fine.

I do get detailed versions now - if that helps:

$ rapid-photo-downloader --detailed-version
Rapid Photo Downloader: 0.9.22
Platform: Linux-5.4.0-0.bpo.2-amd64-x86_64-with-debian-10.3
Memory: 4.18 GB used of 16.47 GB
Confinement: none
Installed using pip: yes
Python: 3.7.3
Python executable: /usr/bin/python3
Qt: 5.11.3
PyQt: 5.11.3
SIP: 4.19.14
ZeroMQ: 4.3.2
Python ZeroMQ: 19.0.0 (cython backend)
gPhoto2: 2.5.22
Python gPhoto2: 2.2.2
ExifTool: 11.16
pymediainfo: 4.1
GExiv2: 0.10.09
Gstreamer: 1.14.4
PyGObject: 3.30.4
libraw: 0.19.2
rawkit: 0.6.0 (not functional)
psutil: 5.7.0
Exiv2: 0.25.0
glibc: 2.28
Arrow: 0.15.5
Tornado: 6.0.4
Can read HEIF/HEIC metadata: yes
Pyheif: 0.4
libheif: 1.3.2
Session: x11
Desktop scaling: not set
Desktop scaling detection: undetected
Desktop: XFCE (xfce)
Default file manager: bl-file-manager (regular)

Damon Lynch (dlynch3) wrote :
Download full text (22.4 KiB)

You are running Debian stable, but your kernel is much newer than the kernel in my instance of Debian stable.

I have tested the latest code and confirmed it works fine:

damon@debian:~/tarballs$ ~/.local/bin/rapid-photo-downloader --debug
INFO Rapid Photo Downloader is starting
INFO Rapid Photo Downloader: 0.9.22
INFO Platform: Linux-4.19.0-8-amd64-x86_64-with-debian-10.3
INFO Memory: 832.83 MB used of 4.14 GB
INFO Confinement: none
INFO Installed using pip: yes
INFO Python: 3.7.3
INFO Python executable: /usr/bin/python3
INFO Qt: 5.14.2
INFO PyQt: 5.14.2
INFO SIP: 5.1.2
INFO ZeroMQ: 4.3.1
INFO Python ZeroMQ: 17.1.2 (cython backend)
INFO gPhoto2: 2.5.22
INFO Python gPhoto2: 2.2.2
INFO ExifTool: 11.16
INFO pymediainfo: 4.1
INFO GExiv2: 0.10.09
INFO Gstreamer: 1.14.4
INFO PyGObject: 3.30.4
INFO libraw: 0.19.2
INFO rawkit: 0.6.0 (not functional)
INFO psutil: 5.5.1
INFO Exiv2: 0.25.0
INFO glibc: 2.28
INFO Arrow: 0.12.1
INFO Tornado: 5.1.1
INFO Can read HEIF/HEIC metadata: yes
INFO Pyheif: 0.4
INFO libheif: 1.3.2
INFO Session: x11
INFO Desktop scaling: not set
INFO Desktop scaling detection: undetected
INFO Desktop: GNOME (gnome)
INFO Default file manager: nautilus (regular)
DEBUG Available screen geometry: 1920x1413 on 1920x1440 display. Default window size: 960x1201.
INFO High DPI scaling disabled because no scaled screen was detected
INFO Desktop scaling set to 1.0
DEBUG Fractional scaling not set
DEBUG Window maximized when last run: False
DEBUG Window size: 960x1201
DEBUG Window position 960,239 was invalid
DEBUG Initial program run detected
INFO Device autodetection: True
INFO For automatically detected devices, only the contents the following folders will be scanned: DCIM, PRIVATE, MP_ROOT
INFO This Computer is not used as a download source
INFO Photo download location: /home/damon/Pictures
INFO Video download location: /home/damon/Videos
INFO Backing up files: False
DEBUG Starting main ExifTool process
DEBUG Validating CPU core count for thumbnail generation...
DEBUG ...4 physical cores detected
DEBUG Starting logging subscription manager...
DEBUG ...logging subscription manager started
DEBUG Stage 2 initialization
DEBUG Created thumbnails cache /home/damon/.cache/rapid-photo-downloader/thumbnails
DEBUG Starting thumbnail daemon model
DEBUG Running sink for Thumbnail Daemon Manager
DEBUG Stage 3 initialization
DEBUG ...thumbnail daemon model started
DEBUG Starting worker for Thumbnail Daemon Manager
DEBUG Starting thumbnail model...
DEBUG Setting arrow locale to en_US
DEBUG Started '/usr/bin/python3 /home/damon/.local/lib/python3.7/site-packages/raphodo/thumbnaildaemon.py --receive 34771 --send 33799 --logging 43295' with pid 5652
DEBUG Running sink for Thumbnail Manager
DEBUG ...thumbnail model started
DEBUG Starting thumbnail load balancer...
DEBUG Started '/usr/bin/python3 /home/damon/.local/lib/python3.7/site-packages/raphodo/thumbloadbalancer.py --receive 39847 --send 33305 --controller 3311...

Michael Aschauer (q8q6-m-ks2g) wrote :

yes, I run a kernel from backports as my hardware is too new for Buster's kernel.

No success with installing into a virtual environment.

The older version, I ran worked. But How would I downgrade or install an older version now?

$ /opt/rapid-photo-download-env/bin/rapid-photo-downloader
Fatal Python error: Segmentation fault

Current thread 0x00007f7c9922c740 (most recent call first):
  File "/opt/rapid-photo-download-env/lib/python3.7/site-packages/raphodo/viewutils.py", line 409 in any_screen_scaled_qt
  File "/opt/rapid-photo-download-env/lib/python3.7/site-packages/raphodo/viewutils.py", line 422 in any_screen_scaled
  File "/opt/rapid-photo-download-env/lib/python3.7/site-packages/raphodo/rapid.py", line 6388 in main
  File "/opt/rapid-photo-download-env/bin/rapid-photo-downloader", line 8 in <module>

Damon Lynch (dlynch3) wrote :

I'm unsure why would you install into a virtual environment in opt -- that makes little sense to me.

But in any case, did you add a new user and then install Rapid Photo Downloader for that user?

Keep in mind the goal is to start with a clean implementation of PyQt5 and PyqQt5_sip. The easiest way to do that is with a new user. If the installation works for a new user, then the underlying issue is identified.

To install any version of Rapid Photo Downloader is easy. They're found here:

https://launchpad.net/rapid/+download

You can use the install.py script to uninstall to. Use the --help option for details.

Linux Lite 4.0 LTS \n \l
Linux 5.3.0-46-generic

No significant system changes since last time RPD ran correctly.

Damon Lynch (dlynch3) wrote :

Thanks for the log files. That makes it much easier to figure out what the cause might be. The last known good configuration on your system was with PyQt5 5.10.1. So install that and see if it helps. Using the latest install.py script

https://launchpad.net/rapid/pyqt/0.9.22/+download/install.py

do this to install Rapid Photo Downloader 0.9.22 with PyQt5 5.10.1:

python3 install.py --PyQt5-version 5.10.1

These are plenty of versions you can try, which will be listed if you put in an invalid version:

python3 install.py --PyQt5-version 1.0

What we want to do is determine if the version of PyQt5 makes a difference or not.

Damon Lynch (dlynch3) on 2020-04-15
Changed in rapid:
milestone: none → 0.9.23a1
assignee: nobody → Damon Lynch (dlynch3)
importance: Undecided → High

Please test 0.9.23a1. This should totally fix the problem. Let me know
your results.

On Mon, Apr 13, 2020 at 1:41 PM Evgeny Kozlov
<email address hidden> wrote:
>
> Linux Lite 4.0 LTS \n \l
> Linux 5.3.0-46-generic
>
> No significant system changes since last time RPD ran correctly.
>
> ** Attachment added: "Log files"
> https://bugs.launchpad.net/rapid/+bug/1872338/+attachment/5353401/+files/rpd%20-logs.zip
>
> --
> You received this bug notification because you are subscribed to Rapid
> Photo Downloader.
> https://bugs.launchpad.net/bugs/1872338
>
> Title:
> segfault on startup after upgrade
>
> Status in Rapid Photo Downloader:
> Triaged
>
> Bug description:
> I am getting a segfault starting up rapid-photo-downloader after the
> automatic upgrade to 0.9.22 on Debian 10.
>
> Fatal Python error: Segmentation fault
>
> Current thread 0x00007f749b6b1740 (most recent call first):
> File "/home/mash/.local/lib/python3.7/site-packages/raphodo/viewutils.py", line 409 in any_screen_scaled_qt
> File "/home/mash/.local/lib/python3.7/site-packages/raphodo/viewutils.py", line 422 in any_screen_scaled
> File "/home/mash/.local/lib/python3.7/site-packages/raphodo/rapid.py", line 6388 in main
> File "/home/mash/.local/bin/rapid-photo-downloader", line 8 in <module>
>
>
> I am tracing this is somehow related to the QT libraries
> (changing the code to just return False here .. and so on .. down the line a segfault happens each time a qt*application call is made....)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/rapid/+bug/1872338/+subscriptions

--
http://www.damonlynch.net

Damon Lynch (dlynch3) wrote :

Please test 0.9.23a1. This should totally fix the problem. Let me know your results.

Changed in rapid:
status: Triaged → Fix Released
Michael Aschauer (q8q6-m-ks2g) wrote :

Indeed. segfaults are gone! RPD is starting up again!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments