Closed Bug 522829 Opened 11 years ago Closed 11 years ago

crash stacks on Windows unittests broken (MINIDUMP_STACKWALK path translation problem) (WindowsError: [Error 2] The system cannot find the path specified)


(Release Engineering :: General, defect)

Windows XP
Not set


(Not tracked)



(Reporter: ddahl, Assigned: bhearsum)



(Keywords: intermittent-failure)


(1 file)

*** registerContentHandler(text/html,http://localhost:8888/%s,Foo handler)
TEST-UNEXPECTED-FAIL | | Exited with code -1073741819 during test run
INFO | | Application ran for: 0:05:23.547000
TEST-UNEXPECTED-FAIL | | application crashed (minidump found)
Traceback (most recent call last):
  File "mochitest/", line 580, in <module>
  File "mochitest/", line 478, in main
  File "e:\builds\moz2_slave\mozilla-central-win32-unittest-mochitests\build\mochitest\", line 480, in runApp
    if checkForCrashes(os.path.join(profileDir, "minidumps"), symbolsPath):
  File "e:\builds\moz2_slave\mozilla-central-win32-unittest-mochitests\build\mochitest\", line 80, in checkForCrashes[stackwalkPath, d, symbolsPath], stderr=nullfd)
  File "d:\mozilla-build\python25\lib\", line 443, in call
    return Popen(*popenargs, **kwargs).wait()
  File "d:\mozilla-build\python25\lib\", line 593, in __init__
    errread, errwrite)
  File "d:\mozilla-build\python25\lib\", line 793, in _execute_child
WindowsError: [Error 2] The system cannot find the path specified

command timed out: 1200 seconds without output
program finished with exit code 1

WINNT 5.2 mozilla-central test mochitests  [testfailed] Started 15:44, finished 16:14
Whiteboard: [orange]
WINNT 5.2 mozilla-central test mochitests on 2009/10/20 08:51:29
There are two bugs here:
1) Something is crashing mochitest and producing a minidump
2) The harness code is failing to execute minidump_stackwalk to print a stack. It looks like perhaps the minidump_stackwalk binary doesn't exist. I pushed an extra print statement to verify if this is the problem:

Also, why is this filed in Core: General? It's either a harness problem (and belongs in Testing:Mochitest) or a problem with the build slave/environment (and belongs in Engineering). Nobody looks at bugs in Core: General, so I had no idea this bug existed.
Component: General → Mochitest
Product: Core → Testing
QA Contact: general → mochitest
And this got hit again
WINNT 5.2 mozilla-central test opt mochitests on 2009/10/20 18:05:54

I went to moz2-win32-slave02 and 
$ ls -l /e/builds/moz2_slave/mozilla-central-win32-opt-unittest-mochitests/tools/breakpad/win32/minidump_stackwalk.exe
worked just fine at the msys prompt.
But! There's something interesting here. 

TEST-UNEXPECTED-FAIL | | application crashed (minidump found)
SUCCESS: The process with PID 3608 has been terminated.
MINIDUMP_STACKWALK binary not found: /e/builds/moz2_slave/mozilla-central-win32-opt-unittest-mochitests/tools/breakpad/win32/minidump_stackwalk.exe

That printed out *an MSYS path*, but Python is a normal windows program. MSYS is supposed to do path translation on command line arguments, as well as environment variables. Clearly something is going wrong here, since we're getting an MSYS path inside of Python, which it doesn't know how to handle.
And, as usual at this time of the morning, after writing a comment I suspect I see the problem. There's no MSYS involved here. With the packaged unit tests, we simply have Buildbot invoking Python directly, one Windows program to another. Passing MSYS paths in that situation is broken.

Can we either make the toolsdir a Windows-style path here:
(pwd -W should produce a path that looks like c:/foo/bar, which should work with MSYS or Windows programs)
or run the packaged unittest steps via MSYS bash (gross, but would solve the problem).
Component: Mochitest → Release Engineering
Product: Testing →
QA Contact: mochitest → release
Version: Trunk → other
for the packaged unit test case. UnittestBuildFactory days are numbered.
Severity: normal → critical
Summary: build/automation problem: WindowsError: [Error 2] The system cannot find the path specified → crash stacks on Windows unittests broken (MINIDUMP_STACKWALK path translation problem) (WindowsError: [Error 2] The system cannot find the path specified)
I manually ran some packaged mochitests with MINIDUMP_STACKWALK set to e:/... instead of /e/.... After forcing a crash with ted's crashinject app, I got this:

Ted says this looks good, so this patch should fix us up for all of the packaged build cases.
Attachment #407540 - Flags: review?(ted.mielczarek)
Comment on attachment 407540 [details] [diff] [review]
use pwd -W on windows to get a useful path

Great, thanks!
Attachment #407540 - Flags: review?(ted.mielczarek) → review+
Attachment #407540 - Flags: checked-in+
Comment on attachment 407540 [details] [diff] [review]
use pwd -W on windows to get a useful path

changeset:   449:8e3e2a4208d4
I updated the masters with this patch and kicked a few opt packaged mochitest runs. Hopefully (ha) one will crash.
Duplicate of this bug: 523645
No point in keeping it open, if a fix is in.
Closed: 11 years ago
Resolution: --- → FIXED
Assignee: nobody → bhearsum
Whiteboard: [orange]
Product: → Release Engineering
You need to log in before you can comment on or make changes to this bug.