MSMQ throws exception on MQOpenQueue after Microsoft updates are applied

0

We are running our C++ program (compiled with VS2008) as a service and calling MQOpenQueue. After applying the Microsoft updates

KB3065979
KB3054205
KB3064209
KB3063858
KB3040272
KB3059317
KB3058515

to a Windows server 2008 r2 SP1 enterprise machine, all calls to MQOpenQueue were failing. This problem persisted after removing the updates until MSMQ was reinstalled. It then was functioning normally for less than a day, and then began occurring again sporadically.

The exception being thrown is Exception code 0xE06D7363.

Here's the stack

KERNELBASE.dll!_RaiseException@16 ()    Unknown

msvcrt.dll!__CxxThrowException@8 () Unknown

mqsec.dll!ThrowMissingValue(class RegEntry const &,long)    Unknown

mqsec.dll!registry_access_error::`scalar deleting destructor'(unsigned int) Unknown
mqsec.dll!CmQueryValue(class RegEntry const &,unsigned char * *,unsigned long *)    Unknown
mqsec.dll!MQSec_GetWorldSid(void)   Unknown
mqsec.dll!MQSec_GetLocalMachineSid(int,unsigned long *) Unknown
mqrt.dll!RTpGetThreadUserSid(int *,int *,unsigned char * *,unsigned long *) Unknown
mqrt.dll!RTSecurityContextBase::InitializeUserInfo(void)    Unknown
mqrt.dll!InternalSecurityContext::CreateSecurityContext(void)   Unknown
mqrt.dll!RtpOpenQueue(wchar_t const *,unsigned long,unsigned long,unsigned long *)  Unknown
mqrt.dll!_MQOpenQueue@16 () Unknown
c++
msmq
asked on Stack Overflow Jul 13, 2015 by Charlie Gershfield • edited Jul 13, 2015 by Dan Oberlam

1 Answer

1

Our conclusion was that the program was actually crashing due to a different problem. We were using Microsoft's Debug Diagnostic Tool to generate the crash dumps. We sometimes got two crash dumps for the same process ID. This, we think, is due to the first dump being obtained when an exception was thrown down in mqsec.dll. The later crash dump was due to the real problem. It's our conjecture that the first exception was caught somewhere in Microsoft's dlls and that the call to _MQOpenQueue did finally return, perhaps with an error. However, the exception generated a crash dump file with the above stack trace in it.

We switched our method of obtaining crash dumps at this site to setting the value of a registry key as outlined here:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx

And this helped us concentrate on the real crash and not get distracted by other exceptions that were thrown and caught.

answered on Stack Overflow Jul 21, 2015 by Charlie Gershfield

User contributions licensed under CC BY-SA 3.0