Bug 82652
Summary: | TestWebKitAPI always crashes in release builds | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ap, burg, ddkilzer, jberlin, lforschler, ossy, rniwa, simon.fraser, slewis, vestbo, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://build.webkit.org/builders/Lion%20Intel%20Release%20%28WebKit2%20Tests%29/builds/5898/steps/run-api-tests/logs/stdio |
Simon Fraser (smfr)
This log shows:
** BUILD SUCCEEDED **
TestWebKitAPI(76672) malloc: *** error for object 0x104fd2620: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Failed to build list of tests!
program finished with exit code 0
and there's an associated crash log:
s-bot-135:CrashReporter buildbot$ cat TestWebKitAPI_2012-03-29-120650_buildbots-Mac-Pro-49.crash
Process: TestWebKitAPI [71902]
Path: /Volumes/VOLUME/*/TestWebKitAPI
Identifier: TestWebKitAPI
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: perl5.12 [71610]
Date/Time: 2012-03-29 12:06:48.588 -0700
OS Version: Mac OS X 10.7.3 (11D50)
Report Version: 9
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
/Volumes/Data/slave/lion-intel-release-tests-wk2/build/WebKitBuild/Release/TestWebKitAPI
objc[71902]: garbage collection is OFF
*** error for object 0x109f0c620: pointer being freed was not allocated
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff96e2782a __kill + 10
1 libsystem_c.dylib 0x00007fff8f2a8a9c abort + 177
2 libsystem_c.dylib 0x00007fff8f30784c free + 389
3 TestWebKitAPI 0x0000000106f99219 testing::internal::StrStreamToString(testing::internal::StrStream*) + 274
4 TestWebKitAPI 0x0000000106fa3174 _ZN7testing8internalL12FlagToEnvVarEPKc + 114
5 TestWebKitAPI 0x0000000106f93ca4 testing::internal::BoolFromGTestEnv(char const*, bool) + 26
6 TestWebKitAPI 0x0000000106fabc69 _GLOBAL__I_a + 25
7 dyld 0x00007fff66b45da6 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 218
8 dyld 0x00007fff66b45af2 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 46
9 dyld 0x00007fff66b432e4 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 260
10 dyld 0x00007fff66b440b7 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 59
11 dyld 0x00007fff66b394dd dyld::initializeMainExecutable() + 206
12 dyld 0x00007fff66b3d60b dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**) + 1852
13 dyld 0x00007fff66b37059 _dyld_start + 49
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fff66b34370 rcx: 0x00007fff66b34358 rdx: 0x0000000000000000
rdi: 0x00000000000118de rsi: 0x0000000000000006 rbp: 0x00007fff66b34380 rsp: 0x00007fff66b34358
r8: 0x0000000000000000 r9: 0x00007fff8f31a230 r10: 0x00007fff96e28e62 r11: 0xffffff80002d8220
r12: 0x000000010708d000 r13: 0x0000000000000003 r14: 0x000000010708e000 r15: 0x0000000000000003
rip: 0x00007fff96e2782a rfl: 0x0000000000000206 cr2: 0x000000010708e000
Logical CPU: 0
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/11149812>
Simon Fraser (smfr)
Fixing the script error detection via bug 82659.
Stephanie Lewis
Turns out this is the same crashing issue as <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142.
gtest uses a std::stringstream which at some point call stringstream::str() which allocates a new string with fastMalloc and deallocates with system free.
Unfortunately, making gtest not using the c std library is not a useful option. I am curious why gtest needs to include fastMalloc and wtf stuff to start with. If we could remove any internal headers from gtest and TestWebKitAPI we should be able to fix the bug that way.
Another temporary fix would be to go back to the GNU std library.
Stephanie Lewis
FastMalloc was added to gtest in http://trac.webkit.org/changeset/104091 because of crashes using fastFree.
< http://webkit.org/b/66521>
< rdar://problem/10607911>
Csaba Osztrogonác
Release bots now run API tests without any problem, see bug141518 for details.