Bug#962846: Bug#962811: calibre: ebook-viewer crash on start

2020-06-16 Thread Dmitry Shachnev
Hi Davide!

On Mon, Jun 15, 2020 at 05:52:37PM +0200, Davide Prina wrote:
> I try to make a full debug. I never done that with a Python program, so I
> have searched on internet

Thanks!

> #3  0x0049d912 in Py_FatalError (msg=) at 
> ../Python/pylifecycle.c:2197
> #4  0x004b73b3 in PyEval_SaveThread () at ../Python/ceval.c:380
> #5  0x743ac549 in  () at 
> /usr/lib/python3/dist-packages/PyQt5/QtCore.cpython-38-x86_64-linux-gnu.so
> #6  0x73f0c44c in QMetaObject::activate(QObject*, int, int, void**) 
> () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
> #7  0x743a643e in  () at 
> /usr/lib/python3/dist-packages/PyQt5/QtCore.cpython-38-x86_64-linux-gnu.so
> #8  0x005f1fca in cfunction_call_varargs (kwargs=, 
> args=,
> func= remote 0x7fffbc357cf0>)
> at ../Include/internal/pycore_pyerrors.h:13

So this seems to be the relevant part here.

I managed to reproduce this issue locally with some dbg packages installed,
and this part of stacktrace is as follows:

#9  0x0051cb0a in Py_FatalError (msg=msg@entry=0x6d9a88 
"PyEval_SaveThread: NULL tstate") at ../Python/pylifecycle.c:2197
#10 0x004db7d7 in PyEval_SaveThread () at ../Python/ceval.c:380
#11 0x745f105c in qt_metacall_worker(sipSimpleWrapper*, PyTypeObject*, 
sipTypeDef*, QMetaObject::Call, int, void**)
(pySelf=0x7fffc0522c30, pytype=, base=, 
_c=QMetaObject::InvokeMetaMethod, _id=19, _a=0x27ac0e0)
at ../../qpy/QtCore/qpycore_qobject_helpers.cpp:106
#12 0x7413944c in QMetaObject::activate(QObject*, int, int, void**)
(sender=0x20249a0, signalOffset=, 
local_signal_index=, argv=)
at kernel/qobject.cpp:3821
#13 0x745e9a9e in do_emit (sigargs=, 
docstring=, parsed_signature=0x144cb30,
signal_index=, qtx=)
at ../../qpy/QtCore/qpycore_pyqtboundsignal.cpp:801
#14 pyqtBoundSignal_emit(PyObject*, PyObject*) (self=, 
args=)
at ../../qpy/QtCore/qpycore_pyqtboundsignal.cpp:742
#15 0x004344fb in cfunction_call_varargs (func=0x7fffc20b5530, 
args=0x74923b40, kwargs=0x0) at ../Objects/call.c:757

It looks like a change in qpycore_qobject_helpers.cpp in PyQt 5.15 needed
a corresponding change in sip [1] that is part of sip 4.19.23, and all
dependent packages need to be rebuilt against that sip.

[1]: https://riverbankcomputing.com/hg/sip/rev/812b5e26df96

I will add a Breaks: against old pyqt5webengine to new pyqt5. Now that new
pyqt5webengine is already in testing, this is not urgent, but it will be
part of the next upload.

There is nothing I can do about this in pyqt5webengine, so I am closing the
bug filed against it.

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Bug#962845: Bug#962811: calibre: ebook-viewer crash on start

2020-06-15 Thread Davide Prina
I try to make a full debug. I never done that with a Python program, so 
I have searched on internet


# apt install calibre-bin-dbgsym
$ gdb python3
Reading symbols from python3...
Reading symbols from 
/usr/lib/debug/.build-id/97/0f19629d98e5c631b44f6803fa34a5a07c3806.debug...


(gdb) run /usr/bin/ebook-viewer /tmp/a.epub
[...]

(gdb) info threads
  Id   Target Id   Frame
