fpo wrote: > No luck yet. > > Let me explain my reasoning: What I saw when I attached the Visual > Studio Debugger to squeezelite and interruped it while in 100% cpu load > was, that its from one thread and this thread sometimes had its priority > elevated slightly, presumably when in kernel code. Such a situation > could possibly derail other threads and trigger unexpected behavior. > 100% cpu load is in essence an extreme stress test for the system and it > fails obviously. We don't realy know whether the cpu load is cause or > effect, but it seems to me of no use to find a solution in a stressed > system we do not control 100%. The fault may well be in the Windows > TCP/IP stack implementation. We would not know. So my priority would be > to get rid of the cpu load, then to look further. > > I assume the source of the cpu load is a tight loop in > > Code: -------------------- > > static void slimproto_run() { > ... > while (running && !new_server) { > .... > if ((ev = wait_readwake(ehandles, 1000)) != EVENT_TIMEOUT) { > .... > } > .... > } -------------------- > > > Inside the *if* section there are two *continue*s that could, when > permanently triggered, make the loop tight. The stream thread is > another thread presumably. It might be just perfect only to get > derailed inside a system call. We don't know yet. > > My proposal would be to find the source of the cpu load, slow the > thread down a bit by inserting a short sleep(), insert some temporary > logging and see what happens. > > Does it make sense to insert a debug log followed by a sleep(1) > immediately before the two continues? You know the code better than me > but it should not be too often one gets a EVENT_READ and then read > nothing.
'squeezelite-1.9.8-1324-test4-win64.zip' (https://www.dropbox.com/s/zw96827qrilim58/squeezelite-1.9.8-1324-test4-win64.zip?dl=1) adds a short delay before both of the continue statements in slimproto.c. Ralphy *1*-Touch, *5*-Classics, *3*-Booms, *1*-UE Radio 'Squeezebox client builds' (https://sourceforge.net/projects/lmsclients/files/) 'donations' (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=LL5P6365KQEXN&lc=CA&item_name=Squeezebox%20client%20builds¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) always appreciated. ------------------------------------------------------------------------ ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484 View this thread: http://forums.slimdevices.com/showthread.php?t=113554 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins