-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
content_unittests DownloadFile/DownloadFileTestWithRename.RenameWithErrorRetry/0 fail on DrMemory #1644
Comments
From zhao...@google.com on September 30, 2014 15:12:08 Failed on light mode: Labels: -Priority-Medium Priority-High |
From zhao...@google.com on September 30, 2014 15:14:05 Passed on handle-leaks only mode $ ~/Workspace/DrMemory/builds/build_x86_drm_rel.git/bin/drmemory.exe -handle_leaks_only -- ./out/Debug/content_unittests.exe --gtest_filter=DownloadFileTestWithRename.RenameWithErrorRetry Passed on Debug build DynamoRIO |
From zhao...@google.com on September 30, 2014 15:15:55 The tests tries to force a platform error on Windows by opening a file for exclusive read and then attempting to move it to a different directory (which on Windows is an error). The expected error is a sharing violation. This works as intended on Win7 and WinXP. But somehow under Dr. Memory, the result appears to be FILE_TOO_LARGE. Do you know why that might be? |
From zhao...@google.com on September 30, 2014 15:31:58 Failed on leaks_only, passed on -no_track_allocs -leaks_only $ ~/Workspace/DrMemory/builds/build_x86_drm_rel.git/bin/drmemory.exe -leaks_only -- ./out/Debug/content_unittests.exe --gtest_filter=DownloadFileTestWithRename.RenameWithErrorRetry $ ~/Workspace/DrMemory/builds/build_x86_drm_rel.git/bin/drmemory.exe -handle_leaks_only -- ./out/Debug/content_unittests.exe --gtest_filter=DownloadFileTestWithRename.RenameWithErrorRetry |
From zhao...@google.com on September 30, 2014 18:36:48 It works with -no_replace_malloc -leaks_only [----------] Global test environment tear-down So it is more likely to be replaced allocator bug. |
From asanka@chromium.org on October 01, 2014 08:14:38 Blocking: chromium:418748 |
From zhao...@google.com on October 02, 2014 00:26:20 it is the replaced allocator's problem 0:000> kp This test first tried to produce a failure on rename fail, which generate a 0xC0000043 STATUS_SHARING_VIOLATION. system call 0 KERNEL32.dll!MoveFileWithProgressTransactedW+0xb4 (0x76e1991c <KERNEL32.dll+0x2991c>) modid:0^M1 fp=0x0018eb54 parent=0x0018eb74 KERNEL32.dll!MoveFileWithProgressW+0x1a (0x76e19abf <KERNEL32.dll+0x29abf>) modid:0^M2 fp=0x0018eb74 parent=0x0018eb90 KERNEL32.dll!MoveFileExW +0x16 (0x76e19b1c <KERNEL32.dll+0x29b1c>) modid:0^M3 fp=0x0018eb90 parent=0x0018ebdc SHELL32.dll!CFSTransfer::_SameVolumeMoveOrRename+0x225 (0x75d8127e <SHELL32.dll+0x31127e>) modid:0^M4 fp=0x0018ebdc parent=0x0018ee24 SHELL32.dll!CFSTransfer::MoveItem+0x1bd (0x75d81cc3 <SHELL32.dll+0x311cc3>) modid:0^M5 fp=0x0018ee24 parent=0x0018ee74 SHELL32.dll!CMoveOperation::Do+0x140 (0x75cc97e7 <SHELL32.dll+0x2597e7>) modid:0^M6 fp=0x0018ee74 parent=0x0018eea0 SHELL32.dll!CCopyWorkItem::_DoOperation+0x27 (0x75aca4b6 <SHELL32.dll+0x5a4b6>) modid:0^M7 fp=0x0018eea0 parent=0x0018f0ec SHELL32.dll!CCopyWorkItem::_SetupAndPerformOp+0x1f2 (0x75aca8f0 <SHELL32.dll+0x5a8f0>) modid:0^M8 fp=0x0018f0ec parent=0x0018f334 SHELL32.dll!CCopyWorkItem::ProcessWorkItem+0xffffff17 (0x75ac9262 <SHELL32.dll+0x59262>) modid:0^M9 fp=0x0018f334 parent=0x0018f368 SHELL32.dll!CRecursiveFolderOperation::Do+0x149 (0x75ac963d <SHELL32.dll+0x5963d>) modid:0^M#10 fp=0x0018f368 parent=0x0018f3ac SHELL32.dll!CFileOperation::_EnumRootDo+0xe8 (0x75ac9f96 <SHELL32.dll+0x59f96>) modid:0^M The error is set into the teb. Then later on RtlFreeHeap, our replaced replace_RtlFreeHeap failed, and overwrite the error in teb, and cause the test failure.
0:000> dv 0:000> !teb |
From zhao...@google.com on October 02, 2014 00:29:34 In contrast, if run natively: 0:000> kp 0:000> dds esp 0:000> !teb After So the native RtlFreeHeap won't report error on free a NULL pointer, but we reported. |
From zhao...@google.com on October 02, 2014 00:32:09 In RtlFreeHeap: 77c8dfac 8b5d10 mov ebx,[ebp+0x10] 77c942bc b001 mov al,0x1 77c8e03b 5f pop edi So it returns without setting any error no if ptr is NULL. |
From zhao...@google.com on October 06, 2014 12:03:43 This issue was closed by revision r2099 . Status: Fixed |
From zhao...@google.com on September 30, 2014 18:11:04
$ ~/Workspace/DrMemory/builds/build_x86_drm_rel.git/bin/drmemory.exe -- ./out/Debug/content_unittests.exe --gtest_filter=DownloadFileTestWithRename.RenameWithErrorRetry
Dr.MDr. Memory version 1.8.2097Dr.MRunning "./out/Debug/content_unittests.exe --gtest_filter=DownloadFileTestWithRename.RenameWithErrorRetry"Valgrind detected, switching to single process mode.
Pass --test-launcher-debug-launcher to valgrind the launcher itself.
Note: Google Test filter = DownloadFileTestWithRename.RenameWithErrorRetry
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from DownloadFile/DownloadFileTestWithRename
[ RUN ] DownloadFile/DownloadFileTestWithRename.RenameWithErrorRetry/0
unknown file: error: Uninteresting mock function call - returning directly.
Function call: RegisterCallback(@0018F6E4 8-byte object <00-00 00-00 00-00 00-00>)
d:\src\chrome\src\content\browser\download\download_file_unittest.cc(593): error: Value of: interrupt_reason
Actual: 6
Expected: DOWNLOAD_INTERRUPT_REASON_NONE
Which is: 0
d:\src\chrome\src\content\browser\download\download_file_unittest.cc(659): error: Value of: did_run_callback
Actual: true
Expected: false
d:\src\chrome\src\content\browser\download\download_file_unittest.cc(667): error: Value of: did_run_callback
Actual: true
Expected: false
[ FAILED ] DownloadFile/DownloadFileTestWithRename.RenameWithErrorRetry/0, where GetParam() = 4-byte object <FE-83 46-00> (5577 ms)
Original issue: http://code.google.com/p/drmemory/issues/detail?id=1644
The text was updated successfully, but these errors were encountered: