[FFmpeg-user] Zeranoe Windows builds spiking CPU to 100% randomly

Andy Sheen sheen.andy at googlemail.com
Tue Jul 10 22:18:41 CEST 2012



Roger Pack wrote on Tue 10 Jul at 20:30 UK time
>> Built (and thank goodness for that script!). I can reproduce the spikes.
>> When the spikes are there, the system is spemding 60+% of it's time in
>> the kernel.
> 
> Where in the kernel?

I'm not 100% as I've not used windbg much, but as fas as I can tell, the
stack trace (taken from a dump when it is in this state) is:

0:000> ~* kp

.  0  Id: 2208.1864 Suspend: 0 Teb: 000007ff`fffde000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0022e008 000007fe`fda11203 ntdll!ZwDelayExecution+0xa
00000000`0022e010 00000000`00c69204 KERNELBASE!SleepEx+0xab
00000000`0022e0b0 00000000`00c65418 ffmpeg+0x869204
00000000`0022e110 00000000`00c655df ffmpeg+0x865418
00000000`0022e150 00000000`00c673a3 ffmpeg+0x8655df
00000000`0022e190 00000000`00c67d09 ffmpeg+0x8673a3
00000000`0022e1d0 00000000`00c65f80 ffmpeg+0x867d09
00000000`0022e200 00000000`00c662be ffmpeg+0x865f80
00000000`0022e270 00000000`00c666fc ffmpeg+0x8662be
00000000`0022e2f0 00000000`00819632 ffmpeg+0x8666fc
00000000`0022e3a0 00000000`006111e5 ffmpeg+0x419632
00000000`0022e430 00000000`00612cd7 ffmpeg+0x2111e5
00000000`0022e680 00000000`00526d73 ffmpeg+0x212cd7
00000000`0022e700 00000000`00406693 ffmpeg+0x126d73
00000000`0022e750 00000000`00c6ad77 ffmpeg+0x6693
00000000`0022e8a0 00000000`004013c9 ffmpeg+0x86ad77
00000000`0022fe70 00000000`004014e8 ffmpeg+0x13c9
00000000`0022ff30 00000000`76e9652d ffmpeg+0x14e8
00000000`0022ff60 00000000`7727c521 kernel32!BaseThreadInitThunk+0xd
00000000`0022ff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

This repeats 16 times.

If you can tell me how to compile with debug on, I'll see if I can get
the symbols.

> Do you see this on linux as well as windows then?
> 

I suppose compiling direct on linux is easy now I've done the cross
compile ;) No, I don't see it on a linux git clone from this evening
compiled in exactly the same way (same configure options etc...)

>> threads: default to automatic thread count detection
> 
> If you try it with -threads 1 is the problem present?

-threads  problem
   0        yes
   1         no
   2        yes
   3        yes
   4        yes
   5        yes
   6        yes
   7        yes
   8        yes
   9        yes

Of interest, you can't CTRL-C the program when it is in this state, it
will only respond when it drops back out of the state.

HTH...


More information about the ffmpeg-user mailing list