Re: [PATCH] libecasoundc: retry eci_impl_fd_read() even if poll timeout (was: Re: eci_init() fails on MIPS)
Kai Vehmanen <[email protected]> Tue, 4 Feb 2014 21:44:27 +0200 (EET)
| Newsgroups | gmane.comp.audio.ecasound.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Fri, 31 Jan 2014, Alessandro Ghedini wrote: >> You could try run the test program with "ECASOUND_LOGFILE=log.txt > This is the relevant part (when the error occurs): ok great, this is good analysis. > 9068 write(2, "\n(ecasoundc_sa) Error='read() error', cmd='' last_error='' cmd_cnt=1 last_cnt=0.\n", 81) = 81 [...] > So, if I read the trace correctly, it appears that the poll timeout used in > eci_impl_fd_read() expires before ecasound is ready, which in turn makes > eci_impl_read_return_value() fail. Indeed that seems to be the problem. For the initial reads, eci_impl_read_return_value() is called with a short 5sec timeout and that apparently is too short on the MIPS test platform. > So, a possible solution would be to retry the eci_impl_fd_read() even if the > timeout has expired. That part of the code is already run in a loop for, at > most, ECI_MAX_RESYNC_ATTEMPTS times, so there should be no risk in getting stuck > there. That probably fixes it, but as the function is called sometimes with a large timeout (30sec), combined with 9 retries, it'll cause quite long delays to get notified of errors when something goes wrong. Could you try bumping ECI_READ_TIMEOUT_MS to 15000 and see if that helps...? ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Ecasound-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ecasound-list