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

Starting mpd-mpris segfaults mpd since mpd/0.22.10 #27

Closed
tsweet64 opened this issue Aug 10, 2021 · 9 comments
Closed

Starting mpd-mpris segfaults mpd since mpd/0.22.10 #27

tsweet64 opened this issue Aug 10, 2021 · 9 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@tsweet64
Copy link

This is on Arch with mpd version 0.22.10 and mpd-mpris 0.3.1. When mpd-mpris is started, both mpd and mpd-mpris crash. mpd-mpris outputs the following:

2021/08/09 21:02:35 local mpd socket found. using that!
2021/08/09 21:02:36 EOF
2021/08/09 21:02:36 mpd-mpris running
panic: connection to mpd is severed: write unix @->/run/user/1000/mpd/socket: write: broken pipe

goroutine 34 [running]:
github.com/natsukagami/mpd-mpris.(*Instance).transformErr(0xc0000a6930, 0x660f80, 0xc00000f8a8, 0x0)
        /home/tim/.cache/paru/clone/mpd-mpris/src/mpd-mpris-0.3.1/errors.go:17 +0x2d9
github.com/natsukagami/mpd-mpris.(*Status).Update(0xc000140008, 0xc000140000, 0x0)
        /home/tim/.cache/paru/clone/mpd-mpris/src/mpd-mpris-0.3.1/player.go:107 +0xc5f
github.com/natsukagami/mpd-mpris.(*Player).createStatus.func1(0xc000140000)
        /home/tim/.cache/paru/clone/mpd-mpris/src/mpd-mpris-0.3.1/player.go:268 +0xc5
created by github.com/natsukagami/mpd-mpris.(*Player).createStatus
        /home/tim/.cache/paru/clone/mpd-mpris/src/mpd-mpris-0.3.1/player.go:264 +0x3f0

And the following occurs with mpd:

Aug 09 20:55:16 ArchDesktop audit[50993]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 pid=50993 comm="mpd" exe="/usr/bin/mpd" sig=11 res=1
Aug 09 20:55:16 ArchDesktop kernel: mpd[50993]: segfault at 0 ip 000055960248c0b8 sp 00007ffd175f9a10 error 4 in mpd[55960246d000+ec000]
Aug 09 20:55:16 ArchDesktop kernel: Code: 8b 3c 24 48 8b 58 20 ff 15 2d 92 13 00 48 8b 14 24 4c 89 ff 48 89 c6 ff d3 48 89 04 24 48 85 c0 74 1a 48 8b 58 10 0f 1f 40 00 <80> 3b 2e 74 73 49 8b 07 48 8b 34 24 4c 8>
Aug 09 20:55:16 ArchDesktop kernel: audit: type=1701 audit(1628560516.898:458): auid=1000 uid=1000 gid=1000 ses=3 pid=50993 comm="mpd" exe="/usr/bin/mpd" sig=11 res=1
Aug 09 20:55:16 ArchDesktop audit: BPF prog-id=79 op=LOAD
Aug 09 20:55:16 ArchDesktop audit: BPF prog-id=80 op=LOAD
Aug 09 20:55:16 ArchDesktop kernel: audit: type=1334 audit(1628560516.919:459): prog-id=79 op=LOAD
Aug 09 20:55:16 ArchDesktop kernel: audit: type=1334 audit(1628560516.919:460): prog-id=80 op=LOAD
Aug 09 20:55:16 ArchDesktop kernel: audit: type=1334 audit(1628560516.920:461): prog-id=81 op=LOAD
Aug 09 20:55:16 ArchDesktop audit: BPF prog-id=81 op=LOAD
Aug 09 20:55:16 ArchDesktop systemd[1]: Started Process Core Dump (PID 80825/UID 0).
Aug 09 20:55:16 ArchDesktop kernel: audit: type=1130 audit(1628560516.920:462): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@13-80825-0 comm="systemd" exe="/usr/lib/systemd/systemd" hos>
Aug 09 20:55:16 ArchDesktop audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@13-80825-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? re>
Aug 09 20:55:17 ArchDesktop systemd-coredump[80826]: [🡕] Process 50993 (mpd) of user 1000 dumped core.
                                                     
                                                     Found module linux-vdso.so.1 with build-id: 44f28c9939040f40a3cfe3a646670c2ab66f3891
                                                     
