open-eid / DigiDoc4-Client

DigiDoc4 Client is an application for digitally signing and encrypting documents; the software includes functionality to manage Estonian ID-card - change pin codes etc.
https://www.id.ee/en/article/install-id-software/
Other
117 stars 42 forks source link

qdigidoc4 segmentation fault #1172

Closed laur89 closed 1 year ago

laur89 commented 1 year ago
$ qdigidoc4 
Chache configuration serial: 149
Bundled configuration serial: 149
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QSigner(0x5588bcc36440), parent's thread is QThread(0x5588bc99db50), current thread is QSigner(0x5588bcc36440)
Loading: "opensc-pkcs11.so"
"OPENSC PROJECT                   (2.20)" 
"OPENSC SMARTCARD FRAMEWORK       (0.23)" 
Flags: 0
Segmentation fault
$ uname -a
Linux p14s 6.1.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.8-1 (2023-01-29) x86_64 GNU/Linux

Relevant packages:
-  qdigidoc4           4.2.13.4428-2004
-  libdigidocpp-common 3.14.11.1432-2004
-  libdigidocpp1       3.14.11.1432-2004
-  libqt5gui5          5.15.8+dfsg-2
-  pcscd               1.9.9-15
-  opensc              0.23.0-0.1
-  opensc-pkcs11       0.23.0-0.1
-  open-eid            22.11.0.1932-2004
metsma commented 1 year ago

Can you run DigiDoc with debuger

sudo apt install qdigidoc4-dbgsym
gdb qdigidoc4
laur89 commented 1 year ago

What should be ran from the gdb prompt?

$ gdb qdigidoc4
GNU gdb (Debian 12.1-4+b1) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from qdigidoc4...
Reading symbols from /usr/lib/debug/.build-id/0a/8c199b68c16b50139eeddb675d5d681ed936c2.debug...
@(gdb)
metsma commented 1 year ago

Type

run
laur89 commented 1 year ago
@(gdb) run
Starting program: /usr/bin/qdigidoc4 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff08b86c0 (LWP 2061389)]
[New Thread 0x7fffebfff6c0 (LWP 2061390)]
[New Thread 0x7fffeb3676c0 (LWP 2061393)]
Chache configuration serial: 149
Bundled configuration serial: 149
[New Thread 0x7fffeaa7b6c0 (LWP 2061394)]
[New Thread 0x7fffea27a6c0 (LWP 2061395)]
[New Thread 0x7fffe96556c0 (LWP 2061396)]
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QSigner(0x555555cf02a0), parent's thread is QThread(0x555555a74b50), current thread is QSigner(0x555555cf02a0)
[New Thread 0x7fffe8e546c0 (LWP 2061397)]
Loading: "opensc-pkcs11.so"
[New Thread 0x7fffd3f816c0 (LWP 2061398)]

Thread 8 "qdigidoc4" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe8e546c0 (LWP 2061397)]
0x00007ffff7e535b5 in pthread_rwlock_rdlock () from /lib/x86_64-linux-gnu/libc.so.6
@(gdb)
metsma commented 1 year ago

Can you type after crash

bt
laur89 commented 1 year ago
@(gdb) run
Starting program: /usr/bin/qdigidoc4 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff08b86c0 (LWP 2254889)]
[New Thread 0x7fffebfff6c0 (LWP 2254890)]
[New Thread 0x7fffeb3676c0 (LWP 2254893)]
Chache configuration serial: 149
Bundled configuration serial: 149
[New Thread 0x7fffeaa7b6c0 (LWP 2254894)]
[New Thread 0x7fffea27a6c0 (LWP 2254895)]
[New Thread 0x7fffe96556c0 (LWP 2254896)]
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QSigner(0x555555d0c980), parent's thread is QThread(0x555555a74b50), current thread is QSigner(0x555555d0c980)
Loading: "opensc-pkcs11.so"
[New Thread 0x7fffe8e0e6c0 (LWP 2254897)]
[New Thread 0x7fffd3fff6c0 (LWP 2254898)]
[New Thread 0x7fffd37fe6c0 (LWP 2254899)]
"OPENSC PROJECT                   (2.20)" 
"OPENSC SMARTCARD FRAMEWORK       (0.23)" 
Flags: 0

Thread 8 "qdigidoc4" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe8e0e6c0 (LWP 2254897)]
0x00007ffff7e535b5 in pthread_rwlock_rdlock () from /lib/x86_64-linux-gnu/libc.so.6
@(gdb) bt
#0  0x00007ffff7e535b5 in pthread_rwlock_rdlock () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff423d6a9 in CRYPTO_THREAD_read_lock () from /lib/x86_64-linux-gnu/libcrypto.so.3
#2  0x00007ffff422ccd7 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#3  0x00007ffff420a500 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#4  0x00007ffff420afb8 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#5  0x00007ffff4213f38 in EVP_KEYMGMT_do_all_provided () from /lib/x86_64-linux-gnu/libcrypto.so.3
#6  0x00007ffff41de660 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#7  0x00007ffff41de928 in OSSL_DECODER_CTX_new_for_pkey () from /lib/x86_64-linux-gnu/libcrypto.so.3
#8  0x00007ffff42e7dcd in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#9  0x00007ffff40facbf in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#10 0x00007ffff40fba90 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#11 0x00007ffff40fb0e8 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#12 0x00007ffff40fba90 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#13 0x00007ffff40fb0e8 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
#14 0x00007ffff40fc08e in ASN1_item_d2i_ex () from /lib/x86_64-linux-gnu/libcrypto.so.3
#15 0x00007ffff40e7135 in ASN1_item_dup () from /lib/x86_64-linux-gnu/libcrypto.so.3
#16 0x00007ffff7413c08 in OpenSSLCryptoX509::OpenSSLCryptoX509(x509_st*) () from /lib/x86_64-linux-gnu/libxml-security-c.so.20
#17 0x00007ffff7b57ce7 in ?? () from /lib/x86_64-linux-gnu/libdigidocpp.so.1
#18 0x00007ffff7b57e8b in ?? () from /lib/x86_64-linux-gnu/libdigidocpp.so.1
#19 0x00007ffff7b583b7 in ?? () from /lib/x86_64-linux-gnu/libdigidocpp.so.1
#20 0x00007ffff7b5878f in ?? () from /lib/x86_64-linux-gnu/libdigidocpp.so.1
#21 0x00007ffff7b59adc in ?? () from /lib/x86_64-linux-gnu/libdigidocpp.so.1
#22 0x00007ffff7adf507 in ?? () from /lib/x86_64-linux-gnu/libdigidocpp.so.1
#23 0x00007ffff7adf82c in ?? () from /lib/x86_64-linux-gnu/libdigidocpp.so.1
#24 0x00007ffff7a6e5e2 in ?? () from /lib/x86_64-linux-gnu/libdigidocpp.so.1
#25 0x00007ffff5ad44a3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#26 0x00007ffff7e4dfd4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#27 0x00007ffff7ece66c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
@(gdb)
metsma commented 1 year ago

What distro is this ? looking packages seems like Ubuntu 20.04. But there is no openssl 3.0 "libcrypto.so.3" in this ubuntu version. If it is debian? then you should probably use Ubuntu 22.04 packages. They are linked with openssl 3.0

laur89 commented 1 year ago

It's debian testing, ie the rolling release. Followed the linux-installer script, so added the focal repo. Should I switch to jammy (22.04 codename) instead?

metsma commented 1 year ago

Yes

laur89 commented 1 year ago

Reinstalled and the client starts. Tänud!