Closed Bug 966136 Opened 7 years ago Closed 7 years ago

Permaorange TEST-UNEXPECTED-FAIL | valgrind-test | valgrind found errors | ==502== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 72 from 66); leak involving PORT_ZAlloc_Util and ctypes and DirectProxyHandler

Categories

(Core :: js-ctypes, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29
Tracking Status
firefox27 --- unaffected
firefox28 --- unaffected
firefox29 --- fixed
firefox-esr24 --- unaffected

People

(Reporter: KWierso, Assigned: markh)

References

Details

(Keywords: intermittent-failure, Whiteboard: [see comment 49])

https://tbpl.mozilla.org/php/getParsedLog.php?id=33843506&tree=Mozilla-Inbound
slave: bld-linux64-ec2-086



}
==502== LEAK SUMMARY:
==502==    definitely lost: 56 bytes in 2 blocks
==502==    indirectly lost: 4,760 bytes in 148 blocks
==502==      possibly lost: 2,041 bytes in 57 blocks
==502==    still reachable: 253,618 bytes in 2,090 blocks
==502==         suppressed: 592,137 bytes in 6,890 blocks
==502== Reachable blocks (those to which a pointer was found) are not shown.
==502== To see them, rerun with: --leak-check=full --show-reachable=yes
==502==
==502== For counts of detected and suppressed errors, rerun with: -v
==502== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 72 from 66)
TEST-UNEXPECTED-FAIL | valgrind-test | valgrind found errors
State Changed: unlock buildroot
program finished with exit code 1
elapsedTime=1161.765694
Component: General Automation → General
Product: Release Engineering → Core
QA Contact: catlee
Version: unspecified → Trunk
==28101== 40 (24 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 2,738 of 5,224
==28101==    at 0x4C26B43: calloc (vg_replace_malloc.c:593)
==28101==    by 0x63AEF65: PR_Calloc (prmem.c:443)
==28101==    by 0x69F236E: PORT_ZAlloc_Util (secport.c:117)
==28101==    by 0x69F1336: SECITEM_AllocItem_Util (secitem.c:28)
==28101==    by 0xA04624B: ffi_call_unix64 (in /builds/slave/fx-team-l64-valgrind-000000000/objdir/toolkit/library/libxul.so)
==28101==    by 0xA045E83: ffi_call (ffi64.c:485)
==28101==    by 0x9CD2583: js::ctypes::FunctionType::Call(JSContext*, unsigned int, JS::Value*) (CTypes.cpp:5855)
==28101==    by 0x9FCA1AC: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
==28101==    by 0x9FCAA97: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:521)
==28101==    by 0x9EF42F4: js::DirectProxyHandler::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:465)
==28101==    by 0x9FA9581: js::CrossCompartmentWrapper::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jswrapper.cpp:468)
==28101==    by 0x9F5B69A: js::Proxy::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:2636)
==28101==    by 0x9F5B781: js::proxy_Call(JSContext*, unsigned int, JS::Value*) (jsproxy.cpp:3079)
==28101==    by 0x9FCA1AC: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
==28101==    by 0x9FC5CBB: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2610)
==28101==    by 0x9FC96C1: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:422)
==28101==    by 0x9FC9EE2: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:484)
==28101==    by 0x9FCA53E: js::InvokeConstructor(JSContext*, JS::CallArgs) (Interpreter.cpp:550)
==28101==    by 0x9FCA7E3: js::InvokeConstructor(JSContext*, JS::Value, unsigned int, JS::Value*, JS::Value*) (Interpreter.cpp:575)
==28101==    by 0x9EF4195: js::DirectProxyHandler::construct(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:473)

regression from bug 924720?  Or has some ctypes change landed recently?
Component: General → js-ctypes
Flags: needinfo?(efaustbmo)
The one from comment 0, ironically enough, is different to all the others. So let's make this bug about the PORT_ZAlloc_Util/ctypes leak. I've filed bug 966673 about the one from comment 0.
Summary: Intermittent TEST-UNEXPECTED-FAIL | valgrind-test | valgrind found errors | ==502== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 72 from 66) → Intermittent TEST-UNEXPECTED-FAIL | valgrind-test | valgrind found errors | ==502== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 72 from 66); leak involving PORT_ZAlloc_Util and ctypes and DirectProxyHandler
The failures in comments 16--41 are all due to the same PORT_ZAlloc_Util/ctypes/DirectProxyHandler leak.
(In reply to Andrew McCreight [:mccr8] from comment #12)
>
> regression from bug 924720?  Or has some ctypes change landed recently?

No. It is unambiguously bug 964922 that is at fault. The first failure on the major branches were seen at the following times:

- https://tbpl.mozilla.org/php/getParsedLog.php?id=33927952&tree=Fx-Team
  Linux x86-64 fx-team valgrind on 2014-01-31 21:20:31
  revision: c21d44250e0c

- https://tbpl.mozilla.org/php/getParsedLog.php?id=33931109&tree=Mozilla-Central
  Linux x86-64 mozilla-central valgrind on 2014-01-31 22:41:41
  revision: 8840c133115a

- https://tbpl.mozilla.org/php/getParsedLog.php?id=33955417&tree=B2g-Inbound
  Linux x86-64 b2g-inbound valgrind on 2014-02-01 14:31:48
  revision: f66e1ff54609

- https://tbpl.mozilla.org/php/getParsedLog.php?id=33956526&tree=Mozilla-Inbound
  Linux x86-64 mozilla-inbound valgrind on 2014-02-01 14:56:40
  revision: 09013fef24b1

The first of these is when bug 964922's patch landed. The remainder are when that patch was merged to the other branches. This isn't intermittent; it has happened on every run since that patch landed.
Whiteboard: [see comment 49]
I'm going to put the keyword back so it will show up for the purpose of starring on TBPL.
Blocks: 964922
Flags: needinfo?(efaustbmo)
Summary: Intermittent TEST-UNEXPECTED-FAIL | valgrind-test | valgrind found errors | ==502== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 72 from 66); leak involving PORT_ZAlloc_Util and ctypes and DirectProxyHandler → Permaorange TEST-UNEXPECTED-FAIL | valgrind-test | valgrind found errors | ==502== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 72 from 66); leak involving PORT_ZAlloc_Util and ctypes and DirectProxyHandler
I can reproduce after reducing the test job to the bare minimum (i.e. reducing |list| in build/pgo/index.html to an empty list).

Here's a longer stack trace:

