Bug#841762: kdeconnect: More information about kedconnectd crashing

2020-05-27 Thread Sandro Knauß
Hey,

>   I've been quite surprised to find that this bug report was first filled
>   in 2016 because I've only began experiencing it for about a week. Using
>   testing I waited for a week to see if a fix would come. Now's the time
>   for the BR.

well this is a bug, that needs to be solved by upstream, so please file a 
bugreport at https://bugs.kde.org
 
>   It's also sad that we can't strace which system call causes the crash
>   nor use gdb (even without debugging information).
> 
> --8<--8<--8<--8<--8<--8<--8<--8<--
> ~$ LC_ALL=C strace /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
> strace: test_ptrace_get_syscall_info: PTRACE_TRACEME: Operation not
> permitted strace: ptrace(PTRACE_TRACEME, ...): Operation not permitted
> +++ exited with 1 +++
> ~$ gdb /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
> [...]
> (No debugging symbols found in
> /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd) (gdb) run
> Starting program: /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
> warning: Could not trace the inferior process.
> warning: ptrace: Operation not permitted
> During startup program exited with code 127.
> --8<--8<--8<--8<--8<--8<--8<--8<--

Your user needs to have the ptrace permission in order to use gdb successfully  
[1]. And you need to install the symbols files: kdeconnect-dbgsym from the 
repo:
deb http://debug.mirrors.debian.org/debian-debug/ unstable-debug main

hefee

[1] https://wiki.ubuntu.com/SecurityTeam/Roadmap/
KernelHardening#ptrace_Protection

signature.asc
Description: This is a digitally signed message part.


Bug#841762: kdeconnect: More information about kedconnectd crashing

2020-05-27 Thread Thomas
Package: kdeconnect
Version: 1.3.3-2+b1
Followup-For: Bug #841762


  Hello !
  I've been quite surprised to find that this bug report was first filled
  in 2016 because I've only began experiencing it for about a week. Using
  testing I waited for a week to see if a fix would come. Now's the time
  for the BR.
  
  
  Here is what I get when I start kdeconnecd manually :

--8<--8<--8<--8<--8<--8<--8<--8<--
~$ LC_ALL=C /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
kdeconnect.core: KdeConnect daemon starting
kdeconnect.core: onStart
kdeconnect.core: KdeConnect daemon started
kdeconnect.core: Broadcasting identity packet
kdeconnect.core: Unserialization error: "unterminated string"
kdeconnect.core: Unserialization error: "illegal value"
kdeconnect.core: Fallback (1), try reverse connection (send udp packet) 
"Network unreachable"
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kdeconnectd path = /usr/lib/x86_64-linux-gnu/libexec 
pid = 467719
KCrash: Arguments: /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from 
kdeinit
sock_file=/run/user/1000/kdeinit5__0

[1]+  Stoppé LC_ALL=C 
/usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
~$ %1
LC_ALL=C /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
QSocketNotifier: Invalid socket 10 and type 'Read', disabling...
QSocketNotifier: Invalid socket 13 and type 'Read', disabling...
^C
--8<--8<--8<--8<--8<--8<--8<--8<--


  I added LC_ALL=C in order to have the "Network unreachable" text in
  english...

  It's also sad that we can't strace which system call causes the crash
  nor use gdb (even without debugging information).

--8<--8<--8<--8<--8<--8<--8<--8<--
~$ LC_ALL=C strace /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
strace: test_ptrace_get_syscall_info: PTRACE_TRACEME: Operation not permitted
strace: ptrace(PTRACE_TRACEME, ...): Operation not permitted
+++ exited with 1 +++
~$ gdb /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
[...]
(No debugging symbols found in /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd)
(gdb) run
Starting program: /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
warning: Could not trace the inferior process.
warning: ptrace: Operation not permitted
During startup program exited with code 127.
--8<--8<--8<--8<--8<--8<--8<--8<--


  I Recently made some modifications to iptables and sysctl as I wanted
  to improve my system security. I reverted my iptables configuration
  and it seems to be related with the sysctl knob net.ipv6.bindv6only.
  When set to 1, kdeconnectd crashes. So I put it back to 0...

--8<--8<--8<--8<--8<--8<--8<--8<--
~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source   destination 

Chain FORWARD (policy ACCEPT)
target prot opt source   destination 

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination
~$ cat /etc/sysctl.d/local.conf 
#
# https://lwn.net/Articles/688462/
#
#net.ipv6.bindv6only = 1
[...]
--8<--8<--8<--8<--8<--8<--8<--8<--


  HTH.



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

Kernel: Linux 5.6.0-1-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_USER, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages kdeconnect depends on:
ii  kde-cli-tools 4:5.17.5-2
ii  kio   5.62.1-2+b1
ii  libc6 2.30-8
ii  libfakekey0   0.1-10+b1
ii  libkf5configcore5 5.62.0-1+b1
ii  libkf5configwidgets5  5.62.0-1+b1
ii  libkf5coreaddons5 5.62.0-1
ii  libkf5dbusaddons5 5.62.0-1
ii  libkf5i18n5   5.62.0-1
ii  libkf5iconthemes5 5.62.0-1+b1
ii  libkf5kcmutils5   5.62.0-1+b2
ii  libkf5kiocore55.62.1-2+b1
ii  libkf5kiofilewidgets5 5.62.1-2+b1
ii  libkf5kiowidgets5 5.62.1-2+b1
ii  libkf5notifications5  5.62.0-1+b1
ii  libkf5service-bin 5.62.0-1
ii  libkf5service55.62.0-1
ii  libkf5waylandclient5  4:5.62.0-2+b1
ii  libkf5widgetsaddons5  5.62.0-1+b1
ii  libqca-qt5-2  2.2.1-2
ii  libqca-qt5-2-plugins  2.2.1-2
ii  libqt5core5a  5.12.5+dfsg-10
ii  libqt5dbus5   5.12.5+dfsg-10
ii  libqt5gui55.12.5+dfsg-10
ii  libqt5network5