Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault #1215

Closed
Arszilla opened this issue Aug 10, 2023 · 8 comments
Closed

Segmentation Fault #1215

Arszilla opened this issue Aug 10, 2023 · 8 comments

Comments

@Arszilla
Copy link

Arszilla commented Aug 10, 2023

I've tried installing DigiDoc4-Client by modifiying the install-open-eid.sh script to include Kali Linux but that causes the following error when starting qdigidoc4 via CLI:

Chache configuration serial: 157
Bundled configuration serial: 160
Bundled configuration is recent than cache, resetting cache
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QSigner(0x562df2d18eb0), parent's thread is QThread(0x562df2b82bd0), current thread is QSigner(0x562df2d18eb0)
2023-08-10T07:52:50Z D [File.cpp:311] - Created directory or direcotry exists '/home/arszilla/.digidocpp/tsl'
Loading: "opensc-pkcs11.so"
[1]    27360 segmentation fault  ./build/client/qdigidoc4

This issue also replicates when DigiDoc4-Client is also built from the source.

$ uname -a 
Linux kali-dell 6.3.0-kali1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.3.7-1kali1 (2023-06-29) x86_64 GNU/Linux

$ cat /etc/os-release
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
VERSION_ID="2023.2"
VERSION="2023.2"
VERSION_CODENAME=kali-rolling
ID=kali
ID_LIKE=debian
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"
ANSI_COLOR="1;31"

In theory, open-eid and its components should work in Kali, as it's Debian based (although it's Debian Testing).

@metsma
Copy link
Contributor

metsma commented Aug 10, 2023

can you run it with gdb?

@Arszilla
Copy link
Author

can you run it with gdb?

$ gdb ./build/client/qdigidoc4
GNU gdb (Debian 13.2-1) 13.2
Copyright (C) 2023 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 ./build/client/qdigidoc4...
(No debugging symbols found in ./build/client/qdigidoc4)
(gdb) run
Starting program: /opt/DigiDoc4-Client/build/client/qdigidoc4 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff07ff6c0 (LWP 28387)]
Chache configuration serial: 160
Bundled configuration serial: 160
[New Thread 0x7fffefe946c0 (LWP 28389)]
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QSigner(0x555555c7a3b0), parent's thread is QThread(0x555555af7bd0), current thread is QSigner(0x555555c7a3b0)
[New Thread 0x7fffef6936c0 (LWP 28390)]
Loading: "opensc-pkcs11.so"
2023-08-10T08:08:34Z D [File.cpp:311] - Created directory or direcotry exists '/home/arszilla/.digidocpp/tsl'

Thread 4 "qdigidoc4" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffef6936c0 (LWP 28390)]
__strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:88
88      ../sysdeps/x86_64/multiarch/strlen-evex.S: No such file or directory.
(gdb) bt
#0  __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:88
#1  0x00007ffff7632ae7 in CRYPTO_strdup () at /lib/x86_64-linux-gnu/libcrypto.so.3
#2  0x00007ffff76e7f1d in  () at /lib/x86_64-linux-gnu/libcrypto.so.3
#3  0x00007ffff74fdf5d in  () at /lib/x86_64-linux-gnu/libcrypto.so.3
#4  0x00007ffff74fdc0b in  () at /lib/x86_64-linux-gnu/libcrypto.so.3
#5  0x00007ffff74fde6b in  () at /lib/x86_64-linux-gnu/libcrypto.so.3
#6  0x00007ffff74fdc0b in  () at /lib/x86_64-linux-gnu/libcrypto.so.3
#7  0x00007ffff74fde6b in  () at /lib/x86_64-linux-gnu/libcrypto.so.3
#8  0x00007ffff74fb4f8 in  () at /lib/x86_64-linux-gnu/libcrypto.so.3
#9  0x00007ffff74fc08e in ASN1_item_d2i_ex () at /lib/x86_64-linux-gnu/libcrypto.so.3
#10 0x00007ffff74e7135 in ASN1_item_dup () at /lib/x86_64-linux-gnu/libcrypto.so.3
#11 0x00007ffff5dbdc08 in OpenSSLCryptoX509::OpenSSLCryptoX509(x509_st*) ()
    at /lib/x86_64-linux-gnu/libxml-security-c.so.20
