Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Windows 12.1 Compiler : random crash in libiomp5md.dll onexit

AndrewC
New Contributor III
738 Views
First-chance exception at 0x000007fefd8dcacd (KernelBase.dll) in Solver.exe: 0xA1A01DB2: 0xa1a01db2.

> KernelBase.dll!RaiseException() + 0x3d bytes
libiomp5md.dll!000000001006030f()
[Frames below may be incorrect and/or missing, no symbols loaded for libiomp5md.dll]
libiomp5md.dll!000000001005ee89()
libiomp5md.dll!000000001009d16f()
ntdll.dll!LdrShutdownProcess() + 0x1d1 bytes
ntdll.dll!RtlExitUserProcess() + 0x90 bytes
msvcr100.dll!doexit(int code, int quick, int retcaller) Line 621 + 0x11 bytes C


We are getting the following "random" crash on exit of our C++ program in libiomp5md.dll. This happens in about 1 out of every 5 runs. We use OMP threading, but do not see any errors when running Inspector XE.

Does anyone have a clue what could be causing this.... the libiomp5md.dll
file version is 5.0.2011.1219






0 Kudos
7 Replies
AndrewC
New Contributor III
738 Views
Searching on the exception code, shows this is related to the commincation with the Intel Parallel Debugger extension. But I do not have that installed ( I deliberately excluded it from the install due to know conflicts with Inspector XE version). The debugger does not show any of the Parallel Debugger exceptions listed.
0 Kudos
SergeyKostrov
Valued Contributor II
738 Views
Quoting vasci_intel
...Does anyone have a clue what could be causing this...

I wonder if this isa result ofmemory corruption? Did you try to comment out some blocks ofthe source codes?
I checked Microsoft headers and it looks like the exception code is really Intel specific. I think a Win32 API
function 'RaiseException' was used to throw it.
0 Kudos
Bernard
Valued Contributor I
738 Views

We are getting the following "random" crash on exit of our C++ program in libiomp5md.dll. This happens in about 1 out of every 5 runs. We use OMP threading, but do not see any errors when running Inspector XE

Is this stack trace from VS debugger?
Please install Windbg as default post-mortem debugger and work with the windgb.
Run your application outside of VS when the exception is thrown windbg will be called and you could inspect process virtual memory at much higher resolution, beside this windbg will show you a trap frame which contains your malfunctioning code saved context.VS debugger is not suitable for serious debugging when the OS interaction is involved.
You can run your software under debugger and put conditional breakpoints on function call or some memeory address.

Here in your stack trace I will put a breakpoint on"libiomp5md.dll!000000001006030f()"
and inspect what an args are passed to this function and what this function calls next.
0 Kudos
AndrewC
New Contributor III
738 Views
A quick search on the exception shows this

http://software.intel.com/en-us/articles/parallel-debugger-extension-exceptions-0xa1a01db1-0xa1a01db2/

It's just very suspicious I am getting the exception in the shutdown of the OMP library.
0 Kudos
Georg_Z_Intel
Employee
738 Views
Hello,

we're currently looking into that. One question up-front:
Do you see this problem only when using the debugger or does it also occur with normal execution?
For the latter: Does it occur in release builds as well? And, if so, did you enable "Basic Runtime Checks" or anything alike?

Thank you & best regards,

Georg Zitzlsberger
0 Kudos
AndrewC
New Contributor III
738 Views
The initilial investigation happened as I noticed this happening occasionally when running QA/Test runs outside the debugger. There is of course, a distinct possibility my code is trashing something that belongs to OMP, but Inspector XE does not find any problems.
0 Kudos
Georg_Z_Intel
Employee
738 Views
Hello,

so, it's hardly the debugger (or Parallel Debug Extensions).
Without reproducing it on our side I cannot say what the root cause is. Would it be possible for you to provide a (small) reproducer? Even something that only sporadically fails is fine.
I'd also need to know the VS & compiler versions. It obviously looks like a 64 bit system...

Thank you & best regards,

Georg Zitzlsberger
0 Kudos
Reply