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

1.3.1 crashes after harbor.kick #453

Closed
Jontyy opened this issue Jun 1, 2017 · 5 comments
Closed

1.3.1 crashes after harbor.kick #453

Jontyy opened this issue Jun 1, 2017 · 5 comments
Assignees

Comments

@Jontyy
Copy link

Jontyy commented Jun 1, 2017

Hi,

Currently having some issues with 1.3.1 (and 1.3.0).
When a harbor.input source is live and running sending harbor_input.kick over the socket API causes a panic.

2017/06/01 10:51:22 >>> LOG START
2017/06/01 10:51:21 [main:3] Liquidsoap 1.3.1
2017/06/01 10:51:21 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=7.2.3 dtools=0.3.3 duppy=0.6.0 duppy.syntax=0.6.0 mm=0.3.0 mad=0.4.5 dynlink=[distributed with Ocaml] lame=0.3.3 camomile=0.8.5
2017/06/01 10:51:21 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2017/06/01 10:51:22 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2017/06/01 10:51:22 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2017/06/01 10:51:22 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2017/06/01 10:51:22 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2017/06/01 10:51:22 [threads:3] Created thread "generic queue #1".
2017/06/01 10:51:22 [threads:3] Created thread "generic queue #2".
2017/06/01 10:51:22 [threads:3] Created thread "non-blocking queue #1".
2017/06/01 10:51:22 [threads:3] Created thread "non-blocking queue #2".
2017/06/01 10:51:22 [harbor:3] Adding mountpoint '/' on port 9999
2017/06/01 10:51:22 [threads:3] Created thread "wallclock_main" (1 total).
2017/06/01 10:51:22 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2017/06/01 10:51:22 [mksafe:3] Switch to safe_blank.
2017/06/01 10:51:30 [server:3] New client unix socket "".
2017/06/01 10:51:36 [decoder:3] Method "MAD" accepted "audio/mpeg".
2017/06/01 10:51:36 [threads:3] Created thread "harbor source feeding" (2 total).
2017/06/01 10:51:36 [harbor_input:3] Decoding...
2017/06/01 10:51:36 [harbor_input:3] New metadata chunk ? -- 20170227-1700-TestDJ.
2017/06/01 10:51:41 [mksafe:3] Switch to audio_to_stereo_5465 with transition.
2017/06/01 10:51:46 [threads:2] Queue generic queue #1 crashed with exception Bad file descriptor in select()
Raised by primitive operation at file "duppy.ml", line 181, characters 20-51
Re-raised at file "duppy.ml", line 199, characters 11-18
Called from file "duppy.ml", line 201, characters 4-8
Called from file "duppy.ml", line 295, characters 12-25
Called from file "tools/tutils.ml", line 213, characters 19-55

2017/06/01 10:51:46 [threads:1] PANIC: Liquidsoap has crashed, exiting.,
Please report at: savonet-users@lists.sf.net

Minimum working example:

set("server.socket",true)
set("server.socket.path","/tmp/test.sock")
set("log.file",false)
set("log.stdout", true)
set("log.level",3)

input = audio_to_stereo(input.harbor(
  "/",
  id="harbor_input",
  port=9999,
  auth=fun(u, p) -> true,
  logfile="/tmp/test.log",
  buffer=5.0,max=10.0,
  icy=true
))

input = mksafe(input)

output.dummy(input)

Running this on debian 8.8 with ocaml 4.04.1 with the following packages:

# Installed packages for 4.04.1:
base-bigarray      base  Bigarray library distributed with the OCaml compiler
base-bytes         base  Bytes library distributed with the OCaml compiler
base-threads       base  Threads library distributed with the OCaml compiler
base-unix          base  Unix library distributed with the OCaml compiler
camlp4           4.04+1  Camlp4 is a system for writing extensible parsers for programming languages
camomile          0.8.5  A comprehensive Unicode library
conf-libpcre          1  Virtual package relying on a libpcre system installation.
conf-m4               1  Virtual package relying on m4
conf-pkg-config     1.0  Virtual package relying on pkg-config installation.
cppo              1.5.0  Equivalent of the C preprocessor for OCaml programs
dtools            0.3.3  Library providing various helper functions to make daemons
duppy             0.6.0  Library providing monadic threads
lame              0.3.3  Bindings for the lame library which provides functions for encoding mp3 files
liquidsoap        1.3.1  Swiss-army knife for multimedia streaming
mad               0.4.5  Bindings for the mad library which provides functions for encoding wave audio files into mp3
mm                0.3.0  The mm library contains high-level to create and manipulate multimedia streams (audio, video, MIDI)
ocamlbuild       0.11.0  OCamlbuild is a build system with builtin rules to easily build most OCaml projects.
ocamlfind         1.7.2  A library manager for OCaml
pcre              7.2.3  pcre-ocaml - bindings to the Perl Compatibility Regular Expressions library
@toots toots self-assigned this Jun 1, 2017
@toots
Copy link
Member

toots commented Jun 1, 2017

Thanks for this report. I'll look at it asap.

@toots toots closed this as completed in d85568a Jun 3, 2017
@toots
Copy link
Member

toots commented Jun 3, 2017

Hi,

This should be fixed in the latest master. Any chance you could test it out?

@toots
Copy link
Member

toots commented Jun 3, 2017

Also, I realized that kick and stop are the exact same command. I've removed kick and kept stop.

@Jontyy
Copy link
Author

Jontyy commented Jun 5, 2017

@toots this has done the trick, cheers 👍

@toots
Copy link
Member

toots commented Jun 5, 2017

Sweet! I'll plan a release in a month or so to see if other issues arise. This one doesn't seem too urgent to get out the door.

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