[big long list of modules, let me know if it is needed]

                                                     Stack trace of thread 50993:
                                                     #0  0x000055960248c0b8 n/a (mpd + 0x4b0b8)
                                                     #1  0x000055960248ad2e n/a (mpd + 0x49d2e)
                                                     #2  0x0000559602496852 n/a (mpd + 0x55852)
                                                     #3  0x00005596024c1019 n/a (mpd + 0x80019)
                                                     #4  0x00005596024c1275 n/a (mpd + 0x80275)
                                                     #5  0x00005596024c2191 n/a (mpd + 0x81191)
                                                     #6  0x00005596024910c3 n/a (mpd + 0x500c3)
                                                     #7  0x0000559602492240 n/a (mpd + 0x51240)
                                                     #8  0x0000559602487f4c n/a (mpd + 0x46f4c)
                                                     #9  0x00007f50632d9b25 __libc_start_main (libc.so.6 + 0x27b25)
                                                     #10 0x000055960248823e n/a (mpd + 0x4723e)
                                                     
                                                     Stack trace of thread 50995:
                                                     #0  0x00007f50633b092e epoll_wait (libc.so.6 + 0xfe92e)
                                                     #1  0x00005596024c20ed n/a (mpd + 0x810ed)
                                                     #2  0x00005596024bd684 n/a (mpd + 0x7c684)
                                                     #3  0x00007f5063487259 start_thread (libpthread.so.0 + 0x9259)
                                                     #4  0x00007f50633b05e3 __clone (libc.so.6 + 0xfe5e3)
                                                     
                                                     Stack trace of thread 50996:
                                                     #0  0x00007f50634938ca __futex_abstimed_wait_common64 (libpthread.so.0 + 0x158ca)
                                                     #1  0x00007f506348d270 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf270)
                                                     #2  0x00007f50636ccf01 __gthread_cond_wait (libstdc++.so.6 + 0xccf01)
                                                     #3  0x00005596024a62b2 n/a (mpd + 0x652b2)
                                                     #4  0x00005596024bd684 n/a (mpd + 0x7c684)
                                                     #5  0x00007f5063487259 start_thread (libpthread.so.0 + 0x9259)
                                                     #6  0x00007f50633b05e3 __clone (libc.so.6 + 0xfe5e3)
                                                     
                                                     Stack trace of thread 50997:
                                                     #0  0x00007f50634938ca __futex_abstimed_wait_common64 (libpthread.so.0 + 0x158ca)
                                                     #1  0x00007f506348d270 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf270)
                                                     #2  0x00007f50636ccf01 __gthread_cond_wait (libstdc++.so.6 + 0xccf01)
                                                     #3  0x0000559602494d4d n/a (mpd + 0x53d4d)
                                                     #4  0x000055960249e218 n/a (mpd + 0x5d218)
                                                     #5  0x0000559602510c6e n/a (mpd + 0xcfc6e)
                                                     #6  0x0000559602493ba2 n/a (mpd + 0x52ba2)
                                                     #7  0x000055960249d108 n/a (mpd + 0x5c108)
                                                     #8  0x000055960249da5b n/a (mpd + 0x5ca5b)
                                                     #9  0x00005596024bd684 n/a (mpd + 0x7c684)
                                                     #10 0x00007f5063487259 start_thread (libpthread.so.0 + 0x9259)
                                                     #11 0x00007f50633b05e3 __clone (libc.so.6 + 0xfe5e3)
                                                     
                                                     Stack trace of thread 51002:
                                                     #0  0x00007f50633a5b2f __poll (libc.so.6 + 0xf3b2f)
                                                     #1  0x00007f50657f4ae4 n/a (libpulse.so.0 + 0x33ae4)
                                                     #2  0x00007f50657de4b9 pa_mainloop_poll (libpulse.so.0 + 0x1d4b9)
                                                     #3  0x00007f50657e8709 pa_mainloop_iterate (libpulse.so.0 + 0x27709)
...skipping...
                                                     #8  0x000055960249da5b n/a (mpd + 0x5ca5b)
                                                     #9  0x00005596024bd684 n/a (mpd + 0x7c684)
                                                     #10 0x00007f5063487259 start_thread (libpthread.so.0 + 0x9259)
                                                     #11 0x00007f50633b05e3 __clone (libc.so.6 + 0xfe5e3)
                                                     
                                                     Stack trace of thread 51002:
                                                     #0  0x00007f50633a5b2f __poll (libc.so.6 + 0xf3b2f)
                                                     #1  0x00007f50657f4ae4 n/a (libpulse.so.0 + 0x33ae4)
                                                     #2  0x00007f50657de4b9 pa_mainloop_poll (libpulse.so.0 + 0x1d4b9)
                                                     #3  0x00007f50657e8709 pa_mainloop_iterate (libpulse.so.0 + 0x27709)
                                                     #4  0x00007f50657e87c1 pa_mainloop_run (libpulse.so.0 + 0x277c1)
                                                     #5  0x00007f50657f8c9e n/a (libpulse.so.0 + 0x37c9e)
                                                     #6  0x00007f50545a7403 n/a (libpulsecommon-15.0.so + 0x5c403)
                                                     #7  0x00007f5063487259 start_thread (libpthread.so.0 + 0x9259)
                                                     #8  0x00007f50633b05e3 __clone (libc.so.6 + 0xfe5e3)
                                                     
                                                     Stack trace of thread 55772:
                                                     #0  0x00007f50634938ca __futex_abstimed_wait_common64 (libpthread.so.0 + 0x158ca)
                                                     #1  0x00007f506348d270 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf270)
                                                     #2  0x00007f50636ccf01 __gthread_cond_wait (libstdc++.so.6 + 0xccf01)
                                                     #3  0x00005596024edbaf n/a (mpd + 0xacbaf)
                                                     #4  0x00005596024bd684 n/a (mpd + 0x7c684)
                                                     #5  0x00007f5063487259 start_thread (libpthread.so.0 + 0x9259)
                                                     #6  0x00007f50633b05e3 __clone (libc.so.6 + 0xfe5e3)
                                                     
                                                     Stack trace of thread 51001:
                                                     #0  0x00007f50634938ca __futex_abstimed_wait_common64 (libpthread.so.0 + 0x158ca)
                                                     #1  0x00007f506348d842 pthread_cond_clockwait (libpthread.so.0 + 0xf842)
                                                     #2  0x00005596024ed3b3 n/a (mpd + 0xac3b3)
                                                     #3  0x00005596024ed89e n/a (mpd + 0xac89e)
                                                     #4  0x00005596024bd684 n/a (mpd + 0x7c684)
                                                     #5  0x00007f5063487259 start_thread (libpthread.so.0 + 0x9259)
                                                     #6  0x00007f50633b05e3 __clone (libc.so.6 + 0xfe5e3)
                                                     
                                                     Stack trace of thread 50998:
                                                     #0  0x0000000000000000 n/a (n/a + 0x0)
                                                     #1  0x00007ffd00000005 n/a (n/a + 0x0)
Aug 09 20:55:17 ArchDesktop systemd[1]: systemd-coredump@13-80825-0.service: Deactivated successfully.

Any ideas what could be causing this and how to fix it? Thanks for this project btw!

@natsukagami
Copy link
Owner

I currently don't have a Linux box available to me at the moment (will do in a month); but I think this happened once before with an older version of mpd

@samhh
Copy link

samhh commented Aug 11, 2021

For the avoidance of doubt I can confirm that I'm seeing the same on Arch with the same versions.

@natsukagami natsukagami added bug Something isn't working help wanted Extra attention is needed labels Aug 12, 2021
@tsweet64
Copy link
Author

It might be related to MusicPlayerDaemon/MPD#1224 / MusicPlayerDaemon/MPD#1225

@natsukagami
Copy link
Owner

natsukagami commented Aug 16, 2021 via email

@Ram-Z
Copy link

Ram-Z commented Aug 16, 2021

I can't speak for mpd-mpris, but I was seeing this issue when my own crudely written mpd client tried to access mpd and requested albumart. If mpd-mpris is attempting to get albumart, it might be running into the same issue.

If you're on Arch, you may try this PKGBUILD of mpd with the patch applied. mpd-0.22.10-2.src.tar.gz

@natsukagami
Copy link
Owner

If mpd-mpris is attempting to get albumart, it might be running into the same issue.

As of v0.3.0 mpd-mpris does use albumart to attempt to pull the album art for display.

@natsukagami
Copy link
Owner

If someone can confirm that mpd and mpd-mpris doesn't crash with the patch applied, I can happily close the issue :)

@samhh
Copy link

samhh commented Aug 16, 2021

The patch via @Ram-Z's PKGBUILD has fixed the issue for me 🎊

@natsukagami
Copy link
Owner

Great! Closing the issue then. Future readers, please checkout MusicPlayerDaemon/MPD#1225, MusicPlayerDaemon/MPD#1227 and @Ram-Z's patch above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants