karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
298 stars 106 forks source link

Crash when using url stream_auth #291

Closed topalex closed 4 years ago

topalex commented 4 years ago

Hello.

I'm trying to setup stream_auth via url and it's working. But after the stream has been started and second metadata request comes in, icecast server crashes with SIGABRT. First metadata request processed without problems but if I send a new metadata request, it stucks for about a minute and then icecast crashes. Without stream_auth everything is ok.

Icecast built from git master

Icecast 2.4.0-kh13-21-gf224c1f

Info from coredump

Program terminated with signal SIGABRT, Aborted.

0 0x0000000006a98067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) where

0 0x0000000006a98067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

1 0x0000000006a99448 in __GI_abort () at abort.c:89

2 0x0000000000427188 in worker (arg=0xa713720) at client.c:704

3 0x000000000044ba19 in _start_routine (arg=0xa713840) at thread.c:725

4 0x000000000684e064 in start_thread (arg=0xb35b700) at pthread_create.c:309

5 0x0000000006b4b62d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

I can attach error.log with debug level or full coredump if needed.

karlheyes commented 4 years ago

I presume you don't have any special settings for this. I don't see any info on the metadata request passed. The actual abort test is down to something that should not happen. I suppose the key info missing is the metadata, the worker count and the debug log lines at the time of metadata request trips this up.

karl

topalex commented 4 years ago

I've attached error.log from start to crash. Streaming client was ezstream and there was only one song repeated two times in the playlist, so metadata content still the same. And icesast crashed when song started playing second time and ezstream tried to send metadata request. Also I've attached icecast.xml.txt config file used in this run. If I remove this line <option name="stream_auth" value="http://localhost/authStreamAuth"/> from <authentication type="url"> block, everything goes ok without a crash. Url in stream_auth is returning just header 'Icecast-Auth-User: 1'.

karlheyes commented 4 years ago

ok, this is one that has been around for a while. crash corruption possible but the abort check notices something odd and shouts about it before continuing down a possibly long and confusing path if it doesn't fail immediatly. Yes is only occurs with auth threading (so stream auth) and admin updates.

fix is not a biggie but is now pushed to master

karl

topalex commented 4 years ago

Yes, it's working now Thanks!