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

Segfaults on every operation #55

Open
xxxserxxx opened this issue Jan 23, 2021 · 1 comment · May be fixed by #56
Open

Segfaults on every operation #55

xxxserxxx opened this issue Jan 23, 2021 · 1 comment · May be fixed by #56

Comments

@xxxserxxx
Copy link

I installed mconnect yesterday and it worked well, but today core dumps on every communication operation.

Linux: Linux 5.10.7-arch1-1
mconnect: 409.210b435-1 (? from AUR mconnect-git)
Peer: KDE Connect 1.16.0

As I mentioned, yesterday I was able to pair my Android device and send data in both directions. The laptop has been slept and woken since, and since then mconnect segfaults on any attempt to use mconnectctl. For example:

10068» mconnectctl list-devices                                                            ~
Devices:
    /org/mconnect/device/0    0a70a54d6c4d25ca - Pixel 2
10069» mconnectctl -v -d share-url /org/mconnect/device/0 https://www.google.com           ~
** (mconnectctl:1170476): DEBUG: 12:59:22.209: main.vala:120: command is: share-url
** (mconnectctl:1170476): DEBUG: 12:59:22.210: main.vala:128: found match for share-url, args expect: 2, have: 2
** (mconnectctl:1170476): DEBUG: 12:59:22.210: main.vala:138: running callback

** (mconnectctl:1170476): WARNING **: 12:59:22.383: main.vala:272: communication with service failed: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

and in the mconnect:

** (mconnect:1170280): DEBUG: 12:58:28.711: share-proxy.vala:46: share url https://www.google.com
** (mconnect:1170280): DEBUG: 12:58:28.711: share.vala:157: share url https://www.google.com to device 0a70a54d6c4d25ca-Pixel 2-phone-7
** (mconnect:1170280): DEBUG: 12:58:28.711: devicechannel.vala:229: send data: {"type":"kdeconnect.share.request","id":1611428308711,"body":{"url":"https://www.google.com"}}

**
ERROR:../src/mconnect/devicechannel.vala:231:device_channel_send_co: assertion failed: (this._dout != null)
Bail out! ERROR:../src/mconnect/devicechannel.vala:231:device_channel_send_co: assertion failed: (this._dout != null)
[1]    1169559 abort (core dumped)  mconnect

I'm also now unable to see mconnect from the phone, or unpair, or reconnect. mconnectctl says the device is not connected:

10076» mconnectctl show-device /org/mconnect/device/0                                      ~
Device
  Name: Pixel 2
  ID: 0a70a54d6c4d25ca
  Address: 192.168.50.121:1716
  Type: phone
  Allowed: true
  Paired: true
  Active: true
  Connected: false

Is the expected behavior a core dump, even when mconnect thinks it can't see the peer? The IP addresses of both devices haven't changed since yesterday, and I can still run an FTP server on the phone and connect to it from the laptop, so they can see each other. Is there any way to figure out why mconnect isn't seeing or answering the peer -- aside from packet sniffing?

@xxxserxxx
Copy link
Author

I am not certain that this is the only segfault situation, because I don't always have an MPRIS server running and don't think I did when I first encountered this; however, today I can both run mconnect without segfault by ensuring my mpris server is not running, and then cause mconnect to segfault every time if I run it when the mpris server is already running:

** (mconnect:414145): DEBUG: 10:27:08.700: received line: {"id":1612024015940,"type":"kdeconnect.mpris.request","body":{"player":"Squeezebox","requestNowPlaying":true,"requestVolume":true}}
** (mconnect:414145): DEBUG: 10:27:08.700: packet type: kdeconnect.mpris.request
** (mconnect:414145): DEBUG: 10:27:08.700: got packet
** (mconnect:414145): DEBUG: 10:27:08.760: mpris.vala:159: now playing:  - Elgar - Pomp and Circumstance March No. 1
** (mconnect:414145): DEBUG: 10:27:08.761: devicechannel.vala:229: send data: {"type":"kdeconnect.mpris","id":1612024028761,"body":{"player":"Squeezebox","volume":80,"nowPlaying":" - Elgar - Pomp and Circumstance March No. 1","title":"Elgar - Pomp and Circumstance March No. 1","artist":"","album":"The Country House Collection (Splendour and tranquillity)","albumArtUrl":"http://media.home:9000/0","length":363626,"isPlaying":false,"canPause":true,"canPlay":true,"canGoNext":true,"canGoPrevious":true,"canSeek":true,"pos":0}}

(mconnect:414145): GLib-Net-DEBUG: 10:27:08.761: SERVER[0x5645dd7bd1d0]: starting to write 449 bytes to TLS connection
(mconnect:414145): GLib-Net-DEBUG: 10:27:08.761: SERVER[0x5645dd7bd1d0]: claiming operation OP_WRITE
(mconnect:414145): GLib-Net-DEBUG: 10:27:08.761: SERVER[0x5645dd7bd1d0]: claiming operation OP_WRITE succeeded
(mconnect:414145): GLib-Net-DEBUG: 10:27:08.761: SERVER[0x5645dd7bd1d0]: yielding operation OP_WRITE
(mconnect:414145): GLib-Net-DEBUG: 10:27:08.761: SERVER[0x5645dd7bd1d0]: successfully write 449 bytes to TLS connection
** (mconnect:414145): DEBUG: 10:27:13.148: mpris.vala:192: properties changed for mpris player: Squeezebox
[1]    414145 segmentation fault (core dumped)  mconnect --verbose-debug

This does not happen with moc_mpris, but it does happen with slimpris2.

@xxxserxxx xxxserxxx linked a pull request Jan 31, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant