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

SIGSEGV #635

Closed
M0Rf30 opened this issue Sep 24, 2018 · 5 comments
Closed

SIGSEGV #635

M0Rf30 opened this issue Sep 24, 2018 · 5 comments
Assignees

Comments

@M0Rf30
Copy link

M0Rf30 commented Sep 24, 2018

OS:
Arch Linux update to today
Liquidsoap: 1.3.4
this is the liq file

#!/usr/bin/liquidsoap
# Log dir
set("log.file.path","/tmp/basic-radio.log")

# Music
myplaylist = playlist(mode="random",timeout=40., "/home/radio/gmusic/gmusic-unsplitted.m3u")
# Some jingles
jingles = playlist("/home/radio/jingles/jingles.m3u")

# If the stream fails, we'll just play nothing...
security = blank(id="blank", duration=1.)
security = mksafe(security) # This is assured to be safe!

# Start building the feed with music
radio = myplaylist
# Now add some jingles
radio = random(weights = [1, 3],[jingles, radio])
# And finally the security
radio = fallback(track_sensitive = false, [radio, security])

# Stream it out
output.icecast(
  %fdkaac(channels=2, samplerate=44100, bitrate=96),
  host = "localhost", port = 8000,
  password = "password", mount = "/stream", radio)

and this is the gdb output:

Starting program: /usr/bin/liquidsoap /home/morfeo/zeroradio/assets/radio.liq -v
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
2018/09/24 12:28:49 >>> LOG START
[New Thread 0x7fffe2053700 (LWP 25969)]
[New Thread 0x7fffe1852700 (LWP 25970)]
[New Thread 0x7fffe1051700 (LWP 25971)]
[New Thread 0x7fffe0850700 (LWP 25972)]
[New Thread 0x7fffe004f700 (LWP 25973)]
[New Thread 0x7fffdf84e700 (LWP 25974)]
[New Thread 0x7fffdf04d700 (LWP 25975)]
[New Thread 0x7fffde84c700 (LWP 25976)]
2018/09/24 12:28:49 [main:3] Liquidsoap 1.3.4
2018/09/24 12:28:49 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=7.3.4 dtools=0.4.1 duppy=0.7.3 duppy.syntax=0.7.3 cry=0.6.2 mm=0.4.0 xmlplaylist=0.1.4 lastfm=0.3.2 ogg=0.5.2 vorbis=0.7.1 opus=0.1.2 speex=0.2.1 mad=0.4.5 flac=0.1.3 flac.ogg=0.1.3 dynlink=[distributed with Ocaml] lame=0.3.3 shine=0.2.1 gstreamer=0.3.0 fdkaac=0.2.1 theora=0.3.1 gavl=0.1.6 ffmpeg=0.2.0 bjack=0.1.5 alsa=0.2.3 ao=0.2.1 samplerate=0.1.4 taglib=0.3.4 ssl=0.5.6 magic=0.7.3 camomile=[unspecified] inotify=2.3 yojson=1.4.1 faad=0.4.0 soundtouch=0.1.8 pulseaudio=0.1.3 ladspa=0.1.5 dssi=0.1.2 sdl=0.9.1 lo=0.1.1 gd=1.0a5
2018/09/24 12:28:49 [gstreamer.loader:3] Loaded GStreamer 1.14.3 0
2018/09/24 12:28:49 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2018/09/24 12:28:49 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2018/09/24 12:28:49 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2018/09/24 12:28:49 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2018/09/24 12:28:49 [threads:3] Created thread "gstreamer_main_loop" (1 total).
2018/09/24 12:28:49 [threads:3] Created thread "generic queue #1".
2018/09/24 12:28:49 [threads:3] Created thread "generic queue #2".
2018/09/24 12:28:49 [threads:3] Created thread "non-blocking queue #1".
2018/09/24 12:28:49 [threads:3] Created thread "non-blocking queue #2".
2018/09/24 12:28:49 [jingles(dot)m3u:3] Loading playlist...
2018/09/24 12:28:49 [jingles(dot)m3u:3] No mime type specified, trying autodetection.
2018/09/24 12:28:49 [jingles(dot)m3u:3] Playlist treated as format application/x-mpegURL
2018/09/24 12:28:49 [jingles(dot)m3u:3] Successfully loaded a playlist of 32 tracks.
2018/09/24 12:28:49 [a(dot)m3u:3] Loading playlist...
2018/09/24 12:28:49 [a(dot)m3u:3] No mime type specified, trying autodetection.
2018/09/24 12:28:49 [a(dot)m3u:3] Playlist treated as format application/x-mpegURL
2018/09/24 12:28:49 [a(dot)m3u:3] Successfully loaded a playlist of 200 tracks.
2018/09/24 12:28:50 [/stream:3] Connecting mount /stream for source@localhost...
2018/09/24 12:28:50 [decoder:3] Method "FFMPEG" accepted "/home/morfeo/zeroradio/assets/jingles/saluti/saluto-nunzio.flac".
[New Thread 0x7fffddff2700 (LWP 25980)]
2018/09/24 12:28:50 [/stream:3] Connection setup was successful.
2018/09/24 12:28:50 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2018/09/24 12:28:50 [threads:3] Created thread "wallclock_main" (2 total).
2018/09/24 12:28:50 [fallback_8080:3] Switch to mksafe.
2018/09/24 12:28:50 [mksafe:3] Switch to blank.
2018/09/24 12:28:50 [jingles(dot)m3u:3] Prepared "/home/morfeo/zeroradio/assets/jingles/saluti/saluto-nunzio.flac" (RID 2).
2018/09/24 12:28:50 [fallback_8080:3] Switch to random_8078 with transition.
2018/09/24 12:28:50 [random_8078:3] Switch to jingles(dot)m3u.
2018/09/24 12:28:50 [decoder:3] Method "FFMPEG" accepted "/home/morfeo/zeroradio/assets/jingles/saluti/saluto-nick.flac".
[Detaching after fork from child process 25983]
2018/09/24 12:28:57 [jingles(dot)m3u:3] Finished with "/home/morfeo/zeroradio/assets/jingles/saluti/saluto-nunzio.flac".
2018/09/24 12:28:58 [jingles(dot)m3u:3] Prepared "/home/morfeo/zeroradio/assets/jingles/saluti/saluto-nick.flac" (RID 4).

Thread 8 "liquidsoap" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdf04d700 (LWP 25975)]
0x0000555555c2962d in caml_c_call ()

thanks for any suggestion. I'll remain available for any debugging purpose

@toots
Copy link
Member

toots commented Sep 24, 2018

Thanks for the report. Would mind sending the full backtrace? You can get it by doing:

thread apply all bt

@M0Rf30
Copy link
Author

M0Rf30 commented Sep 25, 2018

after the previous command i've run the one that you suggest

Thread 10 (Thread 0x7fffddff2700 (LWP 5278)):
#0  0x00007ffff5f2b850 in nanosleep () at /usr/lib/libpthread.so.0
#1  0x0000555555c0966d in unix_sleep ()
#2  0x0000555555a373c4 in camlClock__usleep_702259 ()
#3  0x0000555555a37920 in camlClock__loop_702568 ()
#4  0x0000555555a3512d in camlClock__fun_1003514 ()
#5  0x0000555555a5e602 in camlTutils__fun_1002761 ()
#6  0x0000555555b4f139 in camlThread__fun_2005 ()
#7  0x0000555555c296ac in caml_start_program ()
#8  0x0000555555c04040 in  ()
#9  0x00007ffff5f21a9d in start_thread () at /usr/lib/libpthread.so.0
#10 0x00007ffff195aa43 in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7fffde84c700 (LWP 5274)):
#0  0x00007ffff5f27afc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x0000555555c04dc4 in caml_condition_wait ()
#2  0x0000555555a5f6aa in camlTutils__fun_1002905 ()
#3  0x0000555555a5de3c in camlTutils__mutexify_1007 ()
#4  0x0000555555b3ee59 in camlDtools__thread_402530 ()
#5  0x0000555555b4f139 in camlThread__fun_2005 ()
#6  0x0000555555c296ac in caml_start_program ()
#7  0x0000555555c04040 in  ()
#8  0x00007ffff5f21a9d in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007ffff195aa43 in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7fffdf04d700 (LWP 5273)):
#0  0x00007ffff5f27afc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#1  0x0000555555c04dc4 in caml_condition_wait ()
#2  0x0000555555b35445 in camlDuppy__run_201580 ()
#3  0x0000555555b35615 in camlDuppy__f_301586 ()
#4  0x0000555555b35626 in camlDuppy__f_301586 ()
#5  0x0000555555b35626 in camlDuppy__f_301586 ()
#6  0x0000555555b35626 in camlDuppy__f_301586 ()
#7  0x0000555555b35626 in camlDuppy__f_301586 ()
#8  0x0000555555b35626 in camlDuppy__f_301586 ()
#9  0x0000555555a5ebaf in camlTutils__queue_302341 ()
#10 0x0000555555a5e602 in camlTutils__fun_1002761 ()
#11 0x0000555555b4f139 in camlThread__fun_2005 ()
#12 0x0000555555c296ac in caml_start_program ()
#13 0x0000555555c04040 in  ()
#14 0x00007ffff5f21a9d in start_thread () at /usr/lib/libpthread.so.0
#15 0x00007ffff195aa43 in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7fffdf84e700 (LWP 5272)):
#0  0x0000555555c2962d in caml_c_call ()
#1  0x0000000000000000 in  ()