* 1Thread 0x77c20740 (LWP 12042) "LoadBook"__GI_raise 
(sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
  2Thread 0x7fffdf7fb700 (LWP 12048) "QXcbEventQueue" 
0x77ed1b7f in __GI___poll (fds=0x7fffdf7fad68, nfds=1, 
timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  3Thread 0x7fffde3f2700 (LWP 12049) "gmain" 
0x77ed1b7f in __GI___poll (fds=0x1527da0, nfds=1, timeout=-1) at 
../sysdeps/unix/sysv/linux/poll.c:29
  4Thread 0x7fffddbf1700 (LWP 12050) "pool-python3"syscall () 
at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  5Thread 0x7fffdd394700 (LWP 12051) "gdbus" 
0x77ed1b7f in __GI___poll (fds=0x7fffd40102b0, nfds=2, 
timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  6Thread 0x7fffdcb71700 (LWP 12052) "dconf worker" 
0x77ed1b7f in __GI___poll (fds=0x153dde0, nfds=1, timeout=-1) at 
../sysdeps/unix/sysv/linux/poll.c:29
  7Thread 0x7fffc05cc700 (LWP 12054) "python3:rcs0" 
futex_wait_cancelable (private=0, expected=0, futex_word=0x174aafc) at 
../sysdeps/unix/sysv/linux/futex-internal.h:80
  8Thread 0x7fffbfc4e700 (LWP 12055) "python3:disk$0" 
futex_wait_cancelable (private=0, expected=0, futex_word=0x7fffd80042c8) 
at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  9Thread 0x7fffbf44d700 (LWP 12056) "python3:disk$1" 
futex_wait_cancelable (private=0, expected=0, futex_word=0x7fffd80042c8) 
at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  10   Thread 0x7fffbec4c700 (LWP 12057) "python3:disk$2" 
futex_wait_cancelable (private=0, expected=0, futex_word=0x7fffd80042c8) 
at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  11   Thread 0x7fffbe44b700 (LWP 12058) "python3:disk$3" 
futex_wait_cancelable (private=0, expected=0, futex_word=0x7fffd80042c8) 
at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  12   Thread 0x7fffbd72b700 (LWP 12059) "QDBusConnection" 
0x77ed1b7f in __GI___poll (fds=0x7fffa0001de0, nfds=2, 
timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  13   Thread 0x7fffa7fff700 (LWP 12060) "sandbox_ipc_thr" 
0x77ed1b7f in __GI___poll (fds=0x7fffa7ffec50, nfds=2, 
timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  14   Thread 0x7fffa77fe700 (LWP 12062) "NetworkChangeNo" 
0x77edc646 in epoll_wait (epfd=35, events=0x7fff94002050, 
maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
  15   Thread 0x7fffa6ffd700 (LWP 12063) "inotify_reader" 
0x77ed4053 in __GI___select (nfds=42, readfds=0x7fffa6ffcde0, 
writefds=0x0, exceptfds=0x0, timeout=0x0)

at ../sysdeps/unix/sysv/linux/select.c:41
  16   Thread 0x7fffa67fc700 (LWP 12064) "TaskSchedulerSe" 
0x77edc646 in epoll_wait (epfd=42, events=0x7fff8c002040, 
maxevents=32, timeout=210) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
  17   Thread 0x7fffa5ffb700 (LWP 12065) "TaskSchedulerFo" 
futex_abstimed_wait_cancelable (private=0, abstime=0x7fffa5ffac60, 
clockid=, expected=0, futex_word=0x7fffa5ffada8)

at ../sysdeps/unix/sysv/linux/futex-internal.h:208
  18   Thread 0x7fffa57fa700 (LWP 12066) "TaskSchedulerFo" 
futex_abstimed_wait_cancelable (private=0, abstime=0x7fffa57f9c60, 
clockid=, expected=0, futex_word=0x7fffa57f9da8)

at ../sysdeps/unix/sysv/linux/futex-internal.h:208
  19   Thread 0x7fffa4ff9700 (LWP 12067) "TaskSchedulerFo" 
futex_abstimed_wait_cancelable (private=0, abstime=0x7fffa4ff8c60, 
clockid=, expected=0, futex_word=0x7fffa4ff8da8)

at ../sysdeps/unix/sysv/linux/futex-internal.h:208
  20   Thread 0x7fff83fff700 (LWP 12068) "TaskSchedulerFo" 
futex_abstimed_wait_cancelable (private=0, abstime=0x7fff83ffec60, 
clockid=, expected=0, futex_word=0x7fff83ffeda8)

at ../sysdeps/unix/sysv/linux/futex-internal.h:208
  21   Thread 0x7fff837fe700 (LWP 12069) "Chrome_IOThread" 
0x77edc646 in epoll_wait (epfd=49, events=0x7fff74002010, 
maxevents=32, timeout=4943) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
  22   Thread 0x7fff82ffd700 (LWP 12070) "TaskSchedulerSi" 
futex_wait_cancelable (private=0, expected=0, futex_word=0x7fff82ffcdb8) 
at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  23   Thread 0x7fff827fc700 (LWP 12071) "CompositorTileW" 
futex_wait_cancelable (private=0, expected=0, futex_word=0x1ed5048) at 
../sysdeps/unix/sysv/linux/futex-internal.h:80
  24   Thread 0x7fff817fa700 (LWP 12073) "AudioThread" 
futex_abstimed_wait_cancelable (private=0, abstime=0x7fff817f9c20, 
clockid=, expected=0, futex_word=0x7fff817f9d68)

at ../sysdeps/unix/sysv/linux/futex-internal.h:208
  25   Thread 0x7fff81ffb700 (LWP 12072) 

Bug#962845: Bug#962811: calibre: ebook-viewer crash on start

2020-06-15 Thread Dmitry Shachnev
Hi Harlan!

On Sun, Jun 14, 2020 at 07:53:48PM -0400, Harlan Lieberman-Berg wrote:
> I've done a bit of digging, and this problem is solved by manually
> updating pyqt5webengine to 5.15 from unstable.  The root cause is that
> there is an unstated strict version dependency between these two
> packages, and/or some symbols were changed without being handled
> properly.
>
> Reassigning the bug to the correct packages.

PyQt and PyQtWebEngine do not depend on versions of each other.

I have tested, and a simple PyQtWebEngine based application works for me
and can load web pages fine, with PyQt 5.15 and PyQtWebEngine 5.14 (as
available right now in testing).

The autopkgtest also passed with these versions, though it only tries to
import modules and does not check if they actually work:

https://ci.debian.net/data/autopkgtest/testing/amd64/p/pyqt5webengine/5841177/log.gz

Maybe this is an issue in calibre, but hard to tell without a stack trace.

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Bug#962811: calibre: ebook-viewer crash on start

2020-06-14 Thread Harlan Lieberman-Berg
severity grave
tags 962811 +confirmed
clone 962811 -1 -2
reassign -1 pyqt5webengine 5.14.0-2+b1
retitle -1 pyqt5webengine: fails to block pyqt5 update
reassign -2 pyqt5 5.15.0+dfsg-1
retitle -2 pyqt5: update breaks pyqt5webengine and deps
affects -1 calibre
thanks

On Sun, 14 Jun 2020 15:31:47 +0200 Davide Prina  wrote:
> in this bug report the prolem is a python2 library, I have see that the
> corresponding python3 library has been updated today:
> python3-pyqt5
>
> but I cant try to install the previews version, elsewhere it will remove
> calibre and so I cannot test if this is the problem.

I've done a bit of digging, and this problem is solved by manually
updating pyqt5webengine to 5.15 from unstable.  The root cause is that
there is an unstated strict version dependency between these two
packages, and/or some symbols were changed without being handled
properly.

Reassigning the bug to the correct packages.

Sincerely,

-- 
Harlan Lieberman-Berg
~hlieberman



Bug#962811: calibre: ebook-viewer crash on start

2020-06-14 Thread Davide Prina

I have try to debug

# apt install python3-dbg

$ gdb python3
[...]
Reading symbols from python3...
Reading symbols from 
/usr/lib/debug/.build-id/97/0f19629d98e5c631b44f6803fa34a5a07c3806.debug...


(gdb) run /usr/bin/ebook-viewer /tmp/a.epub
Starting program: /usr/bin/python3 /usr/bin/ebook-viewer /tmp/a.epub
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 42697]
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use 
QT_QPA_PLATFORM=wayland to run on Wayland anyway.

[New Thread 0x7fffdfab3700 (LWP 42698)]
[New Thread 0x7fffde7de700 (LWP 42699)]
[New Thread 0x7fffddfdd700 (LWP 42700)]
[New Thread 0x7fffdd780700 (LWP 42701)]
[New Thread 0x7fffdcf7f700 (LWP 42702)]
[New Thread 0x7fffc0a0c700 (LWP 42703)]
[New Thread 0x7fffbbfff700 (LWP 42704)]
[New Thread 0x7fffb37fe700 (LWP 42705)]
[New Thread 0x7fffbb7fe700 (LWP 42706)]
[New Thread 0x7fffbaffd700 (LWP 42707)]
[New Thread 0x7fffba361700 (LWP 42708)]
[New Thread 0x7fffb91c3700 (LWP 42710)]
[Detaching after fork from child process 42711]
[New Thread 0x7fffb89c2700 (LWP 42712)]
[New Thread 0x7fffb2ffd700 (LWP 42714)]
[New Thread 0x7fffb3fff700 (LWP 42713)]
[New Thread 0x7fffb27fc700 (LWP 42715)]
[New Thread 0x7fffb1ffb700 (LWP 42716)]
[New Thread 0x7fffb17fa700 (LWP 42717)]
[New Thread 0x7fffb0ff9700 (LWP 42718)]
[New Thread 0x7fff83fff700 (LWP 42719)]
[New Thread 0x7fff837fe700 (LWP 42720)]
[New Thread 0x7fff82ffd700 (LWP 42721)]
[New Thread 0x7fff827fc700 (LWP 42722)]
[New Thread 0x7fff81ffb700 (LWP 42723)]
[New Thread 0x7fff817fa700 (LWP 42724)]
[New Thread 0x7fff80ff9700 (LWP 42725)]
[New Thread 0x7fff4700 (LWP 42726)]
[New Thread 0x7fff4f7fe700 (LWP 42727)]
[New Thread 0x7fff4e7fc700 (LWP 42729)]
[New Thread 0x7fff4effd700 (LWP 42728)]
[New Thread 0x7fff4dffb700 (LWP 42752)]
[Thread 0x7fff4dffb700 (LWP 42752) exited]
[New Thread 0x7fff4dffb700 (LWP 42753)]
Fatal Python error: PyEval_SaveThread: NULL tstate
Python runtime state: initialized

Current thread 0x77c20740 (most recent call first):
  File "/usr/lib/calibre/calibre/gui2/webengine.py", line 126 in 
_dispatch_messages

  File "/usr/lib/calibre/calibre/gui2/viewer/main.py", line 229 in main
  File "/usr/lib/calibre/calibre/gui_launch.py", line 81 in ebook_viewer
  File "/usr/bin/ebook-viewer", line 20 in 

Thread 1 "LoadBook" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50  ../sysdeps/unix/sysv/linux/raise.c: File o directory non esistente.


If I try to continue it stop

(gdb) next
Couldn't get registers: Nessun processo corrisponde.
Couldn't get registers: Nessun processo corrisponde.
(gdb) [Thread 0x7fff4dffb700 (LWP 42869) exited]
[Thread 0x7fff4e7fc700 (LWP 42845) exited]
[Thread 0x7fff4effd700 (LWP 42844) exited]
[Thread 0x7fff4f7fe700 (LWP 42843) exited]
[Thread 0x7fff4700 (LWP 42842) exited]
[Thread 0x7fff78ff9700 (LWP 42841) exited]
[Thread 0x7fff797fa700 (LWP 42840) exited]
[Thread 0x7fff79ffb700 (LWP 42839) exited]
[Thread 0x7fff7a7fc700 (LWP 42838) exited]
[Thread 0x7fff7affd700 (LWP 42837) exited]
[Thread 0x7fff7b7fe700 (LWP 42836) exited]
[Thread 0x7fff7bfff700 (LWP 42835) exited]
[Thread 0x7fffb0ff9700 (LWP 42834) exited]
[Thread 0x7fffb17fa700 (LWP 42833) exited]
[Thread 0x7fffb1ffb700 (LWP 42832) exited]
[Thread 0x7fffb27fc700 (LWP 42831) exited]
[Thread 0x7fffb2ffd700 (LWP 42830) exited]
[Thread 0x7fffb3fff700 (LWP 42829) exited]
[Thread 0x7fffb89c2700 (LWP 42828) exited]
[Thread 0x7fffb91c3700 (LWP 42826) exited]
[Thread 0x7fffba361700 (LWP 42825) exited]
[Thread 0x7fffbaffd700 (LWP 42824) exited]
[Thread 0x7fffbb7fe700 (LWP 42823) exited]
[Thread 0x7fffb37fe700 (LWP 42822) exited]
[Thread 0x7fffbbfff700 (LWP 42821) exited]
[Thread 0x7fffc0a0c700 (LWP 42820) exited]
[Thread 0x7fffdcf7c700 (LWP 42819) exited]
[Thread 0x7fffdd77d700 (LWP 42818) exited]
[Thread 0x7fffde7db700 (LWP 42816) exited]
[Thread 0x7fffdfab0700 (LWP 42815) exited]
[Thread 0x77c20740 (LWP 42810) exited]

Cannot execute this command without a live selected thread.


let me know if I can do more test

Ciao
Davide



Bug#962811: calibre: ebook-viewer crash on start

2020-06-14 Thread Davide Prina

Package: calibre
Version: 4.99.4+dfsg+really4.17.0-1
Severity: normal

Dear Maintainer,

ebook-viewer crash for every ebook I try to open

$ ebook-viewer a.epub
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use 
QT_QPA_PLATFORM=wayland to run on Wayland anyway.

Fatal Python error: PyEval_SaveThread: NULL tstate
Python runtime state: initialized

Current thread 0x7f3ee047d740 (most recent call first):
  File "/usr/lib/calibre/calibre/gui2/webengine.py", line 126 in 
_dispatch_messages

  File "/usr/lib/calibre/calibre/gui2/viewer/main.py", line 229 in main
  File "/usr/lib/calibre/calibre/gui_launch.py", line 81 in ebook_viewer
  File "/usr/bin/ebook-viewer", line 20 in 
Annullato

I have found this bug report in arch:
https://bugs.archlinux.org/task/66905

in this bug report the prolem is a python2 library, I have see that the 
corresponding python3 library has been updated today:

python3-pyqt5

but I cant try to install the previews version, elsewhere it will remove 
calibre and so I cannot test if this is the problem.


Let me know if you need more information or what I can do for try to 
understand the problem


Ciao
Davide

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.6.14-dp-20200530 (SMP w/4 CPU cores; PREEMPT)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8), 
LANGUAGE=it_IT.utf8 (charmap=UTF-8)

Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages calibre depends on:
ii  calibre-bin  4.99.4+dfsg+really4.17.0-1+b1
ii  dpkg 1.19.7
ii  fonts-liberation 1:1.07.4-11
ii  imagemagick  8:6.9.10.23+dfsg-2.1+b2
ii  imagemagick-6.q16 [imagemagick]  8:6.9.10.23+dfsg-2.1+b2
ii  libjpeg-turbo-progs  1:1.5.2-2+b1
ii  libjs-mathjax2.7.8+dfsg-1
ii  libjxr-tools 1.1-6+b1
ii  optipng  0.7.7-1+b1
ii  poppler-utils0.71.0-6
ii  python3  3.8.2-3
ii  python3-apsw 3.30.1-r1-1.1+b1
ii  python3-bs4  4.9.1-1
ii  python3-chardet  3.0.4-7
ii  python3-chm  0.8.6-2+b1
ii  python3-css-parser   1.0.4-2
ii  python3-cssselect1.1.0-2
ii  python3-cssutils 1.0.2-3
ii  python3-dateutil 2.8.1-4
ii  python3-dbus 1.2.16-2
ii  python3-feedparser   5.2.1-2
ii  python3-html2text2020.1.16-1
ii  python3-html5-parser 0.4.9-3+b1
ii  python3-html5lib 1.0.1-3
ii  python3-lxml 4.5.0-1.1
ii  python3-markdown 3.2.2-1
ii  python3-mechanize1:0.4.5-2
ii  python3-msgpack  0.6.2-1+b1
ii  python3-netifaces0.10.9-0.2+b1
ii  python3-pil  7.0.0-4+b1
ii  python3-pkg-resources46.1.3-1
ii  python3-pygments 2.3.1+dfsg-3
ii  python3-pyparsing2.4.7-1
ii  python3-pyqt55.15.0+dfsg-1
ii  python3-pyqt5.qtsvg  5.15.0+dfsg-1
ii  python3-pyqt5.qtwebengine5.14.0-2+b1
ii  python3-regex0.1.20190819-2+b1
ii  python3-routes   2.4.1-2
ii  python3-zeroconf 0.26.1-1
ii  xdg-utils1.1.3-2

Versions of packages calibre recommends:
ii  python3-dnspython  1.16.0-2
ii  udisks22.9.0-1

Versions of packages calibre suggests:
ii  python3-openssl   19.1.0-2
pn  python3-unrardll  

-- debconf-show failed