> 40 (24 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 4,877 of 9,315
>    at 0x4C2C494: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>    by 0x6250018: PR_Calloc (prmem.c:443)
>    by 0x6A9A415: PORT_ZAlloc_Util (secport.c:117)
>    by 0x6A9934D: SECITEM_AllocItem_Util (secitem.c:28)
>    by 0x9E1E653: ffi_call_unix64 (in /home/njn/moz/mi1/cgo64v/toolkit/library/libxul.so)
>    by 0x9E1DEF3: ffi_call (ffi64.c:485)
>    by 0x9AAF64E: js::ctypes::FunctionType::Call(JSContext*, unsigned int, JS::Value*) (CTypes.cpp:5855)
>    by 0x9D90A3E: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
>    by 0x9D922CC: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:522)
>    by 0x9CD09BF: js::DirectProxyHandler::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:465)
>    by 0x9D67A8F: js::CrossCompartmentWrapper::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jswrapper.cpp:468)
>    by 0x9D1C1A4: js::Proxy::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:2636)
>    by 0x9D1C204: js::proxy_Call(JSContext*, unsigned int, JS::Value*) (jsproxy.cpp:3079)
>    by 0x9D90A3E: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
>    by 0x9D8BFD1: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2611)
>    by 0x9D9077B: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:423)
>    by 0x9D90C4C: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:485)
>    by 0x9D963E3: js::InvokeConstructor(JSContext*, JS::CallArgs) (Interpreter.cpp:551)
>    by 0x9D9650D: js::InvokeConstructor(JSContext*, JS::Value, unsigned int, JS::Value*, JS::Value*) (Interpreter.cpp:576)
>    by 0x9CD13AD: js::DirectProxyHandler::construct(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:473)
>    by 0x9D67C1D: js::CrossCompartmentWrapper::construct(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jswrapper.cpp:486)
>    by 0x9D1C326: js::Proxy::construct(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:2655)
>    by 0x9D1C386: js::proxy_Construct(JSContext*, unsigned int, JS::Value*) (jsproxy.cpp:3088)
>    by 0x9D963AC: js::InvokeConstructor(JSContext*, JS::CallArgs) (jscntxtinlines.h:220)
>    by 0x9D8BFAC: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2608)
>    by 0x9D9077B: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:423)
>    by 0x9D90C4C: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:485)
>    by 0x9D922CC: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:522)
>    by 0x9D95557: js::InvokeGetterOrSetter(JSContext*, JSObject*, JS::Value, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:593)
>    by 0x9D504FB: js::Shape::get(JSContext*, JS::Handle<JSObject*>, JSObject*, JSObject*, JS::MutableHandle<JS::Value>) (Shape-inl.h:68)
>    by 0x9D0C023: js::baseops::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsobj.cpp:4319)
>    by 0x9D0D986: js::DirectProxyHandler::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsobj.h:1016)
>    by 0x9D6771B: js::CrossCompartmentWrapper::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jswrapper.cpp:332)
>    by 0x9D29B90: js::Proxy::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsproxy.cpp:2510)
>    by 0x9D29CEA: js::proxy_GetGeneric(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsproxy.cpp:2878)
>    by 0x9D8A928: Interpret(JSContext*, js::RunState&) (jsobj.h:1013)
>    by 0x9D9077B: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:423)
>    by 0x9D969F4: js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value const&, js::ExecuteType, js::AbstractFramePtr, JS::Value*) (Interpreter.cpp:620)
>    by 0x9D97FF3: js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*) (Interpreter.cpp:657)
>    by 0x9CC0B9C: JS_ExecuteScript(JSContext*, JSObject*, JSScript*, JS::Value*) (jsapi.cpp:4748)
>    by 0x9CC0C10: JS_ExecuteScriptVersion(JSContext*, JSObject*, JSScript*, JS::Value*, JSVersion) (jsapi.cpp:4756)
>    by 0x8A17634: mozJSComponentLoader::ObjectForLocation(nsIFile*, nsIURI*, JSObject**, JSScript**, char**, bool, JS::MutableHandle<JS::Value>) (mozJSComponentLoader.cpp:1016)
>    by 0x8A18639: mozJSComponentLoader::ImportInto(nsACString_internal const&, JS::Handle<JSObject*>, JSContext*, JS::MutableHandle<JSObject*>) (mozJSComponentLoader.cpp:1234)
>    by 0x8A193CD: mozJSComponentLoader::Import(nsACString_internal const&, JS::Handle<JS::Value>, JSContext*, unsigned char, JS::MutableHandle<JS::Value>) (mozJSComponentLoader.cpp:1130)
>    by 0x89B10E4: nsXPCComponents_Utils::Import(nsACString_internal const&, JS::Handle<JS::Value>, JSContext*, unsigned char, JS::MutableHandle<JS::Value>) (XPCComponents.cpp:2737)
>    by 0x7D77EEA: NS_InvokeByIndex (xptcinvoke_x86_64_unix.cpp:164)
>    by 0x89FDDC3: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) (XPCWrappedNative.cpp:2389)
>    by 0x8A0174A: XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) (XPCWrappedNativeJSOps.cpp:1281)
>    by 0x9D90AA6: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
>    by 0x9D8BFD1: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2611)
>    by 0x9D9077B: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:423)
>    by 0x9D90C4C: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:485)
>    by 0x9D922CC: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:522)
>    by 0x9D95557: js::InvokeGetterOrSetter(JSContext*, JSObject*, JS::Value, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:593)
>    by 0x9D504FB: js::Shape::get(JSContext*, JS::Handle<JSObject*>, JSObject*, JSObject*, JS::MutableHandle<JS::Value>) (Shape-inl.h:68)
>    by 0x9D0C023: js::baseops::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsobj.cpp:4319)
>    by 0x9D0D986: js::DirectProxyHandler::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsobj.h:1016)
>    by 0x9D6771B: js::CrossCompartmentWrapper::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jswrapper.cpp:332)
>    by 0x9D29B90: js::Proxy::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsproxy.cpp:2510)
>    by 0x9D29CEA: js::proxy_GetGeneric(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsproxy.cpp:2878)
>    by 0x9D8A928: Interpret(JSContext*, js::RunState&) (jsobj.h:1013)
>    by 0x9D9077B: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:423)
>    by 0x9D90C4C: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:485)
>    by 0x9D922CC: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:522)
>    by 0x9D95557: js::InvokeGetterOrSetter(JSContext*, JSObject*, JS::Value, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:593)
>    by 0x9D504FB: js::Shape::get(JSContext*, JS::Handle<JSObject*>, JSObject*, JSObject*, JS::MutableHandle<JS::Value>) (Shape-inl.h:68)
>    by 0x9D0C023: js::baseops::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) (jsobj.cpp:4319)
>    by 0x9D8A93A: Interpret(JSContext*, js::RunState&) (jsobj.h:1016)
>    by 0x9D9077B: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:423)
>    by 0x9D90C4C: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:485)
>    by 0x9CBD7E2: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsfun.cpp:1347)
>    by 0x9D90AA6: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
>    by 0x9D922CC: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:522)
>    by 0x9CD09BF: js::DirectProxyHandler::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:465)
>    by 0x9D67A8F: js::CrossCompartmentWrapper::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jswrapper.cpp:468)
>    by 0x9D1C1A4: js::Proxy::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:2636)
>    by 0x9D1C204: js::proxy_Call(JSContext*, unsigned int, JS::Value*) (jsproxy.cpp:3079)
>    by 0x9D90A3E: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
>    by 0x9D8BFD1: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2611)
>    by 0x9D9077B: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:423)
>    by 0x9D90C4C: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:485)
>    by 0x9CBD7E2: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsfun.cpp:1347)
>    by 0x9D90AA6: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:220)
>    by 0x9D922CC: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:522)
>    by 0x9CC0920: JS_CallFunctionValue(JSContext*, JSObject*, JS::Value, unsigned int, JS::Value*, JS::Value*) (jsapi.cpp:4989)
>    by 0x89FFB2C: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJSClass.cpp:1293)
>    by 0x89EC599: nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJS.cpp:519)
>    by 0x7D78BC9: PrepareAndDispatch (xptcstubs_x86_64_linux.cpp:122)
>    by 0x7D7800A: SharedStub (in /home/njn/moz/mi1/cgo64v/toolkit/library/libxul.so)
>    by 0x7D70B78: nsThread::ProcessNextEvent(bool, bool*) (nsThread.cpp:643)
>    by 0x7D22C80: NS_ProcessNextEvent(nsIThread*, bool) (nsThreadUtils.cpp:263)
>    by 0x7F9ECA0: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (MessagePump.cpp:95)
>    by 0x7F7E189: MessageLoop::RunInternal() (message_loop.cc:226)
>    by 0x7F7E3F7: MessageLoop::Run() (message_loop.cc:219)
>    by 0x8980E37: nsBaseAppShell::Run() (nsBaseAppShell.cpp:161)
>    by 0x9567273: nsAppStartup::Run() (nsAppStartup.cpp:276)
>    by 0x94EC798: XREMain::XRE_mainRun() (nsAppRunner.cpp:4090)
>    by 0x94ECA65: XREMain::XRE_main(int, char**, nsXREAppData const*) (nsAppRunner.cpp:4158)
>    by 0x94ECD0B: XRE_main (nsAppRunner.cpp:4368)
>    by 0x40390E: do_main(int, char**, nsIFile*) (nsBrowserApp.cpp:280)
Depends on: 966823
https://tbpl.mozilla.org/php/getParsedLog.php?id=33985002&tree=Mozilla-Central is green! Yay.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee: nobody → mhammond
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.