#12 0x00007ffff7d72347 in  () at /lib/x86_64-linux-gnu/libdigidocpp.so.1
#13 0x00007ffff7d724eb in  () at /lib/x86_64-linux-gnu/libdigidocpp.so.1
#14 0x00007ffff7d72a5d in  () at /lib/x86_64-linux-gnu/libdigidocpp.so.1
#15 0x00007ffff7d72e4f in  () at /lib/x86_64-linux-gnu/libdigidocpp.so.1
#16 0x00007ffff7d741cd in  () at /lib/x86_64-linux-gnu/libdigidocpp.so.1
#17 0x00007ffff7ce76ea in  () at /lib/x86_64-linux-gnu/libdigidocpp.so.1
#18 0x00007ffff7ce7a0c in  () at /lib/x86_64-linux-gnu/libdigidocpp.so.1
#19 0x00007ffff7c73f02 in  () at /lib/x86_64-linux-gnu/libdigidocpp.so.1
#20 0x00007ffff5adc483 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#21 0x00007ffff58a63ec in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:444
#22 0x00007ffff5926a1c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81```

@metsma
Copy link
Contributor

metsma commented Aug 10, 2023

The libxml-security-c package is from where?
seems like somekind openssl version mismatch ? 3.0 vs 3.1?

@Arszilla
Copy link
Author

Arszilla commented Aug 10, 2023

Currently, libxml-security-c20 is installed, which has the following info:

$ apt info libxml-security-c20
Package: libxml-security-c20
Version: 2.0.4-2
Priority: optional
Section: libs
Source: xml-security-c
Maintainer: Debian Shib Team <pkg-shibboleth-devel@lists.alioth.debian.org>
Installed-Size: 1,082 kB
Depends: libc6 (>= 2.14), libgcc-s1 (>= 3.0), libssl3 (>= 3.0.0), libstdc++6 (>= 11), libxerces-c3.2
Homepage: https://santuario.apache.org/cindex.html
Tag: role::shared-lib
Download-Size: 260 kB
APT-Manual-Installed: no
APT-Sources: http://http.kali.org/kali kali-rolling/main amd64 Packages
Description: C++ library for XML Digital Signatures (runtime)
 Apache XML Security for C++ is a library for the XML
 Digital Security specification.  It provides processing and handling of XML
 Key Management Specifications (XKMS) messages.
 .
 This package contains the files necessary for running applications that
 use the Apache XML Security for C++ library.

N: There is 1 additional record. Please use the '-a' switch to see it
$ apt depends libxml-security-c20
libxml-security-c20
Reverse Depends:
  Depends: libxml-security-c-dev (= 2.0.2-3build1RIA1)
  Depends: xml-security-c-utils
  Depends: libxml-security-c-dev (= 2.0.4-2)
  Depends: libdigidocpp1
  Depends: libdigidocpp-tools
  Depends: xml-security-c-utils (>= 2.0.4)
  Depends: libxmltooling10 (>= 2.0.4)
  Depends: libsaml12 (>= 2.0.4)
  Depends: libshibsp11 (>= 2.0.4)

i.e. it's coming from Debian (not maintained etc. by Kali themselves)

@metsma
Copy link
Contributor

metsma commented Aug 14, 2023

You can try lunar packages https://installer.id.ee/media/ubuntu/dists/lunar/main/binary-amd64/Packages
and second we distribute xml-security-c compiled with xalan-c support

@bingen
Copy link

bingen commented Sep 18, 2023

I was having the same issue under KDE Neon 5.27 (Ubuntu 22.04). I used also the ie.ee install script. I was about to manually build myself, but then the first 2 steps in the readme did the trick. In particular:

curl https://installer.id.ee/media/install-scripts/C6C83D68.pub | gpg --dearmor | tee /etc/apt/trusted.gpg.d/ria-repository.gpg > /dev/null
echo "deb http://installer.id.ee/media/ubuntu/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/ria-repository.list
sudo apt update

sudo apt install cmake qt6-tools-dev libqt6core5compat6-dev libqt6svg6-dev libpcsclite-dev libssl-dev libdigidocpp-dev libldap2-dev gettext pkg-config

@kristelmerilain
Copy link
Contributor

Closing due inactivity, reopen if needed.

@Arszilla
Copy link
Author

With the changes introduced in open-eid/linux-installer#120, this issue cannot be reproduced any further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants