DynamoRIO / DynamoRIO/dynamorio

custom targets all crashing with access violation in cmd.exe

Open
#944 0 comments 0 reactions 0 assignees View on GitHub
Component-Build Migrated OpSys-Windows Priority-Medium
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on October 09, 2012 18:28:45_

started happening today on my win7 VS2010 machine. suite passed earlier in day. then w/ custom changes, the external builds all hit this. then in two subsequent re-runs, every single build hit this, including a switch to head ( r1645 ).

ninja works fine in suite.

failures look like this:

debug-internal-32: ***\* 4 build errors ****
9>:C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code -1073741819. [D:\derek\dr\build_suite\build_debug-internal-32\core\generate_syslog.vcxproj]
15>:C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code -1073741819. [D:\derek\dr\build_suite\build_debug-internal-32\api_headers.vcxproj]

-1073741819 == 0xc0000005 == STATUS_ACCESS_VIOLATION

this is VS2010 msbuild build

going into suite build dirs and re-building (no clean):

parallel build => reproduces manually but no further information
sequential build => also reproduces but sometimes just api_headers and
sometimes generate_syslog

it's non-deterministic

built successfully in IDE after 1st time it showed up but it's non-det so
not 100% sure it won't show up there

I finally got a repro w/ extra logging:

% cmake --build . --target core/generate_syslog -- /v:diag 2>&1 | tee OUT
% cmake --build . --target api_headers -- /v:diag 2>&1 | tee OUT

but it doesn't help.

this executes from core/:
% cmd /c "C:\cygwin\bin\perl.exe" D:/derek/dr/git/src/core/lib/genapi.pl -header D:/derek/dr/build_suite/build_debug-i32-static-ext/include "-DINTERNAL -DDEBUG -DDRGUI_DEMO -DWINDOWS -DCLIENT_INTERFACE -DAPP_EXPORTS -DKSTATS -DX86 -DNOLIBC -DASSEMBLE_WITH_MASM -DWINDOWS_PC_SAMPLE -DDYNAMORIO_IR_EXPORTS -DCUSTOM_TRACES -DCLIENT_SIDELINE -DDR_APP_EXPORTS -DDEBUG_MEMORY -DSTACK_GUARD_PAGE -DHEAP_ACCOUNTING -DDEADLOCK_AVOIDANCE -DSHARING_STUDY -DHASHTABLE_STATISTICS -DAPI_EXPORT_ONLY"
Error: Couldn't open lib/dr_app.h for copy

% od -c Win32/Debug/api_headers/custombuild.write.1.tlog
0000000 377 376
0000002

*\* INFO log

Write Tracking Logs: (TaskId:35)
Win32\Debug\api_headers\custombuild.write.1.tlog (TaskId:35)
Read Tracking Logs: (TaskId:35)
Win32\Debug\api_headers\custombuild.read.1.tlog (TaskId:35)
No output for D:\DEREK\DR\BUILD_SUITE\BUILD_DEBUG-I32-STATIC-EXT\CMAKEFILES\1A5DDF73360ACCE7B66DF4FD21542EDC\DR_APP.H.RULE|D:\DEREK\DR\BUILD_SUITE\BUILD_DEBUG-I32-STATIC-EXT\CMAKEFILES\4896EA7BC0B0A98AF36595FEFF307935\API_HEADERS.RULE|D:\DEREK\DR\GIT\SRC\CMAKELISTS.TXT was found in the tracking log; source compilation required. (TaskId:35)
....\git\src\CMakeLists.txt will be compiled as it was not found in the tracking log. (TaskId:35)
CMakeFiles\1a5ddf73360acce7b66df4fd21542edc\dr_app.h.rule will be compiled as it was not found in the tracking log. (TaskId:35)
CMakeFiles\4896ea7bc0b0a98af36595feff307935\api_headers.rule will be compiled as it was not found in the tracking log. (TaskId:35)
setlocal
C:\PROGRA~2\CMake\bin\cmake.exe -HD:/derek/dr/git/src -BD:/derek/dr/build_suite/build_debug-i32-static-ext --check-stamp-file D:\derek\dr\build_suite\build_debug-i32-static-ext\CMakeFiles\generate.stamp
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd (TaskId:35)
setlocal
cd D:\derek\dr\git\src\core
if %errorlevel% neq 0 goto :cmEnd
D:
if %errorlevel% neq 0 goto :cmEnd
C:\cygwin\bin\perl.exe D:/derek/dr/git/src/core/lib/genapi.pl -header D:/derek/dr/build_suite/build_debug-i32-static-ext/include "-DINTERNAL -DDEBUG -DDRGUI_DEMO -DWINDOWS -DCLIENT_INTERFACE -DAPP_EXPORTS -DKSTATS -DX86 -DNOLIBC -DASSEMBLE_WITH_MASM -DWINDOWS_PC_SAMPLE -DDYNAMORIO_IR_EXPORTS -DCUSTOM_TRACES -DCLIENT_SIDELINE -DDR_APP_EXPORTS -DDEBUG_MEMORY -DSTACK_GUARD_PAGE -DHEAP_ACCOUNTING -DDEADLOCK_AVOIDANCE -DSHARING_STUDY -DHASHTABLE_STATISTICS -DAPI_EXPORT_ONLY"
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd (TaskId:35)
setlocal
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd (TaskId:35)
Building Custom Rule D:/derek/dr/git/src/CMakeLists.txt (TaskId:35)
CMake does not need to re-run because D:\derek\dr\build_suite\build_debug-i32-static-ext\CMakeFiles\generate.stamp is up-to-date. (TaskId:35)
Generating include/dr_app.h (TaskId:35)
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code -1073741819. [D:\derek\dr\build_suite\build_debug-i32-static-ext\api_headers.vcxproj]
Done executing task "CustomBuild" -- FAILED. (TaskId:35)
Done building target "CustomBuild" in project "api_headers.vcxproj" -- FAILED.: (TargetId:72)
Done Building Project "D:\derek\dr\build_suite\build_debug-i32-static-ext\api_headers.vcxproj" (default targets) -- FAILED.

_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=944_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.