Re: Max Deadlock Obtained (473146) | |||
![]() |
|||
Home > SubChat | |||
[ Read Responses | Post a New Response | Return to the Index ] |
|
![]() |
Re: Max Deadlock Obtained |
|
Posted by SelkirkTMO on Tue Aug 7 23:15:52 2007, in response to Re: Max Deadlock Obtained, posted by Dupont Circle Station on Tue Aug 7 22:04:32 2007. Blue screens in NT progreny are indeed rare and almost always the result of a badly written driver clobbering another one or just plain walking off the plank. In kernel mode, the kernel itself doesn't manage memory and you have to be PERFECT in doing so in your own code. I write code for a living."Illegal operation" is an interesting one because here, it CAN be the fault of the code, but more often than not it really is windows unless it happens at the same place every time in a proggie. Here's what goes on behind the scenes since most of them are 0x00000005 errors, or "buffer overflow." A program is merrily going along until it uses up a block of memory and needs some more. At this point, windows will "raise an exception" to which the kernel is supposed to jump in an "page in" more memory and page out the old memory which is still in use (also known as a "swap"). The FIRST exception call usually will swap in the memory but if windows can't find it, it becomes an "unhandled exception." The program can EXPECT this and try the call again but more often than not, windows will not find more space the second time it's asked to and up comes "Illegal operation" when the kernel is at fault. It can also occur if the program calls memory or a handle that it closed and is no longer valid. But more often then not, it will be windows that bombs unless the error occurs at the same place on the same call every single time you do that. Then it's the program's fault. XP and Vista are even MORE scrooched in that they've added another layer of "rotsa ruck." It's called "not responding" and is definitely windows being hosed. Here, windows now pings a running program every x amount of seconds. If you TOUCH it while it's busy in an uninterruptable thread (heavy calcs) then windows will pop up a "not responding" making you think the proggie's died (sometimes it really has) when it actually hasn't. If you cancel, it might actually HOSE the program and it really will be dead. This is called a "deadlock." The deadlock occurs because windows will throw its thread onto the stack and in doing so can often replace the return pointer with its own. Now the program doesn't know its return pointer, overwrites the windows pointer trying to find its own and now you have deadlock because neither thread knows where to exit to. Now back to our train, already in progress. :) |
![]() |
![]() |
![]() |