Thread 6 (Thread 0x7fffe004f700 (LWP 5271)):
#0  0x00007ffff5f27afc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x0000555555c04dc4 in caml_condition_wait ()
#2  0x0000555555b35445 in camlDuppy__run_201580 ()
#3  0x0000555555b35615 in camlDuppy__f_301586 ()
#4  0x0000555555b35626 in camlDuppy__f_301586 ()
#5  0x0000555555b35626 in camlDuppy__f_301586 ()
#6  0x0000555555a5ebf2 in camlTutils__queue_302341 ()
--Type <RET> for more, q to quit, c to continue without paging--
#7  0x0000555555a5e602 in camlTutils__fun_1002761 ()
#8  0x0000555555b4f139 in camlThread__fun_2005 ()
#9  0x0000555555c296ac in caml_start_program ()
#10 0x0000555555c04040 in  ()
#11 0x00007ffff5f21a9d in start_thread () at /usr/lib/libpthread.so.0
#12 0x00007ffff195aa43 in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7fffe0850700 (LWP 5270)):
#0  0x00007ffff19523af in select () at /usr/lib/libc.so.6
#1  0x0000555555c08c59 in unix_select ()
#2  0x0000555555a5f956 in camlTutils__wait_702402 ()
#3  0x000055555592a52d in camlLang_builtins__fun_706806 ()
#4  0x0000555555a5dead in camlTutils__finalize_1018 ()
#5  0x0000555555929cc4 in camlLang_builtins__fun_706710 ()
#6  0x0000555555a26692 in camlLang_values__apply_1102702 ()
#7  0x0000555555a25c08 in camlLang_values__eval_1102701 ()
#8  0x0000555555a26692 in camlLang_values__apply_1102702 ()
#9  0x0000555555a26692 in camlLang_values__apply_1102702 ()
#10 0x0000555555a5dead in camlTutils__finalize_1018 ()
#11 0x0000555555a26692 in camlLang_values__apply_1102702 ()
#12 0x0000555555a26692 in camlLang_values__apply_1102702 ()
#13 0x0000555555a5dead in camlTutils__finalize_1018 ()
#14 0x0000555555925293 in camlLang_builtins__fun_706225 ()
#15 0x0000555555a431ce in camlRequest__resolve_step_202897 ()
#16 0x0000555555a42f47 in camlRequest__resolve_202893 ()
#17 0x00005555559f661d in camlRequest_source__fun_603288 ()
#18 0x00005555559f69ff in camlRequest_source__fun_603275 ()
#19 0x0000555555b3591c in camlDuppy__task_402234 ()
--Type <RET> for more, q to quit, c to continue without paging--
#20 0x0000555555b342cc in camlDuppy__fun_803625 ()
#21 0x0000555555b34f61 in camlDuppy__exec_201554 ()
#22 0x0000555555b352d3 in camlDuppy__run_201580 ()
#23 0x0000555555b35615 in camlDuppy__f_301586 ()
#24 0x0000555555b35626 in camlDuppy__f_301586 ()
#25 0x0000555555b35626 in camlDuppy__f_301586 ()
#26 0x0000555555b35626 in camlDuppy__f_301586 ()
#27 0x0000555555b35626 in camlDuppy__f_301586 ()
#28 0x0000555555b35626 in camlDuppy__f_301586 ()
#29 0x0000555555a5ebf2 in camlTutils__queue_302341 ()
#30 0x0000555555a5e602 in camlTutils__fun_1002761 ()
#31 0x0000555555b4f139 in camlThread__fun_2005 ()
#32 0x0000555555c296ac in caml_start_program ()
#33 0x0000555555c04040 in  ()
#34 0x00007ffff5f21a9d in start_thread () at /usr/lib/libpthread.so.0
#35 0x00007ffff195aa43 in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7fffe1051700 (LWP 5269)):
#0  0x00007ffff194fbb1 in poll () at /usr/lib/libc.so.6
#1  0x00007ffff32ffee0 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff3300f62 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x0000555555bda253 in ocaml_gstreamer_loop_run ()
#4  0x0000555555a46b74 in camlGstreamer_utils__main_101720 ()
#5  0x0000555555a5e602 in camlTutils__fun_1002761 ()
#6  0x0000555555b4f139 in camlThread__fun_2005 ()
#7  0x0000555555c296ac in caml_start_program ()
#8  0x0000555555c04040 in  ()
#9  0x00007ffff5f21a9d in start_thread () at /usr/lib/libpthread.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#10 0x00007ffff195aa43 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7fffe1852700 (LWP 5268)):
#0  0x00007ffff19523af in select () at /usr/lib/libc.so.6
#1  0x0000555555c03ba9 in  ()
#2  0x00007ffff5f21a9d in start_thread () at /usr/lib/libpthread.so.0
#3  0x00007ffff195aa43 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffe2053700 (LWP 5267)):
#0  0x00007ffff5f27afc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x0000555555c04dc4 in caml_condition_wait ()
#2  0x0000555555b3feb2 in camlDtools__fun_1503973 ()
#3  0x0000555555b3fcbc in camlDtools__mutexify_702897 ()
#4  0x0000555555b3fe43 in camlDtools__f_802917 ()
#5  0x0000555555b4f139 in camlThread__fun_2005 ()
#6  0x0000555555c296ac in caml_start_program ()
#7  0x0000555555c04040 in  ()
#8  0x00007ffff5f21a9d in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007ffff195aa43 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7fffe5010ac0 (LWP 5263)):
#0  0x00007ffff1897b4c in sigtimedwait () at /usr/lib/libc.so.6
#1  0x00007ffff5f2bf4d in sigwait () at /usr/lib/libpthread.so.0
#2  0x0000555555c0443a in caml_wait_signal ()
#3  0x0000555555b3eb20 in camlDtools__wait_signal_302274 ()
#4  0x0000555555b3ec66 in camlDtools__main_402525 ()
#5  0x0000555555b3ef68 in camlDtools__catch_402537 ()
#6  0x000055555591aff9 in camlMain__Make_302198 ()
--Type <RET> for more, q to quit, c to continue without paging--
#7  0x0000555555918610 in camlRunner__entry ()
#8  0x00005555559101f9 in caml_program ()
#9  0x0000555555c296ac in caml_start_program ()
#10 0x0000555555c0c255 in caml_startup_common ()
#11 0x0000555555c0c29b in caml_startup ()
#12 0x000055555590e6bc in main ()

@toots
Copy link
Member

toots commented Nov 10, 2018

Hi. Any chance you could try with the latest ocaml-duppy code? Via opam, you can do:

git clone --recursive https://github.com/savonet/ocaml-duppy.git
cd ocaml-duppy
opam pin add .

@M0Rf30
Copy link
Author

M0Rf30 commented Nov 11, 2018

Yes. It seems fixed. Thank you so much. Now the SIGSEGV disappeared, but show this message

2018/11/11 15:34:55 [/stream:3] Will try again in 3.00 sec.
2018/11/11 15:34:59 [/stream:3] Connecting mount /stream for source@localhost...
2018/11/11 15:34:59 [/stream:2] Connection failed: could not connect to host: Connection refused in connect()
strange error flushing buffer ... 
strange error flushing buffer ...

and it happens when it doesn't find icecast turned on

@toots
Copy link
Member

toots commented Nov 11, 2018

Not sure about the icecast issue, you might want to double check your install/config.

Glad to hear the bug is fixed. Hopefully that's also the case with the one from @gilou.

@toots toots closed this as completed Nov 11, 2018
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

No branches or pull requests

2 participants