Message ID | 4284FE2D.2050702@uklinux.net |
---|---|
State | New |
Headers |
Received: from mail3.uklinux.net ([80.84.72.33]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DWgHP-0005hy-QN for vdr@linuxtv.org; Fri, 13 May 2005 21:57:03 +0200 Received: from [194.247.51.246] (bts-1014.dialup.zetnet.co.uk [194.247.51.246]) by mail3.uklinux.net (Postfix) with ESMTP id EC98C409FBC for <vdr@linuxtv.org>; Fri, 13 May 2005 19:23:22 +0000 (UTC) Message-ID: <4284FE2D.2050702@uklinux.net> Date: Fri, 13 May 2005 20:21:17 +0100 From: Jon Burgess <jburgess@uklinux.net> User-Agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR <vdr@linuxtv.org> Subject: Re: [vdr] VDR+DXR3 - stability problems (possible patch) References: <007801c557bb$356b4310$ab04020a@hmtutak2> <1116009320.14907.83.camel@bobcat.mine.nu> In-Reply-To: <1116009320.14907.83.camel@bobcat.mine.nu> Content-Type: multipart/mixed; boundary="------------090601020603050103080007" X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR <vdr@linuxtv.org> List-Id: Klaus Schmidinger's VDR <vdr.linuxtv.org> List-Unsubscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=unsubscribe> List-Archive: <http://www.linuxtv.org/pipermail/vdr> List-Post: <mailto:vdr@linuxtv.org> List-Help: <mailto:vdr-request@linuxtv.org?subject=help> List-Subscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=subscribe> X-List-Received-Date: Fri, 13 May 2005 19:57:03 -0000 Status: O X-Status: X-Keywords: X-UID: 2179 |
Commit Message
Jon Burgess
May 13, 2005, 7:21 p.m. UTC
Ville Skyttä wrote: > On Fri, 2005-05-13 at 14:56 +0200, Mikolaj Tutak wrote: > > >>But the only solution is to stop VDR (sometimes it requires kill -9) and >>load it again. Dou you know any solution/workaround for this? Maybe other >>combination of DXR3 plugin/driver versions? > > > http://sf.net/mailarchive/forum.php?thread_id=7212515&forum_id=7173 > > Someone reported on em8300-devel that removing pthread_setschedparam() > calls from both VDR and the DXR3 plugin helped with similar problems in > his setup. > Removing the pthread_setschedparam() helps to prevent a complete lockup in my setup. Unfortunately the soft lockups which require the "kill -9" still occur. The patch attached seems to help, but hasn't had much testing. The patch attached also seems to help the plugin recover more gracefully when it gets some bad data. It still needs some more work because sometimes the stream still needs to be manually stopped and restarted to resume playback (but at least it does stop instead, rather than locking up vdr). I think the problem that this patch helps address is that the dvbplayer thread gets stuck waiting for the flush to finish and the main VDR thread cancels it. Unfortunately the thread sometimes holds a lock on the dxr3syncbuffer and this stops the video output thread. With the patch applied, the flush returns and thread exits before the 3 second thread cancel timeout. Jon
Comments
Jon Burgess napisa?(a): > > Removing the pthread_setschedparam() helps to prevent a complete > lockup in my setup. Unfortunately the soft lockups which require the > "kill -9" still occur. The patch attached seems to help, but hasn't > had much testing. As in mine, removing pthread_setschedparam() helps a little but not completly. > The patch attached also seems to help the plugin recover more > gracefully when it gets some bad data. It still needs some more work > because sometimes the stream still needs to be manually stopped and > restarted to resume playback (but at least it does stop instead, > rather than locking up vdr). This sounds better than manual vdr restart. > I think the problem that this patch helps address is that the > dvbplayer thread gets stuck waiting for the flush to finish and the > main VDR thread cancels it. Unfortunately the thread sometimes holds a > lock on the dxr3syncbuffer and this stops the video output thread. > With the patch applied, the flush returns and thread exits before the > 3 second thread cancel timeout. Now I'm tesing your patch, after while I return some feedback :-)
Hi, I've noticed that dxr3 cvs has become more unstable than so time ago (about that time when yellow OSD garbage in e.g. STTNG skin was fixed in dxr3 plugin) so I gave this a try. Jon Burgess wrote: > > The patch attached also seems to help the plugin recover more > gracefully when it gets some bad data. It still needs some more work > because sometimes the stream still needs to be manually stopped and > restarted to resume playback (but at least it does stop instead, > rather than locking up vdr). > > I think the problem that this patch helps address is that the > dvbplayer thread gets stuck waiting for the flush to finish and the > main VDR thread cancels it. Unfortunately the thread sometimes holds a > lock on the dxr3syncbuffer and this stops the video output thread. > With the patch applied, the flush returns and thread exits before the > 3 second thread cancel timeout. I think have seen these lockups when switching to non-active satellite channales or to satellite channels with corrupted data (there are many on Hotbird). Now the watchdog doesn't kill VDR as often and it is possible to manage interactively satellite channel list. This patch is an improvement to current plugin state. However the problem where OSD graphics start to jump and flicker for a while and VDR gets stuck for quite long time is still present. It happens repeatably also in mp3 plugin or muggle plugin usage where playback of a song gets interrupted every now and then for a couple of seconds which is pretty annoying. Mp3 plugin worked better due to more stable OSD with the earlier dxr3 plugin version I mentioned. Have other dxr3 users seen this? This is a bit off-topic, not related to this patch: I also tried to activate mp3 background image display but that seems to fail. According to logs my cover.jpg's get converted to mpg format but nothing is shown. Playback doesn't start without pressing jump keys. Seppo > > Jon
Seppo Ingalsuo wrote: > Hi, Hi ! > > I've noticed that dxr3 cvs has become more unstable than so time ago > (about that time when yellow OSD garbage in e.g. STTNG skin was fixed in > dxr3 plugin) so I gave this a try. > I think have seen these lockups when switching to non-active satellite > channales or to satellite channels with corrupted data (there are many > on Hotbird). Now the watchdog doesn't kill VDR as often and it is > possible to manage interactively satellite channel list. This patch is > an improvement to current plugin state. > The plugin still cannot manage broken datastreams gracefully. This is surely the case here. > However the problem where OSD graphics start to jump and flicker for a > while and VDR gets stuck for quite long time is still present. It > happens repeatably also in mp3 plugin or muggle plugin usage where > playback of a song gets interrupted every now and then for a couple of > seconds which is pretty annoying. Mp3 plugin worked better due to more > stable OSD with the earlier dxr3 plugin version I mentioned. Have other > dxr3 users seen this? > Sure. But concerning the OSD going beserk, you can try playing around with the value DEFINES+=-DFLUSHRATE=40 in the Makefile. I might help a little. But this is still an open issue. > This is a bit off-topic, not related to this patch: I also tried to > activate mp3 background image display but that seems to fail. According > to logs my cover.jpg's get converted to mpg format but nothing is shown. > Playback doesn't start without pressing jump keys. > AFAIR there's a stillpicture generated, which is not supported and should make the plugin crash.
Martin Cap wrote: > Sure. But concerning the OSD going beserk, you can try playing around > with the value > DEFINES+=-DFLUSHRATE=40 in the Makefile. I might help a little. But this is > still an open issue. This only helps if vdr is refreshing the osd too often (like when displaying the channel info with the sttng skin), in all other normal cases it does nothing. I think we're simply asking the dxr3 too much. Bye
Luca Olivetti wrote: > Martin Cap wrote: > >> Sure. But concerning the OSD going beserk, you can try playing around >> with the value >> DEFINES+=-DFLUSHRATE=40 in the Makefile. I might help a little. But >> this is >> still an open issue. > > > This only helps if vdr is refreshing the osd too often (like when > displaying the channel info with the sttng skin), in all other normal > cases it does nothing. I think we're simply asking the dxr3 too much. > > Bye > > Hi, hm, it used to help me... Beserking OSD is still there, but less.
Seppo Ingalsuo napisa?(a): > > I think have seen these lockups when switching to non-active satellite > channales or to satellite channels with corrupted data (there are many > on Hotbird). Now the watchdog doesn't kill VDR as often and it is > possible to manage interactively satellite channel list. This patch is > an improvement to current plugin state. OK, I when I unconnect Sat plug (no valid sat data) DXR3 plugin hangs very often during OSD display. Probably problem is displaying OSD without valid primary picture stream. Maybe sending "no signal" screen every second between valid data streems is a solution?! > However the problem where OSD graphics start to jump and flicker for a > while and VDR gets stuck for quite long time is still present. It > happens repeatably also in mp3 plugin or muggle plugin usage where > playback of a song gets interrupted every now and then for a couple of > seconds which is pretty annoying. Mp3 plugin worked better due to more > stable OSD with the earlier dxr3 plugin version I mentioned. Have > other dxr3 users seen this? Yes, I have this. Menu shows mixed trashes (swaped lines etc.) and VDR hangs for long time. Maybe I take snapshot some time. > This is a bit off-topic, not related to this patch: I also tried to > activate mp3 background image display but that seems to fail. > According to logs my cover.jpg's get converted to mpg format but > nothing is shown. Playback doesn't start without pressing jump keys. Yes, I have the same issue - no background with mp3 plugin :-( I try vdr DXR3 plugin and Xine-VDR+fbxine -V dxr3, and with booth options there is issue "fifo full". Yesterday I changed microcode (em8300.uc) shipped with linux driver (version 0x29) to newest one (version 0x2e) and the playback seems far more stable - I have no hangs up till now during playback. But I have random lockups during displaying "black screen" (no valid tv stream) with visible OSD - short after VDR starts.
Mikolaj Tutak wrote: > I try vdr DXR3 plugin and Xine-VDR+fbxine -V dxr3, and with booth > options there is issue "fifo full". Yesterday I changed microcode > (em8300.uc) shipped with linux driver (version 0x29) to newest one > (version 0x2e) and the playback seems far more stable - I have no hangs Where did you get it? Bye
Luca Olivetti napisa?(a): >> I try vdr DXR3 plugin and Xine-VDR+fbxine -V dxr3, and with booth >> options there is issue "fifo full". Yesterday I changed microcode >> (em8300.uc) shipped with linux driver (version 0x29) to newest one >> (version 0x2e) and the playback seems far more stable - I have no hangs > > > Where did you get it? Sorry I mistyped version. I have 0x2d from newest Sigma Designs drivers, please try attached file. And small question, when extracting microcodes from original driver I get 3 different files. 1st and 3rd works good and have the same version id, 2nd does not load. Anyone knows difference between 1st and 3rd, and with one is better?
Mikolaj Tutak wrote: > > OK, I when I unconnect Sat plug (no valid sat data) DXR3 plugin hangs > very often during OSD display. Probably problem is displaying OSD > without valid primary picture stream. Maybe sending "no signal" screen > every second between valid data streems is a solution?! Vdr-xine does this. I was wondering this too when trying to play with mp3 plugin background image feature. I tried yesterday to adjust FLUSHRATE to higher value (60ms) as suggested by Jon and Ville but it didn't work better than default 40 ms with berserking OSD. I'll try soon the new microcode and Ville's HW SPU decoder patch as well. BR, Seppo
Seppo Ingalsuo wrote: > I tried yesterday to adjust FLUSHRATE to higher value (60ms) as > suggested by Jon and Ville but it didn't work better than default 40 ms > with berserking OSD. I'll try soon the new microcode and Ville's HW SPU > decoder patch as well. That patch doesn't do anything to address the stability problem[*]. I just think we're asking too much to the poor spu unit of the dxr3 and there's not much that can be done about it :-( (maybe the new microcode but I cannot tell yet). [*] a dvd uses "subpictures" for the menus and subtitles. A dvd player normally has a hardware (or firmware) subpicture unit (spu) to decode and show subpictures. A full featured dvb card doesn't have one, but it has an osd unit, so vdr decodes subpictures in software to show them through the osd. OTOH a dxr3 doesn't have an osd unit but it has an spu that the plugin (ab)uses to provide an osd. So, with a dxr3 this is the processing that goes on for dvd subpictures: dvd subpicture -> software decoder -> osd -> spu encoder -> dxr3 spu which is rather silly. What the patch does is transform that into: dvd subpicture -> dxr3 spu Bye
Mikolaj Tutak wrote: > Luca Olivetti napisa?(a): > >> >> Where did you get it? > > > Sorry I mistyped version. I have 0x2d from newest Sigma Designs drivers, > please try attached file. > Hu, that's interesting. Surely something to try out soon :). Thanks....
Luca Olivetti wrote: > Seppo Ingalsuo wrote: > >> I tried yesterday to adjust FLUSHRATE to higher value (60ms) as >> suggested by Jon and Ville but it didn't work better than default 40 >> ms with berserking OSD. I'll try soon the new microcode and Ville's >> HW SPU decoder patch as well. > > > That patch doesn't do anything to address the stability problem[*]. Yes, I noticed that. With new microcode and Ville's patch the behavior in mp3 plugin usage is even worse now. There were a couple of OSD crashes during one minute time mp3 playback when progress bar was visible. In normal tv/recording viewing crazy going osd is fortunately rare. Seppo
Seppo Ingalsuo wrote: > > Yes, I noticed that. With new microcode and Ville's patch the behavior > in mp3 plugin usage is even worse now. Hi, Hm, I don't think this is related to this one new microcode. Most probably the latter case... If you set the FLUSHRATE to 0ms again you surely have the same behavior as without the patch...
--- dxr3/dxr3syncbuffer.c.~1.1.2.8.~ 2005-04-19 19:19:38.000000000 +0100 +++ dxr3/dxr3syncbuffer.c 2005-05-13 00:28:34.000000000 +0100 @@ -26,6 +26,7 @@ */ #include <unistd.h> +#include <sys/time.h> #include "dxr3syncbuffer.h" #include "dxr3memcpy.h" @@ -182,7 +183,9 @@ { bool retVal = true; uint32_t currTime = m_dxr3Device.GetSysClock(); + struct timeval tv_start, tv; m_bPollSync = true; + gettimeofday(&tv_start, NULL); if (m_demuxMode == DXR3_DEMUX_REPLAY_MODE) { if (Available() >= Size() - (Size()*BUFFER_LIMIT/100)) @@ -192,10 +195,20 @@ ((m_dxr3Device.GetSysClock() - currTime) < ((uint32_t)TimeoutMs * (uint32_t)45))) { + int d_s, d_us, ms; m_bPutBlock = true; EnableGet(); m_bWaitPts = false; WaitForPut(); + gettimeofday(&tv, NULL); + d_s = tv.tv_sec - tv_start.tv_sec; + d_us = tv.tv_usec - tv_start.tv_usec; + ms = d_s * 1000 + d_us / 1000; + if (ms > TimeoutMs * 2) { + cLog::Instance() << "Secondary timeout\n"; + printf("Secondary timeout\n"); + break; + } } if (Available() >= Size() - (Size()*BUFFER_LIMIT_2)/100) { @@ -211,6 +224,8 @@ cFixedLengthFrame* cDxr3SyncBuffer::Push(const uint8_t* pStart, int length, uint32_t pts, eFrameType type) throw (eSyncBufferException) { int lastIndex = 0; + struct timeval tv_start, tv; + gettimeofday(&tv_start, NULL); switch (m_demuxMode) { @@ -223,10 +238,20 @@ while ((Available() >= Size() - (Size()*10)/100)) { + int d_s, d_us, ms; m_bPutBlock = true; EnableGet(); m_bWaitPts = false; WaitForPut(); + gettimeofday(&tv, NULL); + d_s = tv.tv_sec - tv_start.tv_sec; + d_us = tv.tv_usec - tv_start.tv_usec; + ms = d_s * 1000 + d_us / 1000; + if (ms > 2000) { + cLog::Instance() << "Push timeout\n"; + printf("Push timeout\n"); + break; + } } #if VDRVERSNUM < 10313