FS#62892 - [curl] mpd crashes when playing radio stream

Attached to Project: Arch Linux
Opened by Matthias Lisin (matthias.lisin) - Thursday, 13 June 2019, 20:57 GMT
Last edited by Christian Hesse (eworm) - Friday, 21 June 2019, 09:42 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Dave Reisner (falconindy)
Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:
Although the summary sounds like it doesn't belong here; I'm pretty confident that testing/curl 7.65.1-2 is causing this crash.

Took me three days to find the cause but it seems that the patch from the last change ( https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/curl&id=b2eb85880d09c99d5ebf273426c4b29ff96f7eb3 ) make mpd crash when streaming radio.

It crashes very often and is easy to reproduce (for me right now). I'm playing a radio stream through ncmpcpp and mpd suddenly crashes. (also crashes with any other mpd frontend)

Additional info:
* testing/curl 7.65.1-2
* coredump (zstd compressed) and mpd.conf attached

Steps to reproduce:
1. install testing/curl 7.65.1-2
2. install and start mpd
3. play radio stream. For example this one: http://media2.brg.ua:8000/power_h
4. Repeat step 3 a few times, in case it doesn't crash the first time


Backtrace from gdb (as described here: https://www.musicpd.org/doc/html/user.html#mpd-crashes)

#0 0x00007ffff7e0782f in raise () from /usr/lib/libc.so.6
#1 0x00007ffff7df2672 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff7df2548 in __assert_fail_base.cold.0 () from /usr/lib/libc.so.6
#3 0x00007ffff7dffdb6 in __assert_fail () from /usr/lib/libc.so.6
#4 0x0000555555624c3e in SocketMonitor::Schedule(unsigned int) ()
#5 0x0000555555618282 in CurlSocket::SocketFunction(void*, int, int, void*, void*) ()
#6 0x00007ffff717afbc in ?? () from /usr/lib/libcurl.so.4
#7 0x00007ffff717e15f in ?? () from /usr/lib/libcurl.so.4
#8 0x00007ffff717e315 in curl_multi_socket_action () from /usr/lib/libcurl.so.4
#9 0x000055555561c7f6 in CurlGlobal::SocketAction(int, int) ()
#10 0x000055555561cdf5 in CurlRequest::Start() ()
#11 0x000055555559dd92 in BindMethodDetail::BindMethodWrapperGenerator2<BlockingCallMonitor, void (BlockingCallMonitor::*)(), &BlockingCallMonitor::RunDeferred, void>::Invoke(void*) ()
#12 0x000055555562130b in EventLoop::HandleDeferred() ()
#13 0x00005555556213a2 in EventLoop::OnSocketReady(unsigned int) ()
#14 0x00005555556254e8 in EventLoop::Run() ()
#15 0x0000555555644155 in BindMethodDetail::BindMethodWrapperGenerator2<EventThread, void (EventThread::*)(), &EventThread::Run, void>::Invoke(void*) ()
#16 0x00005555556209c4 in Thread::ThreadProc(void*) ()
#17 0x00007ffff45b8a92 in start_thread () from /usr/lib/libpthread.so.0
#18 0x00007ffff7ecacd3 in clone () from /usr/lib/libc.so.6
This task depends upon

Closed by  Christian Hesse (eworm)
Friday, 21 June 2019, 09:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  curl 7.65.1-3
Comment by Matthias Lisin (matthias.lisin) - Friday, 14 June 2019, 07:32 GMT
I see this package still got promoted to core/.
Nobody able to reproduce?
Comment by Dean Wallace (duffydack) - Saturday, 15 June 2019, 08:39 GMT
I too am getting coredumps all the time playing radio streams, after the curl update from core.
Jun 15 09:36:04 spock systemd-coredump[7328]: Process 7249 (mpd) of user 1000 dumped core.

Stack trace of thread 7250:
#0 0x00005606bcf5db26 n/a (mpd)
#1 0x00005606bcf51282 n/a (mpd)
#2 0x00007f7d5016bfbc n/a (libcurl.so.4)
#3 0x00007f7d5016f15f n/a (libcurl.so.4)
#4 0x00007f7d5016f315 curl_multi_socket_action (libcurl.so.4)
#5 0x00005606bcf557f6 n/a (mpd)
#6 0x00005606bcf5de61 n/a (mpd)
#7 0x00005606bcf7d155 n/a (mpd)
#8 0x00005606bcf599c4 n/a (mpd)
#9 0x00007f7d4d5a9a92 start_thread (libpthread.so.0)
#10 0x00007f7d50ebbcd3 __clone (libc.so.6)

Stack trace of thread 7249:
#0 0x00007f7d4d5afbac pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00005606bcf73cba n/a (mpd)
#2 0x00005606bcf740ee n/a (mpd)
#3 0x00005606bcf75a4e n/a (mpd)
#4 0x00005606bcf8a82c n/a (mpd)
#5 0x00005606bcf878b9 n/a (mpd)
#6 0x00005606bcf80fe2 n/a (mpd)
#7 0x00005606bcf63ab4 n/a (mpd)
#8 0x00005606bcf5e4e8 n/a (mpd)
#9 0x00005606bcf8cfff n/a (mpd)
#10 0x00005606bcf8f43f n/a (mpd)
#11 0x00005606bcec8ffb n/a (mpd)
#12 0x00007f7d50de4ce3 __libc_start_main (libc.so.6)
#13 0x00005606bcec90ce n/a (mpd)

Stack trace of thread 7318:
#0 0x00007f7d50eb10d1 __poll (libc.so.6)
#1 0x00007f7d4d823673 n/a (libpulse.so.0)
#2 0x00007f7d4d814990 pa_mainloop_poll (libpulse.so.0)
#3 0x00007f7d4d814fe0 pa_mainloop_iterate (libpulse.so.0)
#4 0x00007f7d4d815091 pa_mainloop_run (libpulse.so.0)
#5 0x00007f7d4d8235ae n/a (libpulse.so.0)
#6 0x00007f7d443249fc n/a (libpulsecommon-12.2.so)
#7 0x00007f7d4d5a9a92 start_thread (libpthread.so.0)
#8 0x00007f7d50ebbcd3 __clone (libc.so.6)

Stack trace of thread 7312:
#0 0x00007f7d4d5afbac pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00005606bcf7febc n/a (mpd)
#2 0x00005606bcf78798 n/a (mpd)
#3 0x00005606bcf599c4 n/a (mpd)
#4 0x00007f7d4d5a9a92 start_thread (libpthread.so.0)
#5 0x00007f7d50ebbcd3 __clone (libc.so.6)

Stack trace of thread 7317:
#0 0x00007f7d4d5afbac pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00005606bcf2dd6e n/a (mpd)
#2 0x00005606bcf599c4 n/a (mpd)
#3 0x00007f7d4d5a9a92 start_thread (libpthread.so.0)
#4 0x00007f7d50ebbcd3 __clone (libc.so.6)

Stack trace of thread 7251:
#0 0x00007f7d50ebc007 epoll_wait (libc.so.6)
#1 0x00005606bcf5e459 n/a (mpd)
#2 0x00005606bcf7d155 n/a (mpd)
#3 0x00005606bcf599c4 n/a (mpd)
#4 0x00007f7d4d5a9a92 start_thread (libpthread.so.0)
#5 0x00007f7d50ebbcd3 __clone (libc.so.6)

Stack trace of thread 7313:
#0 0x00007f7d4d5afbac pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00005606bcf83ec7 n/a (mpd)
#2 0x00005606bcf8450d n/a (mpd)
#3 0x00005606bcf599c4 n/a (mpd)
#4 0x00007f7d4d5a9a92 start_thread (libpthread.so.0)
#5 0x00007f7d50ebbcd3 __clone (libc.so.6)
Jun 15 09:36:04 spock systemd[1]: systemd-coredump@3-7327-0.service: Succeeded.
Comment by H.Lekin (lekin) - Saturday, 15 June 2019, 17:42 GMT
I am too getting frequent mpd crashes (signal=SEGV) when playing radio streams since the install of curl 7.65.1-2.
Comment by Dave Reisner (falconindy) - Sunday, 16 June 2019, 13:42 GMT
Can you try this package? It includes an additional patch from upstream:

pacman -U https://pkgbuild.com/~dreisner/packages/curl-7.65.1-3-x86_64.pkg.tar.xz
Comment by Matthias Lisin (matthias.lisin) - Sunday, 16 June 2019, 13:53 GMT
Tried -3, it still crashes after playing a radio a second time after mpd starts up.
It seems to work for the first radio stream, but definitely crashes once you open another.
Comment by Dave Reisner (falconindy) - Sunday, 16 June 2019, 13:59 GMT
Ok, one more try. I've overwritten the package with a new one. You should probably remove the old -3 package and signature from your cache before reinstalling.

If that doesn't work, could you try building curl-git from the AUR?
Comment by Matthias Lisin (matthias.lisin) - Sunday, 16 June 2019, 14:18 GMT
This seems to work. No more crashes.
Comment by Dave Reisner (falconindy) - Sunday, 16 June 2019, 14:20 GMT
Thanks. Pushed this into testing.
Comment by Matthias Lisin (matthias.lisin) - Thursday, 20 June 2019, 06:58 GMT
I've used it since testing and didn't encounter any new issues.
Feel free to promote to core repo.

Loading...