#265: Failure when fetching a file with wget
------------------------+---------------------------------------------------
 Reporter:  toots       |       Owner:  admin      
     Type:  Bugs        |      Status:  new        
 Priority:  8           |   Milestone:  NEAR FUTURE
Component:  Liquidsoap  |     Version:  0.9.0+svn  
 Keywords:              |         Mac:  1          
    Linux:  1           |      Netbsd:  1          
    Other:  1           |     Freebsd:  1          
------------------------+---------------------------------------------------
 I recently discovered strange issues running a recent liquidsoap SVN:
 {{{
 2009/04/11 14:03:32 [protocols.external:4] Executing /usr/bin/wget
 "ftp://pool:radi...@stream/8940.mp3"; "/tmp/liq7d4afe.osb"
 2009/04/11 14:03:32 [threads:1] Thread "fast queue #2" aborts with
 exception Unix.Unix_error(3, "close", "")!
 2009/04/11 14:03:32 [main:3] Shutdown started!
 2009/04/11 14:03:32 [main:3] Waiting for threads to terminate...
 Thread 10 killed on uncaught exception Unix.Unix_error(3, "close", "")
 Raised at file "protocols/extproto.ml", line 44, characters 4-17
 Called from file "request.ml", line 613, characters 29-73
 Called from file "request.ml", line 631, characters 12-27
 Called from file "sources/request_source.ml", line 281, characters 22-49
 Called from file "sources/request_source.ml", line 257, characters 14-27
 Called from file "sources/request_source.ml", line 190, characters 45-63
 Re-raised at file "tools/tutils.ml", line 145, characters 21-22
 Called from file "thread.ml", line 38, characters 8-14
 }}}

 Here is an extract of the corresponding code:
 {{{
   dlog#f 4 "Executing %s %S %S" program s local ;
   let timeout = max 0. (maxtime -. Unix.gettimeofday ()) in
     Unix.close iR ;
     Unix.close xW ;
     if Unix.select [xR] [] [] timeout = ([],[],[]) then
       Unix.kill pid 9 ;
     let (p,code) = Unix.waitpid [] pid in
       assert (p <> 0) ;
       dlog#f 4 "Download process finished (%s)"
         (match code with
         | Unix.WSIGNALED _ -> "killed"
         | Unix.WEXITED 0 -> "ok"
         | _ -> "error") ;
       Unix.close iW ;
       Unix.close xR ;
       if code = Unix.WEXITED 0 then
         [Request.indicator ~temporary:true local]
       else begin
         log "Download failed: timeout, invalid URI ?" ;
         ( try Unix.unlink local with _ -> () ) ;
         []
       end
 }}}

 So, the error is clearly identified: the external fetching failed.

 Now, I am wondering why I have this error now since this part of the code
 was not changed recently, I believe.

 I also wonder what we should do, catch the exception ?

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/265>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac

Reply via email to