Deadlock with 8 threads?

Help
2009-07-22
2013-05-23
  • Luigi D. Sandon

    Luigi D. Sandon - 2009-07-22

    I am encountering something that looks like a deadlock when a service of mine is run with 8 concurrent threads on a dual Xeon dual core server. Sometimes the application stops responding, and inspecting it with SysInternals Process Explorer everytime I found each thread blocked in a Sleep() call.
    I can trace that call in a DLL of mine which is used to store data in TMemoryStreams. This is the first DLL loaded and thereby shares its memory manager with the application. The DLL itself never calls Sleep() , thereby I think it may be a FastMM Sleep() call.
    I am trying to run it with NeverSleepOnThreadContetiion, but it causes higher CPU load (100% instead of 60-80%) and lower performance (50-60 "nodes/s" instead of 70-80 "nodes/s", each thread processes a "tree" made of "nodes")
    IsMultiThread is set to true, and the DLL uses threadvars to keep stream list per threads. The deadlock does not happen frequently, but it happens (it can take several hours to appear).
    What could I do to investigate and check if it is really a deadlock?

     
    • Luigi D. Sandon

      Luigi D. Sandon - 2009-07-22

      Forgot to add I am using 4.92.

      A suggestion: Windows allows for critical sections with a "spin count" (see InitializeCriticalSectionAndSpinCount) but in Windows 95 AFAIK. Have you ever tried it to "lock" memory blocks instead on relying on Sleep()? It could be give the same benefits of NeverSleepOnThreadContention but still going to a wait if the lock cannot be acquired within the spin.

       
    • Pierre le Riche

      Pierre le Riche - 2009-07-23

      Hi Luigi,

      What I would recommond you should do as a first step is to enable the NeverSleepOnThreadContention option and then to run the application until it deadlocks. When that happens, place a breakpoint inside the spin-lock loop of FastMM to make sure that it is in fact deadlocking inside FastMM and not elsewhere.

      It shouldn't be possible for FastMM to cause a deadlock between threads, unless a thread was killed killed while inside the memory manager. Your application never forcibly destroys threads does it?

      Best regards,
      Pierre

       
    • Alexander Alexeev

      I think that there can be an exception inside FastMM's code.
      FastMM does not contain any protection from exceptions (i.e.: there are no try/finally) - probably for best performance.
      But this means, that once lock is aquired - the code _must not_ throw an exception. If exception is thrown - memory manager will be locked forever. It's internal variable will show "locked" state and noone is going to switch it back, as the unlocking code will be skipped because of exception.

      The usual exception is (of course) EAccessViolation due to any kind of memory corruption problems.

      If your code overflows memory, damages internal MM's structures - then your application will raise AV at some GetMem/FreeMem call and will lock forever immediately at next GetMem/FreeMem call.
      It can happen even in 1-threaded application.
      So, double-checks your damn pointers ;)

       
    • Luigi D. Sandon

      Luigi D. Sandon - 2009-07-28

      > What I would recommond you should do as a first step is to enable the
      > NeverSleepOnThreadContention option and then to run the application
      > until it deadlocks

      I run a test for four days on four machines with NeverSleepOnThreadContention enabled and the application never deadlocked. Looking at the code I see that if it is set FastMM never calls Sleep(). 

      My application may kill threads, but only if they get stuck for a very long period of time. Anyway if it happens the operation is logged to the event log, and no events like that were logged when the threads were blocked.

      I'll try to recreate the deadlok ASAP disabling NeverSleepOnThreadContention and see if the remote debugger let me step into the code without crashing everyhting ;)

       
    • Luigi D. Sandon

      Luigi D. Sandon - 2009-08-19

      At last I've been able to reproduce the error and collect call stacks (using map2dbg and SysInternals ProcessExplorer). I found nine threads all blocked inside FastMM, ProcessExplorer just shows a lot of context switches but each thread don't get past the sleep call. This data where collected with NeverSleepOnThreadContention *not* set.

      =====================================
      thread 3452
      =====================================
      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FreeMediumBlock+0x1b
      DocMan.dll!FastMM4.FastFreeMem+0x91
      DocMan.dll!FastMM4.DebugFreeMem+0x89
      HTTPWriter.dll!System.FreeMem+0xa
      HTTPWriter.dll!OracleTypes.TVariableData.Destroy+0x19
      HTTPWriter.dll!System.TObject.Free+0xb
      HTTPWriter.dll!Classes.TCollection.Destroy+0x1f
      HTTPWriter.dll!System.TObject.Free+0xb
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessInfoDBOutput+0x1a8
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessTreeResults+0x1cf
      S3DProc.exe!DIContainers.TDITree.Iterate+0x5a
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.Execute+0x2f4
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

      =====================================
      thread 1152
      =====================================

      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FreeMediumBlock+0x1b
      DocMan.dll!FastMM4.FastFreeMem+0x91
      DocMan.dll!FastMM4.DebugFreeMem+0x89
      httpengine.dll+0x3176
      httpengine.dll+0xf2c16
      httpengine.dll+0xf2218
      httpengine.dll+0xf3c7f
      httpengine.dll+0xf05d2
      httpengine.dll+0xee070
      httpengine.dll+0xef404
      httpengine.dll+0xee8c1
      httpengine.dll+0xe2738
      httpengine.dll+0xe19eb
      httpengine.dll!Execute+0x55
      S3DProc.exe!uTreeProcessor.TNodeProcessor.ExecuteEngineLibrary+0x396
      S3DProc.exe!uTreeProcessor.TNodeProcessor.Execute+0x63
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessTreeNodes+0x4ce
      S3DProc.exe!DIContainers.TDITree.Iterate+0x5a
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.Execute+0x25d
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

      =====================================
      thread 3448
      =====================================

      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FastGetMem+0x21d
      DocMan.dll!FastMM4.DebugGetMem+0x35
      httpengine.dll+0x315a
      msxml3.dll!OutputHelper::FlushBuffer+0x1b
      msxml3.dll!EncodingWriter::Flush+0x1c
      msxml3.dll!EncodingWriter::WriteString+0xa4
      msxml3.dll!OutputHelper::_hardWrite+0x49
      msxml3.dll!OutputHelper::_write+0x20
      msxml3.dll!OutputHelper::write+0x1d
      msxml3.dll!Node::save+0x2d0
      msxml3.dll!Node::save+0x258
      msxml3.dll!Document::save+0x21
      msxml3.dll!Document::save+0x27
      msxml3.dll!Document::Save+0x5b
      msxml3.dll!DOMDocumentWrapper::save+0x12d
      httpengine.dll+0x3659b
      httpengine.dll+0x9b200
      httpengine.dll+0x9b5ea
      httpengine.dll+0xdc09d
      httpengine.dll+0xe1d52
      httpengine.dll!Execute+0x6d
      S3DProc.exe!uTreeProcessor.TNodeProcessor.ExecuteEngineLibrary+0x396
      S3DProc.exe!uTreeProcessor.TNodeProcessor.Execute+0x63
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessTreeNodes+0x4ce
      S3DProc.exe!DIContainers.TDITree.Iterate+0x5a
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.Execute+0x25d
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

      =====================================
      thread 516
      =====================================

      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FreeMediumBlock+0x1b
      DocMan.dll!FastMM4.FastFreeMem+0x91
      DocMan.dll!FastMM4.DebugFreeMem+0x89
      MSMessenger.dll+0x3176
      MSMessenger.dll+0x77c74
      MSMessenger.dll+0x5d38f
      MSMessenger.dll+0x78b47
      MSMessenger.dll+0x78d61
      MSMessenger.dll+0x43b7
      MSMessenger.dll+0xeb9bb
      MSMessenger.dll+0x43b7
      S3DProc.exe!uTreeProcessor.TNodeProcessor.ExecuteEngineLibrary+0x396
      S3DProc.exe!uTreeProcessor.TNodeProcessor.Execute+0x63
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessTreeNodes+0x4ce
      S3DProc.exe!DIContainers.TDITree.Iterate+0x5a
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.Execute+0x25d
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

      =====================================
      thread 860
      =====================================

      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FreeMediumBlock+0x1b
      DocMan.dll!FastMM4.FastFreeMem+0x91
      DocMan.dll!FastMM4.DebugFreeMem+0x89
      HTTPWriter.dll!System.FreeMem+0xa
      HTTPWriter.dll!OracleTypes.TVariableData.Destroy+0x19
      HTTPWriter.dll!System.TObject.Free+0xb
      HTTPWriter.dll!Classes.TCollection.Destroy+0x1f
      HTTPWriter.dll!System.TObject.Free+0xb
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessInfoDBOutput+0x1a8
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessTreeResults+0x1cf
      S3DProc.exe!DIContainers.TDITree.Iterate+0x5a
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.Execute+0x2f4
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

      =====================================
      thread 2532
      =====================================

      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FreeMediumBlock+0x1b
      DocMan.dll!FastMM4.FastFreeMem+0x91
      DocMan.dll!FastMM4.DebugFreeMem+0x89
      S3DProc.exe!System.FreeMem+0xa
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessTreeNodes+0x1e0
      S3DProc.exe!DIContainers.TDITree.Iterate+0x5a
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.Execute+0x25d
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

      =====================================
      thread 3524
      =====================================

      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FastGetMem+0x21d
      DocMan.dll!FastMM4.DebugGetMem+0x35
      httpengine.dll+0x315a
      msxml3.dll!OutputHelper::FlushBuffer+0x1b
      msxml3.dll!EncodingWriter::Flush+0x1c
      msxml3.dll!OutputHelper::flush+0x19
      msxml3.dll!OutputHelper::close+0x4b
      msxml3.dll!Document::save+0x3c
      msxml3.dll!Document::Save+0x5b
      msxml3.dll!DOMDocumentWrapper::save+0x12d
      httpengine.dll+0x3659b
      httpengine.dll+0x9b200
      httpengine.dll+0x9b5ea
      httpengine.dll+0xdc09d
      httpengine.dll+0xe1d52
      httpengine.dll!Execute+0x6d
      S3DProc.exe!uTreeProcessor.TNodeProcessor.ExecuteEngineLibrary+0x396
      S3DProc.exe!uTreeProcessor.TNodeProcessor.Execute+0x63
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessTreeNodes+0x4ce
      S3DProc.exe!DIContainers.TDITree.Iterate+0x5a
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.Execute+0x25d
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

      =====================================
      thread 2548
      =====================================

      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FastGetMem+0x21d
      DocMan.dll!FastMM4.DebugGetMem+0x35
      httpengine.dll+0x315a
      httpengine.dll+0x2740a
      httpengine.dll+0x27378
      httpengine.dll+0x2746c
      httpengine.dll+0x26da0
      httpengine.dll+0x26e6e
      httpengine.dll+0xf2c16
      httpengine.dll+0xf2218
      httpengine.dll+0xf3c7f
      httpengine.dll+0xf05d2
      httpengine.dll+0xee070
      httpengine.dll+0xef404
      httpengine.dll+0xee8c1
      httpengine.dll+0xe2738
      httpengine.dll+0xe19eb
      httpengine.dll!Execute+0x55
      S3DProc.exe!uTreeProcessor.TNodeProcessor.ExecuteEngineLibrary+0x396
      S3DProc.exe!uTreeProcessor.TNodeProcessor.Execute+0x63
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.ProcessTreeNodes+0x4ce
      S3DProc.exe!DIContainers.TDITree.Iterate+0x5a
      S3DProc.exe!uTreeProcessor.TTreeProcessorThread.Execute+0x25d
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

      =====================================
      thread 4076
      =====================================

      ntkrnlpa.exe!KiSwapContext+0x26
      ntkrnlpa.exe!KiSwapThread+0x2e5
      ntkrnlpa.exe!KeWaitForSingleObject+0x346
      ntkrnlpa.exe!KiSuspendThread+0x18
      ntkrnlpa.exe!KiDeliverApc+0x117
      ntkrnlpa.exe!KiSwapThread+0x300
      ntkrnlpa.exe!KeDelayExecutionThread+0x2ab
      ntkrnlpa.exe!NtDelayExecution+0x84
      ntkrnlpa.exe!KiFastCallEntry+0xfc
      ntdll.dll!KiFastSystemCallRet
      ntdll.dll!NtDelayExecution+0xc
      kernel32.dll!SleepEx+0x68
      kernel32.dll!Sleep+0xf
      DocMan.dll!FastMM4.LockMediumBlocks+0x2f
      DocMan.dll!FastMM4.FastGetMem+0x21d
      DocMan.dll!FastMM4.DebugGetMem+0x35
      S3DProc.exe!System.ReallocMem+0x45
      S3DProc.exe!System.DynArraySetLength+0xa
      S3DProc.exe!IdIOHandler.TIdIOHandler.ReadLn+0x162
      S3DProc.exe!IdIOHandler.TIdIOHandler.ReadLn+0x1f
      S3DProc.exe!IdContext.TIdContext.Run+0x12
      S3DProc.exe!Classes.ThreadProc+0x37
      S3DProc.exe!System.ThreadWrapper+0x2a
      kernel32.dll!BaseThreadStart+0x34

       
      • Pierre le Riche

        Pierre le Riche - 2009-08-19

        Hi Luigi,

        I've gone through the code again - all the calls to LockMediumBlocks have a matching unlock. The only ways that I can see that it could get stuck in the LockMediumBlocks call is if you have either killed or suspended a thread while it was waiting to acquire a medium block lock. The other possbility is a memory error: If a memory error occurs then that can also happen. Do you trap exceptions raised by the memory manager? If the memory manager raises an exception then all bets are off from that point onward.

        Best regards,
        Pierre

         
        • Luigi D. Sandon

          Luigi D. Sandon - 2009-08-19

          Once started, threads are never suspended calling Suspend(), they may be put on wait using  WaitForSingleObject() on a TEvent but only when they've finished their task and a new one is not available, but I should see it in the stack trace, as far as I can see in those traces all threads looks to be "alive and running" and blocked in the middle of their processing.
          Any unhandled exception shoud be written to the event log  - but I found none - what exactly  means to "trap exception raised by the memory manager" - is there any particular exception type I should look for, or define to set?

           
          • Pierre le Riche

            Pierre le Riche - 2009-08-19

            Exceptions raised by the memory manager vary from an access violation (for block corruptions) or an EOutOfMemory exception (for out of memory situations). Unfortunately I don't know what other advice to give you.

            FastMM (which is basically the same as the default memory manager) is used in many production multi-threaded applications so I am still doubtful that it is a problem in the memory manager - if there was such a problem I would have received more similar reports. Others that I have received in the past almost always turned out to be bugs in user code, and those that were not (we're talking long ago here) have been fixed.

             
            • Luigi D. Sandon

              Luigi D. Sandon - 2009-08-19

              I am running more tests to try to identify any exception that may be raised, although, IMHO it's dangerous that FastMM retains a lock if an exception is raised within a thread, it should release the lock somehow to avoid to block all other threads - maybe it should spawn its onw "guardian" thread?
              It could be an issue of mine, but I wouldn't posted here if I didn't find all my thread blocked in a FastMM Sleep() call. Were critical sections too slow to be used?
              How they get there I hope to find, but it looks to be something that happens in a particular situation, not easy to reproduce. I could try to run it under AQTime exception profiler, but when a debugger/profiler is active it looks the delay introduced make the deadlock harder to happen - on my  five Dell 1855 test blade servers running usually one or two blocks in a day (the service runs for about twenty hours a day, there is a database maintenance windows in the night)  On a 8 blade M600 system it blocks more often.. But soon it will run on twenty-twenty five M600 and I am a bit worried...

               
              • Pierre le Riche

                Pierre le Riche - 2009-08-19

                If FastMM raises an exception (other than EOutOfMemory) then it means that the memory pool is corrupted and pretty much "all bets are off". Attempting any kind of recovery after that would be pointless. At that point the safest thing would be for the application to hang, otherwise you risk corrupting data further. (The memory pool is shared across threads, so if one thread corrupts the memory pool the party is spoiled for all of them.)

                 

Log in to post a comment.