Fwd: game "Knights and Merchants" deadlocks

Joris Huizer jorishuizer at planet.nl
Wed Feb 8 14:41:47 CST 2006


Andreas Mohr wrote:
> Hi,
> 
> On Sat, Feb 04, 2006 at 01:47:42PM +0100, James Trotter wrote:
> 
>>On 2/4/06, Joris Huizer <jorishuizer at planet.nl> wrote:
>>
>>>I have this question: I have a game called "Knights and Merchants" which
>>>  I sometimes play; I find it deadlocks each time after playing for an
>>>hour or so
>>>it seems it isn't a complete deadlock, sometimes some of sound comes
>>>through between intervals of minutes or so; harddisk activity seems
>>>extreme - the light is burning constantly.
>>>I then usually decide to kill the program; as it opens fullscreen I
>>>can't get to the xterm that launched it, so I try to get to a console;
>>>The system is so slow that it takes some time to get to a console
>>><ctrl-alt-f1>, and login in may time out a few times before finaly
>>>getting in (the cure to that one is simple: login before starting the
>>>game...) - then it takes another minute or so to run ps and kill the
>>>wine process
> 
> 
>>This really sounds like a memory leak to me. Usually I'd use valgrind (
>>http://valgrind.org/) to find memory leaks and such. Valgrind 3.1.0 works
>>with wine, but it produces alot of output you'd have to look through and the
>>program will run insanely slow. It might be worth a try.
> 
> 
> I'd bet this isn't a "deadlock". Instead, your program is consuming massive
> amounts of memory that your system cannot cope with, thus quickly running
> into swap and tearing the whole system performance down due to excessive
> swap activity.
> No deadlock at all, simply massive overload.
> 
> A normal memory leak sounds less plausible to me, too.
> 
> May I suggest that this is caused by a memory "allocation" of a pointer variable
> instead of a memory size variable?
> Pointers (memory addresses) usually are in the 0x40XXXXXX or 0x08XXXXXX range,
> so if you take those values as amount of memory to allocate...
> 
> IOW, perhaps there is a function parameter count mismatch in .spec files or
> some other random stack trashing that leads to such high memory allocation
> due to accessing the wrong variable.
> 
> You should probably try a
> ulimit -S -m 128000000
> , that will most likely kill the process then when everything goes haywire,
> thus supporting my theory at least halfway.
> 
> Andreas Mohr
> 
> 
> 

indeed the program got killed... at least it's a memory problem
(maybe it was not the best situation, but I was logged in at a console 
and some output on running out of memory was written there)
I don't really know what to look for, but as far as I see there isn't 
much interesting in the log, just a few fixme's that are repeated lots 
of times, and then these critical section timeouts:

err:ntdll:RtlpWaitForCriticalSection section 0x40a01560 "gdiobj.c: 
GDI_level" wait timed out in thread 0009, blocked by 0000, retrying (60 sec)
....
err:ntdll:RtlpWaitForCriticalSection section 0x4110f380 "x11drv_main.c: 
X11DRV_CritSection" wait timed out in thread 0009, blocked by 000d, 
retrying (60 sec)
...
err:ntdll:RtlpWaitForCriticalSection section 0x40a01560 "gdiobj.c: 
GDI_level" wait timed out in thread 0009, blocked by 000d, retrying (60 sec)

There also a lot of error lines on dsound:
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
3, block size = 2
with varying len values

I put the complete log online at home.planet.nl/~huize784/kam.log.bz2 as 
I think it's too much to send as attachment (compressed, it is 107KB)

regards,

Joris

end of the log (hopefully the relevant part) :


fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x5b09842c,0x571bf94c,0x5b098408): stub
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
221, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
3, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
221, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
3, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
331, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
309, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
3, block size = 2
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x596bea7c,0x48629a7c,0x596bea58): stub
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x5b0a0624,0x564301d4,0x5b0a0600): stub
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
441, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
3, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
441, block size = 2
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
3, block size = 2
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x5b0a0624,0x47dfcb2c,0x5b0a0600): stub
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
251, block size = 2
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
err:ntdll:RtlpWaitForCriticalSection section 0x40a01560 "gdiobj.c: 
GDI_level" wait timed out in thread 0009, blocked by 0000, retrying (60 sec)
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x596bea7c,0x47d28d0c,0x596bea58): stub
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
err:ntdll:RtlpWaitForCriticalSection section 0x4110f380 "x11drv_main.c: 
X11DRV_CritSection" wait timed out in thread 0009, blocked by 000d, 
retrying (60 sec)
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fad8,e2,0,0x596bea7c,0x482523d4,0x596bea58): stub
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x596bea7c,0x48629a7c,0x596bea58): stub
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc5c,e2,0,0x403caf6c,0x5b0a07bc,0x403caf48): stub
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x596bea7c,0x564301d4,0x596bea58): stub
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x562ab2c4,0x47dfcb2c,0x562ab2a0): stub
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc98,e2,0,0x5afc51d4,0x550fc284,0x5afc51b0): stub
err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 
427, block size = 2
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc98,e2,0,0x5bda5284,0x537f1314,0x5bda5260): stub
fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank 
(0x403d1a00)->(flags=0x00000001,handle=(nil))
err:ntdll:RtlpWaitForCriticalSection section 0x40a01560 "gdiobj.c: 
GDI_level" wait timed out in thread 0009, blocked by 000d, retrying (60 sec)
fixme:wave:DSD_CreateSecondaryBuffer 
(0x403e5270,0x4084fc48,e2,0,0x403caf6c,0x48353294,0x403caf48): stub
Killed



More information about the wine-devel mailing list