[ck] Re: Threading issues? [[email protected]: ck Digest, Vol 3, Issue 16]

Con Kolivas kernel at kolivas.org
Thu Sep 2 09:56:14 CDT 2004


Mike Hearn wrote:
>> I wouldn't trust it. An app just misbehaving can trash important parts 
>> of your filesystem. Suid root is just a bad idea, windows being linux 
>> aware or not. Just for mild amusement I think someone being funky got 
>> a windows virus to work under wine if I recall correctly.
> 
> 
> Sure. Don't have to be funky - I've got Bagel from an infected Windows 
> drive before just by running a program I had installed there.
> 
> rm ~/.wine -rf cleaned it up. I dunno if it was actually able to relay 
> spam, or whatever it was designed to do, but it launched itself from an 
> infected binary OK, dumped a copy of itself in c:\windows\system and 
> then sat in the background. Thing is, it wouldn't have done anything 
> different if I was running as root.
> 
> Anyway, interesting as this is, if we can't or shouldn't renice apps to 
> a higher priority then we're back at square one. 

Yeah I don't think renicing negative is helpful here.

Are there any
> recommended ways of debugging scheduling problems Con, any tools we can 
> use, or is it all down to guesswork and printf() timings?

If it's nonblocking and normal scheduling ordering that's the issue 
(which I believe it is) then the most surprisingly useful tool is 'top'. 
You'll get the best results from running top in batch mode (-b) and with 
a reasonably fast interval (say .5s) and at higher priority as root (say 
-10).

  try this as root:
nice --10 top -b -d .5 > toplog

Assuming you are reproducing problems (and not everyone is mind you) get 
the output of that during jittery sound or video or whatever. The task 
that is the lowest value of PRI is always going first in that list, and 
only the running tasks will show. If the noise in that log is too great 
due to lots of processes try using the -p pid1,pid2,pid3 option to show 
just the pids you're interested in. It was easy for us to diagnose a 
non-blocking call in mplayer previously that was causing pathetic 
performance on some video cards due to a non-blocking X call 
(Xflush<->Xsync in xv.c or something like that). Some other application 
(blender if I recall correctly) had a 15ms timeout with select() and X 
was never getting to complete it's work in that time and would cause 
serious jitter and stalling under heavy video workloads.

Cheers,
Con
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20040903/4888d237/signature.pgp


More information about the wine-devel mailing list