#141: "Too Many Open Files" liquidsoap does not release the mp3 it has played?
------------------------+---------------------------------------------------
Reporter: ~ok| | Owner: admin
Type: Bugs | Status: new
Priority: 2 | Milestone:
Component: Liquidsoap | Version: 0.3.6+svn
Keywords: | Mac: 0
Other: 1 | Freebsd: 0
Linux: 0 |
------------------------+---------------------------------------------------
I don't really know whether it's related to liquidsoap but liquidsoap
appears to die because of the lack of new files to open.
I've compiled 0.36SVN under a NetBSD 2.1 with the following features:
{{{
ocaml-shout
ocaml-mad
ocaml-taglib
ocaml-lame
ocaml-ogg
ocaml-vorbis
ocaml-ladspa
ocaml-samplerate
ocaml-xmlplaylist
ocaml-lastfm
ocaml-dtools
ocaml-duppy
liquidsoap
}}}
I use radiopilote (SVN) to feed liquidsoap with tracks using a radio.liq
identical to the one proposed by RadioPi.
After a few hours, liquidsoap doesn't receive no new tracks from
radiopilote using this function:
{{{
def request () =
log("Request for #{name}")
req_str = scripts ^ "radiopilote-getnext " ^ quote(radiopilote_conf) ^
" " ^ quote(name);
log(req_str)
req_output = get_process_output(req_str)
log(req_output)
request.create(audio=true,
# get_process_output(scripts ^ "radiopilote-getnext " ^
quote(radiopilote_conf) ^ " " ^ quote(name)) )
req_output)
end
}}}
the relevant logs are:
{{{
...
2008/05/15 20:43:00 [command server:4] There are 1 ready tasks.
2008/05/15 20:43:00 [command server:4] Enter select at 1210884180.594293,
timeout -1.000000 (2/0/0).
2008/05/15 20:43:00 [event queue 1:4] There are 1 ready tasks.
2008/05/15 20:43:00 [lang:3] Request for Main
2008/05/15 20:43:00 [single:2] Couldn't get an audio request! Make sure
you did not override audio=false in request.create().
2008/05/15 20:43:00 [threads:1] thread "event queue 1" aborts with
exception Unix.Unix_error(15, "pipe", "") !
Thread 2 killed on uncaught exception Unix.Unix_error(15, "pipe", "")
2008/05/15 20:43:00 [event queue 2:4] There are 0 ready tasks.
2008/05/15 20:43:00 [event queue 3:4] There are 0 ready tasks.
2008/05/15 20:43:00 [main:3] Shutdown started!
2008/05/15 20:43:00 [root:2] Root shutdown
2008/05/15 20:43:00 [source:4] stream gets down
2008/05/15 20:43:00 [source:4] src_3229 gets down
2008/05/15 20:43:00 [threads:3] thread "root" exited (4 remaining)
2008/05/15 16:33:54 [liqfm:3] Lastfm Submission failed:
Lastfm.Http("Unix.Unix_error(15, \"pipe\", \"\")")
2008/05/15 20:43:02 [event queue 4:4] There are 0 ready tasks.
2008/05/15 20:43:02 [command server:4] Left select at 1210884182.952700
(1/0/0).
2008/05/15 20:43:02 [command server:4] There are 0 ready tasks.
2008/05/15 20:43:02 [command server:4] Enter select at 1210884182.952809,
timeout -1.000000 (3/0/0).
2008/05/15 20:43:03 [main:3] Cleaning downloaded files...
2008/05/15 20:43:03 >>> LOG END
}}}
Looking on the side of radiopilote I've noticed that the radiopilote-
getnext PHP script couldn't be executed when this error appears (thus no
being able to provide new tracks to liquidsoap):
{{{
May 16 20:37:51 uk01 php: PHP Warning:
main(/home/demo01/radio/html/includes/sql/dataoperations.class.php):
failed to open stream: Too many open files in
/home/demo01/radio/radiopilote/scripts/radiopilote-getnext on line 52
May 16 20:37:51 uk01 php: PHP Warning: main(): Failed opening
'/home/demo01/radio/html/includes/sql/dataoperations.class.php' for
inclusion (include_path='.:/usr/pkg/lib/php') in
/home/demo01/radio/radiopilote/scripts/radiopilote-getnext on line 52
May 16 20:37:51 uk01 php: PHP Warning:
main(/home/demo01/radio/html/includes/utils/ruleutils.class.php): failed
to open stream: Too many open files in
/home/demo01/radio/radiopilote/scripts/radiopilote-getnext on line 53
May 16 20:37:51 uk01 php: PHP Warning: main(): Failed opening
'/home/demo01/radio/html/includes/utils/ruleutils.class.php' for inclusion
(include_path='.:/usr/pkg/lib/php') in
/home/demo01/radio/radiopilote/scripts/radiopilote-getnext on line 53
May 16 20:37:51 uk01 php: PHP Fatal error: Cannot instantiate non-
existent class: dataoperations in /home/demo01/radio/radiopilote/scripts
/radiopilote-getnext on line 67
}}}
Using lsof I've tried to trace the sources of this increase of open files
and I've noticed that liquidsoap doesn't release the tracks he played:
{{{
liquidsoa 14651 liquidso cwd VDIR 0,6 512 903893
/usr/pkgsrc/sysutils/lsof
liquidsoa 14651 liquidso txt VREG 0,9 2936201 7900355
/home/demo01/radio/liquidsoap/bin/liquidsoap
liquidsoa 14651 liquidso txt VREG 0,0 55808 302529
/libexec/ld.elf_so
liquidsoa 14651 liquidso txt VREG 0,6 21685 747608
/usr/pkg/lib/libtag_c.so.0.0.0
liquidsoa 14651 liquidso txt VREG 0,6 119120 747648
/usr/pkg/lib/libsamplerate.so.0.1.1
liquidsoa 14651 liquidso txt VREG 0,6 297168 745263
/usr/pkg/lib/libmp3lame.so.0.0.0
liquidsoa 14651 liquidso txt VREG 0,0 10219 323416
/lib/libm387.so.0.0
liquidsoa 14651 liquidso txt VREG 0,0 115985 323418
/lib/libm.so.0.1.1
liquidsoa 14651 liquidso txt VREG 0,6 91682 745367
/usr/pkg/lib/libmad.so.0.2.1
liquidsoa 14651 liquidso txt VREG 0,6 19870 745221
/usr/pkg/lib/libogg.so.0.5.3
liquidsoa 14651 liquidso txt VREG 0,6 1154854 746566
/usr/pkg/lib/libvorbisenc.so.2.0.3
liquidsoa 14651 liquidso txt VREG 0,6 31783 746555
/usr/pkg/lib/libvorbisfile.so.3.2.0
liquidsoa 14651 liquidso txt VREG 0,6 164546 746545
/usr/pkg/lib/libvorbis.so.0.4.0
liquidsoa 14651 liquidso txt VREG 0,6 82648 11578
/usr/lib/libpthread.so.0.4
liquidsoa 14651 liquidso txt VREG 0,6 65612 745836
/usr/pkg/lib/libshout.so.3.1.0
liquidsoa 14651 liquidso txt VREG 0,6 162118 745234
/usr/pkg/lib/libpcre.so.0.0.1
liquidsoa 14651 liquidso txt VREG 0,0 799780 323394
/lib/libc.so.12.114.1
liquidsoa 14651 liquidso txt VREG 0,6 33043 11527
/usr/lib/libgcc_s.so.1.0
liquidsoa 14651 liquidso txt VREG 0,6 548971 746678
/usr/pkg/lib/libtag.so.1.5.0
liquidsoa 14651 liquidso txt VREG 0,6 565278 11672
/usr/lib/libstdc++.so.5.0
liquidsoa 14651 liquidso txt VREG 0,6 234746 746576
/usr/pkg/lib/libtheora.so.0.3.2
liquidsoa 14651 liquidso txt VREG 0,0 54740 323426
/lib/libz.so.0.4
liquidsoa 14651 liquidso 0r VCHR 2,2 0t0 439787
/dev/null
liquidsoa 14651 liquidso 1u VCHR 5,1 0t5321255 438628
/dev/ttyp1
liquidsoa 14651 liquidso 2u VCHR 5,1 0t5321255 438628
/dev/ttyp1
liquidsoa 14651 liquidso 3r PIPE 0xcd4f7000 16384
->0xcd4f7118
liquidsoa 14651 liquidso 4w PIPE 0xcd4f7118 0
->0xcd4f7000
liquidsoa 14651 liquidso 5r VREG 0,0 500 10761
/etc/hosts
liquidsoa 14651 liquidso 6w VREG 0,8 6327804 115338
/var/log/liquidsoaplog
liquidsoa 14651 liquidso 7u IPv4 0xc2fecc60 0t0 TCP
localhost:1234 (LISTEN)
liquidsoa 14651 liquidso 8r PIPE 0xce3fe3d8 16384
->0xce3fe464
liquidsoa 14651 liquidso 9w PIPE 0xce3fe464 0
->0xce3fe3d8
liquidsoa 14651 liquidso 10r VREG 0,9 24286 7900368
/home/demo01/radio/liquidsoap/var/BACKUP/BACKUP_JINGLE.mp3
liquidsoa 14651 liquidso 11u IPv4 0xc2f56710 0t0 TCP
uk01.intern.local:52427->uk01.intern.local:8000 (ESTABLISHED)
liquidsoa 14651 liquidso 12u IPv4 0xc2f565d4 0t0 TCP
uk01.intern.local:52426->uk01.intern.local:8000 (ESTABLISHED)
liquidsoa 14651 liquidso 13r VREG 0,9 5256299 7900669
/home/demo01/radio/resources/pool/752.mp3
liquidsoa 14651 liquidso 14r PIPE 0xce3fed24 16384
->0xce3fe8c4
liquidsoa 14651 liquidso 15w PIPE 0xce3fe8c4 0
->0xce3fed24
liquidsoa 14651 liquidso 16r VREG 0,9 3895006 7900837
/home/demo01/radio/resources/pool/836.mp3
liquidsoa 14651 liquidso 17r VREG 0,9 4518601 7900421
/home/demo01/radio/resources/pool/703.mp3
liquidsoa 14651 liquidso 18r VREG 0,9 6289494 7900717
/home/demo01/radio/resources/pool/776.mp3
liquidsoa 14651 liquidso 19r VREG 0,9 5051081 7900723
/home/demo01/radio/resources/pool/779.mp3
liquidsoa 14651 liquidso 21r VREG 0,9 7495306 7901079
/home/demo01/radio/resources/pool/957.mp3
liquidsoa 14651 liquidso 22r VREG 0,9 5256299 7900669
/home/demo01/radio/resources/pool/752.mp3
}}}
the number of files from /home/demo01/radio/resources/pool/ used by
liquidsoap keeps on increasing and are never released, and then the
problem appears
the apache processes bound the the radiopilote scripts appears to behave
correctly and release everything they opened.
Is the cause to this problem related to liquidsoap? Is this a bug or a
normal feature of liquidsoap not to release open files?
thanks for your input and help on troubleshooting this problem
--
Ticket URL: <http://savonet.rastageeks.org/ticket/141>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac