-
Notifications
You must be signed in to change notification settings - Fork 107
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
onfocus/onblur implementation #30
Merged
johnrobinsn
merged 2 commits into
pxscene:_temp_pxcore2_stage
from
conniefry:_temp_pxcore2_stage
Jun 26, 2015
Merged
onfocus/onblur implementation #30
johnrobinsn
merged 2 commits into
pxscene:_temp_pxcore2_stage
from
conniefry:_temp_pxcore2_stage
Jun 26, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
johnrobinsn
added a commit
that referenced
this pull request
Jun 26, 2015
onfocus/onblur implementation
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 15, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 15, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 16, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 19, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 19, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 19, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 19, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 20, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 20, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 20, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 21, 2018
Backtrace before (note that it causes stack-overflow): (gdb) bt #0 sincosf (x=-6.16183472, s=s@entry=0x7fffd382066c, c=c@entry=0x7fffd3820668) at pxCore/src/pxMatrix4T.cpp:28 #1 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382069c, c=c@entry=0x7fffd3820698) at pxCore/src/pxMatrix4T.cpp:28 #2 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206cc, c=c@entry=0x7fffd38206c8) at pxCore/src/pxMatrix4T.cpp:28 #3 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206fc, c=c@entry=0x7fffd38206f8) at pxCore/src/pxMatrix4T.cpp:28 #4 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382072c, c=c@entry=0x7fffd3820728) at pxCore/src/pxMatrix4T.cpp:28 #5 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382075c, c=c@entry=0x7fffd3820758) at pxCore/src/pxMatrix4T.cpp:28 #6 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382078c, c=c@entry=0x7fffd3820788) at pxCore/src/pxMatrix4T.cpp:28 #7 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207bc, c=c@entry=0x7fffd38207b8) at pxCore/src/pxMatrix4T.cpp:28 #8 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207ec, c=c@entry=0x7fffd38207e8) at pxCore/src/pxMatrix4T.cpp:28 #9 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382081c, c=c@entry=0x7fffd3820818) at pxCore/src/pxMatrix4T.cpp:28 #10 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382084c, c=c@entry=0x7fffd3820848) at pxCore/src/pxMatrix4T.cpp:28 #11 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382087c, c=c@entry=0x7fffd3820878) at pxCore/src/pxMatrix4T.cpp:28 #12 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208ac, c=c@entry=0x7fffd38208a8) at pxCore/src/pxMatrix4T.cpp:28 #13 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208dc, c=c@entry=0x7fffd38208d8) at pxCore/src/pxMatrix4T.cpp:28 #14 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382090c, c=c@entry=0x7fffd3820908) at pxCore/src/pxMatrix4T.cpp:28 #15 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382094c, c=c@entry=0x7fffd3820948) at pxCore/src/pxMatrix4T.cpp:28 #16 0x00000000004614bc in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #17 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #18 pxObject::applyMatrix (this=0x1d3ab80, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #19 0x000000000048b9e1 in pxObject::drawInternal (this=0x1d3ab80, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #20 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc790, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #21 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #22 0x000000000048bad6 in pxObject::drawInternal (this=0x1d0ed70, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#23 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc280, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#24 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#25 0x000000000048bad6 in pxObject::drawInternal (this=0x1c620b0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#26 0x000000000048bf02 in pxObject::drawInternal (this=0x1786380, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#27 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#28 0x00000000004b11e1 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 pxscene#29 0x0000000000486df4 in pxScene2d::onUpdate (this=0x1786190, t=1519218877) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 pxscene#30 0x00000000004affb8 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 pxscene#31 0x00000000004b063a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#32 0x00007fba9acf92e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#33 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#34 0x00007fba9acf93d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#35 0x00000000004afb98 in pxMain (argc=<optimized out>, argv=0x7fffd3821458) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#36 0x00007fba9a02200a in __libc_start_main (main=0x45b150 <main(int, char**)>, argc=2, argv=0x7fffd3821458, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffd3821448) at ../csu/libc-start.c:308 pxscene#37 0x000000000045b90a in _start () Backtrace after (x86_64 platform): (gdb) bt #0 sincosf () at ../sysdeps/x86_64/fpu/s_sincosf.S:77 <-- built-in version #1 0x000000000046150c in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #2 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #3 pxObject::applyMatrix (this=0x340f610, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #4 0x000000000048ba31 in pxObject::drawInternal (this=0x340f610, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #5 0x000000000048bf52 in pxObject::drawInternal (this=0x3458940, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #6 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5c30, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #7 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #8 0x000000000048c5f7 in pxObject::createSnapshot (this=this@entry=0x34a92f0, fbo=..., separateContext=separateContext@entry=false, antiAliasing=antiAliasing@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1556 #9 0x000000000048bdb3 in pxObject::drawInternal (this=0x34a92f0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1343 #10 0x000000000048bf52 in pxObject::drawInternal (this=0x3484670, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #11 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5ab0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #12 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #13 0x000000000048bb26 in pxObject::drawInternal (this=0x3432b50, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #14 0x000000000048bf52 in pxObject::drawInternal (this=0x33b51a0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #15 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #16 0x000000000048bb26 in pxObject::drawInternal (this=0x3396d60, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #17 0x000000000048bf52 in pxObject::drawInternal (this=0x2e444b0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #18 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #19 0x00000000004b1231 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 #20 0x0000000000486e44 in pxScene2d::onUpdate (this=0x2e5f7b0, t=1519220497) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 #21 0x00000000004b0008 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 #22 0x00000000004b068a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#23 0x00007f830a0c72e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#24 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#25 0x00007f830a0c73d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#26 0x00000000004afbe8 in pxMain (argc=<optimized out>, argv=0x7ffe4b7e2de8) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#27 0x00007f83093f000a in __libc_start_main (main=0x45b1a0 <main(int, char**)>, argc=2, argv=0x7ffe4b7e2de8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe4b7e2dd8) at ../csu/libc-start.c:308 pxscene#28 0x000000000045b95a in _start ()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 21, 2018
Backtrace before (note that it causes stack-overflow): (gdb) bt #0 sincosf (x=-6.16183472, s=s@entry=0x7fffd382066c, c=c@entry=0x7fffd3820668) at pxCore/src/pxMatrix4T.cpp:28 #1 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382069c, c=c@entry=0x7fffd3820698) at pxCore/src/pxMatrix4T.cpp:28 #2 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206cc, c=c@entry=0x7fffd38206c8) at pxCore/src/pxMatrix4T.cpp:28 #3 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206fc, c=c@entry=0x7fffd38206f8) at pxCore/src/pxMatrix4T.cpp:28 #4 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382072c, c=c@entry=0x7fffd3820728) at pxCore/src/pxMatrix4T.cpp:28 #5 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382075c, c=c@entry=0x7fffd3820758) at pxCore/src/pxMatrix4T.cpp:28 #6 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382078c, c=c@entry=0x7fffd3820788) at pxCore/src/pxMatrix4T.cpp:28 #7 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207bc, c=c@entry=0x7fffd38207b8) at pxCore/src/pxMatrix4T.cpp:28 #8 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207ec, c=c@entry=0x7fffd38207e8) at pxCore/src/pxMatrix4T.cpp:28 #9 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382081c, c=c@entry=0x7fffd3820818) at pxCore/src/pxMatrix4T.cpp:28 #10 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382084c, c=c@entry=0x7fffd3820848) at pxCore/src/pxMatrix4T.cpp:28 #11 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382087c, c=c@entry=0x7fffd3820878) at pxCore/src/pxMatrix4T.cpp:28 #12 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208ac, c=c@entry=0x7fffd38208a8) at pxCore/src/pxMatrix4T.cpp:28 #13 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208dc, c=c@entry=0x7fffd38208d8) at pxCore/src/pxMatrix4T.cpp:28 #14 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382090c, c=c@entry=0x7fffd3820908) at pxCore/src/pxMatrix4T.cpp:28 #15 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382094c, c=c@entry=0x7fffd3820948) at pxCore/src/pxMatrix4T.cpp:28 #16 0x00000000004614bc in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #17 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #18 pxObject::applyMatrix (this=0x1d3ab80, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #19 0x000000000048b9e1 in pxObject::drawInternal (this=0x1d3ab80, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #20 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc790, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #21 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #22 0x000000000048bad6 in pxObject::drawInternal (this=0x1d0ed70, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#23 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc280, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#24 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#25 0x000000000048bad6 in pxObject::drawInternal (this=0x1c620b0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#26 0x000000000048bf02 in pxObject::drawInternal (this=0x1786380, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#27 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#28 0x00000000004b11e1 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 pxscene#29 0x0000000000486df4 in pxScene2d::onUpdate (this=0x1786190, t=1519218877) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 pxscene#30 0x00000000004affb8 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 pxscene#31 0x00000000004b063a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#32 0x00007fba9acf92e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#33 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#34 0x00007fba9acf93d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#35 0x00000000004afb98 in pxMain (argc=<optimized out>, argv=0x7fffd3821458) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#36 0x00007fba9a02200a in __libc_start_main (main=0x45b150 <main(int, char**)>, argc=2, argv=0x7fffd3821458, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffd3821448) at ../csu/libc-start.c:308 pxscene#37 0x000000000045b90a in _start () Backtrace after (x86_64 platform): (gdb) bt #0 sincosf () at ../sysdeps/x86_64/fpu/s_sincosf.S:77 <-- built-in version #1 0x000000000046150c in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #2 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #3 pxObject::applyMatrix (this=0x340f610, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #4 0x000000000048ba31 in pxObject::drawInternal (this=0x340f610, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #5 0x000000000048bf52 in pxObject::drawInternal (this=0x3458940, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #6 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5c30, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #7 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #8 0x000000000048c5f7 in pxObject::createSnapshot (this=this@entry=0x34a92f0, fbo=..., separateContext=separateContext@entry=false, antiAliasing=antiAliasing@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1556 #9 0x000000000048bdb3 in pxObject::drawInternal (this=0x34a92f0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1343 #10 0x000000000048bf52 in pxObject::drawInternal (this=0x3484670, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #11 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5ab0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #12 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #13 0x000000000048bb26 in pxObject::drawInternal (this=0x3432b50, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #14 0x000000000048bf52 in pxObject::drawInternal (this=0x33b51a0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #15 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #16 0x000000000048bb26 in pxObject::drawInternal (this=0x3396d60, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #17 0x000000000048bf52 in pxObject::drawInternal (this=0x2e444b0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #18 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #19 0x00000000004b1231 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 #20 0x0000000000486e44 in pxScene2d::onUpdate (this=0x2e5f7b0, t=1519220497) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 #21 0x00000000004b0008 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 #22 0x00000000004b068a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#23 0x00007f830a0c72e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#24 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#25 0x00007f830a0c73d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#26 0x00000000004afbe8 in pxMain (argc=<optimized out>, argv=0x7ffe4b7e2de8) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#27 0x00007f83093f000a in __libc_start_main (main=0x45b1a0 <main(int, char**)>, argc=2, argv=0x7ffe4b7e2de8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe4b7e2dd8) at ../csu/libc-start.c:308 pxscene#28 0x000000000045b95a in _start ()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 21, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 21, 2018
Backtrace before (note that it causes stack-overflow): (gdb) bt #0 sincosf (x=-6.16183472, s=s@entry=0x7fffd382066c, c=c@entry=0x7fffd3820668) at pxCore/src/pxMatrix4T.cpp:28 #1 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382069c, c=c@entry=0x7fffd3820698) at pxCore/src/pxMatrix4T.cpp:28 #2 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206cc, c=c@entry=0x7fffd38206c8) at pxCore/src/pxMatrix4T.cpp:28 #3 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206fc, c=c@entry=0x7fffd38206f8) at pxCore/src/pxMatrix4T.cpp:28 #4 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382072c, c=c@entry=0x7fffd3820728) at pxCore/src/pxMatrix4T.cpp:28 #5 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382075c, c=c@entry=0x7fffd3820758) at pxCore/src/pxMatrix4T.cpp:28 #6 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382078c, c=c@entry=0x7fffd3820788) at pxCore/src/pxMatrix4T.cpp:28 #7 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207bc, c=c@entry=0x7fffd38207b8) at pxCore/src/pxMatrix4T.cpp:28 #8 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207ec, c=c@entry=0x7fffd38207e8) at pxCore/src/pxMatrix4T.cpp:28 #9 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382081c, c=c@entry=0x7fffd3820818) at pxCore/src/pxMatrix4T.cpp:28 #10 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382084c, c=c@entry=0x7fffd3820848) at pxCore/src/pxMatrix4T.cpp:28 #11 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382087c, c=c@entry=0x7fffd3820878) at pxCore/src/pxMatrix4T.cpp:28 #12 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208ac, c=c@entry=0x7fffd38208a8) at pxCore/src/pxMatrix4T.cpp:28 #13 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208dc, c=c@entry=0x7fffd38208d8) at pxCore/src/pxMatrix4T.cpp:28 #14 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382090c, c=c@entry=0x7fffd3820908) at pxCore/src/pxMatrix4T.cpp:28 #15 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382094c, c=c@entry=0x7fffd3820948) at pxCore/src/pxMatrix4T.cpp:28 #16 0x00000000004614bc in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #17 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #18 pxObject::applyMatrix (this=0x1d3ab80, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #19 0x000000000048b9e1 in pxObject::drawInternal (this=0x1d3ab80, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #20 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc790, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #21 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #22 0x000000000048bad6 in pxObject::drawInternal (this=0x1d0ed70, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#23 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc280, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#24 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#25 0x000000000048bad6 in pxObject::drawInternal (this=0x1c620b0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#26 0x000000000048bf02 in pxObject::drawInternal (this=0x1786380, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#27 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#28 0x00000000004b11e1 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 pxscene#29 0x0000000000486df4 in pxScene2d::onUpdate (this=0x1786190, t=1519218877) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 pxscene#30 0x00000000004affb8 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 pxscene#31 0x00000000004b063a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#32 0x00007fba9acf92e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#33 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#34 0x00007fba9acf93d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#35 0x00000000004afb98 in pxMain (argc=<optimized out>, argv=0x7fffd3821458) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#36 0x00007fba9a02200a in __libc_start_main (main=0x45b150 <main(int, char**)>, argc=2, argv=0x7fffd3821458, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffd3821448) at ../csu/libc-start.c:308 pxscene#37 0x000000000045b90a in _start () Backtrace after (x86_64 platform): (gdb) bt #0 sincosf () at ../sysdeps/x86_64/fpu/s_sincosf.S:77 <-- built-in version #1 0x000000000046150c in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #2 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #3 pxObject::applyMatrix (this=0x340f610, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #4 0x000000000048ba31 in pxObject::drawInternal (this=0x340f610, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #5 0x000000000048bf52 in pxObject::drawInternal (this=0x3458940, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #6 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5c30, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #7 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #8 0x000000000048c5f7 in pxObject::createSnapshot (this=this@entry=0x34a92f0, fbo=..., separateContext=separateContext@entry=false, antiAliasing=antiAliasing@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1556 #9 0x000000000048bdb3 in pxObject::drawInternal (this=0x34a92f0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1343 #10 0x000000000048bf52 in pxObject::drawInternal (this=0x3484670, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #11 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5ab0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #12 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #13 0x000000000048bb26 in pxObject::drawInternal (this=0x3432b50, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #14 0x000000000048bf52 in pxObject::drawInternal (this=0x33b51a0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #15 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #16 0x000000000048bb26 in pxObject::drawInternal (this=0x3396d60, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #17 0x000000000048bf52 in pxObject::drawInternal (this=0x2e444b0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #18 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #19 0x00000000004b1231 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 #20 0x0000000000486e44 in pxScene2d::onUpdate (this=0x2e5f7b0, t=1519220497) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 #21 0x00000000004b0008 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 #22 0x00000000004b068a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#23 0x00007f830a0c72e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#24 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#25 0x00007f830a0c73d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#26 0x00000000004afbe8 in pxMain (argc=<optimized out>, argv=0x7ffe4b7e2de8) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#27 0x00007f83093f000a in __libc_start_main (main=0x45b1a0 <main(int, char**)>, argc=2, argv=0x7ffe4b7e2de8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe4b7e2dd8) at ../csu/libc-start.c:308 pxscene#28 0x000000000045b95a in _start ()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 22, 2018
Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) pxscene#23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) pxscene#24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) pxscene#25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) pxscene#26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) pxscene#27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) pxscene#28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) pxscene#29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) pxscene#30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) pxscene#31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) pxscene#32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) pxscene#33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) pxscene#34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) pxscene#35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) pxscene#36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) pxscene#37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) pxscene#23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) pxscene#24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 22, 2018
Backtrace before (note that it causes stack-overflow): (gdb) bt #0 sincosf (x=-6.16183472, s=s@entry=0x7fffd382066c, c=c@entry=0x7fffd3820668) at pxCore/src/pxMatrix4T.cpp:28 #1 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382069c, c=c@entry=0x7fffd3820698) at pxCore/src/pxMatrix4T.cpp:28 #2 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206cc, c=c@entry=0x7fffd38206c8) at pxCore/src/pxMatrix4T.cpp:28 #3 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206fc, c=c@entry=0x7fffd38206f8) at pxCore/src/pxMatrix4T.cpp:28 #4 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382072c, c=c@entry=0x7fffd3820728) at pxCore/src/pxMatrix4T.cpp:28 #5 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382075c, c=c@entry=0x7fffd3820758) at pxCore/src/pxMatrix4T.cpp:28 #6 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382078c, c=c@entry=0x7fffd3820788) at pxCore/src/pxMatrix4T.cpp:28 #7 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207bc, c=c@entry=0x7fffd38207b8) at pxCore/src/pxMatrix4T.cpp:28 #8 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207ec, c=c@entry=0x7fffd38207e8) at pxCore/src/pxMatrix4T.cpp:28 #9 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382081c, c=c@entry=0x7fffd3820818) at pxCore/src/pxMatrix4T.cpp:28 #10 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382084c, c=c@entry=0x7fffd3820848) at pxCore/src/pxMatrix4T.cpp:28 #11 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382087c, c=c@entry=0x7fffd3820878) at pxCore/src/pxMatrix4T.cpp:28 #12 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208ac, c=c@entry=0x7fffd38208a8) at pxCore/src/pxMatrix4T.cpp:28 #13 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208dc, c=c@entry=0x7fffd38208d8) at pxCore/src/pxMatrix4T.cpp:28 #14 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382090c, c=c@entry=0x7fffd3820908) at pxCore/src/pxMatrix4T.cpp:28 #15 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382094c, c=c@entry=0x7fffd3820948) at pxCore/src/pxMatrix4T.cpp:28 #16 0x00000000004614bc in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #17 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #18 pxObject::applyMatrix (this=0x1d3ab80, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #19 0x000000000048b9e1 in pxObject::drawInternal (this=0x1d3ab80, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #20 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc790, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #21 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #22 0x000000000048bad6 in pxObject::drawInternal (this=0x1d0ed70, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#23 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc280, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#24 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#25 0x000000000048bad6 in pxObject::drawInternal (this=0x1c620b0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#26 0x000000000048bf02 in pxObject::drawInternal (this=0x1786380, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#27 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#28 0x00000000004b11e1 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 pxscene#29 0x0000000000486df4 in pxScene2d::onUpdate (this=0x1786190, t=1519218877) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 pxscene#30 0x00000000004affb8 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 pxscene#31 0x00000000004b063a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#32 0x00007fba9acf92e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#33 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#34 0x00007fba9acf93d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#35 0x00000000004afb98 in pxMain (argc=<optimized out>, argv=0x7fffd3821458) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#36 0x00007fba9a02200a in __libc_start_main (main=0x45b150 <main(int, char**)>, argc=2, argv=0x7fffd3821458, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffd3821448) at ../csu/libc-start.c:308 pxscene#37 0x000000000045b90a in _start () Backtrace after (x86_64 platform): (gdb) bt #0 sincosf () at ../sysdeps/x86_64/fpu/s_sincosf.S:77 <-- built-in version #1 0x000000000046150c in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #2 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #3 pxObject::applyMatrix (this=0x340f610, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #4 0x000000000048ba31 in pxObject::drawInternal (this=0x340f610, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #5 0x000000000048bf52 in pxObject::drawInternal (this=0x3458940, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #6 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5c30, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #7 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #8 0x000000000048c5f7 in pxObject::createSnapshot (this=this@entry=0x34a92f0, fbo=..., separateContext=separateContext@entry=false, antiAliasing=antiAliasing@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1556 #9 0x000000000048bdb3 in pxObject::drawInternal (this=0x34a92f0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1343 #10 0x000000000048bf52 in pxObject::drawInternal (this=0x3484670, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #11 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5ab0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #12 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #13 0x000000000048bb26 in pxObject::drawInternal (this=0x3432b50, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #14 0x000000000048bf52 in pxObject::drawInternal (this=0x33b51a0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #15 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #16 0x000000000048bb26 in pxObject::drawInternal (this=0x3396d60, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #17 0x000000000048bf52 in pxObject::drawInternal (this=0x2e444b0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #18 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #19 0x00000000004b1231 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 #20 0x0000000000486e44 in pxScene2d::onUpdate (this=0x2e5f7b0, t=1519220497) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 #21 0x00000000004b0008 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 #22 0x00000000004b068a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#23 0x00007f830a0c72e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#24 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#25 0x00007f830a0c73d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#26 0x00000000004afbe8 in pxMain (argc=<optimized out>, argv=0x7ffe4b7e2de8) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#27 0x00007f83093f000a in __libc_start_main (main=0x45b1a0 <main(int, char**)>, argc=2, argv=0x7ffe4b7e2de8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe4b7e2dd8) at ../csu/libc-start.c:308 pxscene#28 0x000000000045b95a in _start ()
mfiess
pushed a commit
that referenced
this pull request
Feb 27, 2018
) Fixes the following data race: WARNING: ThreadSanitizer: data race (pid=10382) Write of size 1 at 0x7b44001817aa by thread T31 (mutexes: write M68656): #0 pxWayland::connectToRemoteObject() pxCore/examples/pxScene2d/src/pxWayland.cpp:713 (pxscene+0x00000058ea65) #1 pxWayland::findRemoteThread(void*) pxCore/examples/pxScene2d/src/pxWayland.cpp:643 (pxscene+0x00000058e625) #2 <null> <null> (libtsan.so.0+0x0000000257eb) Previous write of size 1 at 0x7b44001817aa by main thread (mutexes: write M357): #0 pxWayland::terminateClient() pxCore/examples/pxScene2d/src/pxWayland.cpp:579 (pxscene+0x00000058e2c4) #1 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:94 (pxscene+0x00000058bd42) #2 pxWayland::~pxWayland() pxCore/examples/pxScene2d/src/pxWayland.cpp:96 (pxscene+0x00000058bdef) #3 pxWayland::Release() pxCore/examples/pxScene2d/src/pxWayland.h:66 (pxscene+0x00000058f8d7) #4 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #5 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #6 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #7 pxWaylandContainer::setView(pxWayland*) pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:295 (pxscene+0x000000592128) #8 pxWaylandContainer::dispose() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:68 (pxscene+0x000000590605) #9 pxObject::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:529 (pxscene+0x00000053beb1) #10 pxScene2d::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:1832 (pxscene+0x000000541d21) #11 pxScene2d::dispose_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055ff69) #12 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #13 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #14 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #15 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055befe) #16 pxScriptView::~pxScriptView() <null> (pxscene+0x00000055c015) #17 pxScriptView::Release() <null> (pxscene+0x00000055c0ea) #18 rtRef<pxIView>::asn(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:74 (pxscene+0x000000567ed3) #19 rtRef<pxIView>::operator=(pxIView const*) pxCore/examples/pxScene2d/src/../../../src/rtRef.h:58 (pxscene+0x000000564221) #20 pxViewContainer::setView(pxIView*) <null> (pxscene+0x000000559f65) #21 pxSceneContainer::setScriptView(pxScriptView*) pxCore/examples/pxScene2d/src/pxScene2d.cpp:3374 (pxscene+0x00000054b2ff) #22 pxSceneContainer::dispose() pxCore/examples/pxScene2d/src/pxScene2d.cpp:3405 (pxscene+0x00000054b4d8) #23 pxObject::releaseResources() pxCore/examples/pxScene2d/src/pxScene2d.h:700 (pxscene+0x000000557e12) #24 pxObject::releaseResources_thunk(int, rtValue const*, rtValue&) pxCore/examples/pxScene2d/src/pxScene2d.h:207 (pxscene+0x000000552dfb) #25 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #26 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #27 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #28 WeakCallback pxCore/src/rtScriptNode/rtWrapperUtils.cpp:91 (pxscene+0x0000005db766) #29 v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) ../deps/v8/src/global-handles.cc:1072 (libnode.so.48+0x00000083af5e) #30 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:261 (pxscene+0x0000005d0b74) #31 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #32 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #33 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #34 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #35 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #36 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #37 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #38 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #39 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Location is heap block of size 320 at 0x7b4400181780 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x00000006f766) #1 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fa9) #2 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #3 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #4 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #5 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #6 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #7 uv__queue_done <null> (pxscene+0x00000067b1da) #8 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #9 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #10 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #11 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #12 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #13 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #14 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #15 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M68656 (0x7b4400181898) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 rtMutexNative::rtMutexNative() pxCore/src/unix/rtMutexNative.cpp:6 (pxscene+0x000000599c10) #2 rtMutex::rtMutex() pxCore/src/unix/../rtMutex.h:30 (pxscene+0x0000004e6fea) #3 pxWayland::pxWayland(bool) pxCore/examples/pxScene2d/src/pxWayland.cpp:73 (pxscene+0x00000058baed) #4 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2142 (pxscene+0x000000543fb9) #5 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #6 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #9 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #10 uv__queue_done <null> (pxscene+0x00000067b1da) #11 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #12 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #13 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #14 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #15 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #16 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #17 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #18 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Mutex M357 (0x7b1400000550) created at: #0 pthread_mutex_init <null> (libtsan.so.0+0x00000002971e) #1 v8::internal::ThreadManager::ThreadManager() ../deps/v8/src/v8threads.cc:245 (libnode.so.48+0x000000b3fa1e) #2 rtScriptNode::init() pxCore/src/rtScriptNode/rtScriptNode.cpp:1025 (pxscene+0x0000005c9a49) #3 rtScript::init() pxCore/src/rtScript.cpp:203 (pxscene+0x0000005bc118) #4 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:526 (pxscene+0x000000598491) #5 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) Thread T31 (tid=11324, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000028e03) #1 pxWayland::startRemoteObjectDetection() pxCore/examples/pxScene2d/src/pxWayland.cpp:628 (pxscene+0x00000058e597) #2 pxWayland::createDisplay(rtString) pxCore/examples/pxScene2d/src/pxWayland.cpp:197 (pxscene+0x00000058c514) #3 pxWayland::onInit() pxCore/examples/pxScene2d/src/pxWayland.cpp:107 (pxscene+0x00000058bf09) #4 pxWaylandContainer::onInit() pxCore/examples/pxScene2d/src/pxWaylandContainer.cpp:376 (pxscene+0x000000592763) #5 rtObject::init() pxCore/src/rtObject.cpp:321 (pxscene+0x00000060c4cf) #6 rtObject::init_thunk(int, rtValue const*, rtValue&) pxCore/src/rtObject.h:292 (pxscene+0x00000060ed31) #7 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #8 rtObjectBase::Send(char const*, int, rtValue const*) pxCore/src/rtObject.cpp:444 (pxscene+0x00000060cc80) #9 rtObjectBase::send(char const*) pxCore/src/rtObject.cpp:460 (pxscene+0x00000060cdf0) #10 pxScene2d::createWayland(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:2145 (pxscene+0x00000054402f) #11 pxScene2d::create(rtObjectRef, rtObjectRef&) pxCore/examples/pxScene2d/src/pxScene2d.cpp:1919 (pxscene+0x000000542614) #12 pxScene2d::create_thunk(int, rtValue const*, rtValue&) <null> (pxscene+0x00000055d9d8) #13 rtObjectFunction::Send(int, rtValue const*, rtValue*) pxCore/src/rtObject.cpp:581 (pxscene+0x00000060e36e) #14 rtScriptNodeUtils::rtFunctionWrapper::call(v8::FunctionCallbackInfo<v8::Value> const&) pxCore/src/rtScriptNode/rtFunctionWrapper.cpp:226 (pxscene+0x0000005d0665) #15 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ../deps/v8/src/api-arguments.cc:16 (libnode.so.48+0x0000005844f2) #16 uv__queue_done <null> (pxscene+0x00000067b1da) #17 rtScript::pump() pxCore/src/rtScript.cpp:221 (pxscene+0x0000005bc24c) #18 sceneWindow::onAnimationTimer() pxCore/examples/pxScene2d/src/pxScene.cpp:373 (pxscene+0x000000599b87) #19 pxWindowNative::onAnimationTimerInternal() pxCore/src/wayland_egl/pxWindowNative.cpp:488 (pxscene+0x0000005a199a) #20 pxWindowNative::animateAndRender() pxCore/src/wayland_egl/pxWindowNative.cpp:853 (pxscene+0x0000005a2c70) #21 pxWindowNative::runEventLoop() pxCore/src/wayland_egl/pxWindowNative.cpp:595 (pxscene+0x0000005a1f66) #22 pxEventLoop::run() pxCore/src/wayland_egl/pxEventLoopNative.cpp:19 (pxscene+0x0000005a613d) #23 pxMain(int, char**) pxCore/examples/pxScene2d/src/pxScene.cpp:623 (pxscene+0x00000059860c) #24 main pxCore/src/wayland_egl/pxEventLoopNative.cpp:34 (pxscene+0x0000005a61cb) SUMMARY: ThreadSanitizer: data race pxCore/examples/pxScene2d/src/pxWayland.cpp:713 in pxWayland::connectToRemoteObject()
dwrobel
added a commit
to dwrobel/pxCore
that referenced
this pull request
Feb 27, 2018
Backtrace before (note that it causes stack-overflow): (gdb) bt #0 sincosf (x=-6.16183472, s=s@entry=0x7fffd382066c, c=c@entry=0x7fffd3820668) at pxCore/src/pxMatrix4T.cpp:28 #1 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382069c, c=c@entry=0x7fffd3820698) at pxCore/src/pxMatrix4T.cpp:28 #2 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206cc, c=c@entry=0x7fffd38206c8) at pxCore/src/pxMatrix4T.cpp:28 #3 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206fc, c=c@entry=0x7fffd38206f8) at pxCore/src/pxMatrix4T.cpp:28 #4 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382072c, c=c@entry=0x7fffd3820728) at pxCore/src/pxMatrix4T.cpp:28 #5 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382075c, c=c@entry=0x7fffd3820758) at pxCore/src/pxMatrix4T.cpp:28 #6 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382078c, c=c@entry=0x7fffd3820788) at pxCore/src/pxMatrix4T.cpp:28 #7 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207bc, c=c@entry=0x7fffd38207b8) at pxCore/src/pxMatrix4T.cpp:28 #8 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207ec, c=c@entry=0x7fffd38207e8) at pxCore/src/pxMatrix4T.cpp:28 #9 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382081c, c=c@entry=0x7fffd3820818) at pxCore/src/pxMatrix4T.cpp:28 #10 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382084c, c=c@entry=0x7fffd3820848) at pxCore/src/pxMatrix4T.cpp:28 #11 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382087c, c=c@entry=0x7fffd3820878) at pxCore/src/pxMatrix4T.cpp:28 #12 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208ac, c=c@entry=0x7fffd38208a8) at pxCore/src/pxMatrix4T.cpp:28 #13 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208dc, c=c@entry=0x7fffd38208d8) at pxCore/src/pxMatrix4T.cpp:28 #14 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382090c, c=c@entry=0x7fffd3820908) at pxCore/src/pxMatrix4T.cpp:28 #15 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382094c, c=c@entry=0x7fffd3820948) at pxCore/src/pxMatrix4T.cpp:28 #16 0x00000000004614bc in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #17 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #18 pxObject::applyMatrix (this=0x1d3ab80, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #19 0x000000000048b9e1 in pxObject::drawInternal (this=0x1d3ab80, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #20 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc790, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #21 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #22 0x000000000048bad6 in pxObject::drawInternal (this=0x1d0ed70, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#23 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc280, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#24 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#25 0x000000000048bad6 in pxObject::drawInternal (this=0x1c620b0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 pxscene#26 0x000000000048bf02 in pxObject::drawInternal (this=0x1786380, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 pxscene#27 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 pxscene#28 0x00000000004b11e1 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 pxscene#29 0x0000000000486df4 in pxScene2d::onUpdate (this=0x1786190, t=1519218877) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 pxscene#30 0x00000000004affb8 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 pxscene#31 0x00000000004b063a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#32 0x00007fba9acf92e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#33 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#34 0x00007fba9acf93d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#35 0x00000000004afb98 in pxMain (argc=<optimized out>, argv=0x7fffd3821458) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#36 0x00007fba9a02200a in __libc_start_main (main=0x45b150 <main(int, char**)>, argc=2, argv=0x7fffd3821458, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffd3821448) at ../csu/libc-start.c:308 pxscene#37 0x000000000045b90a in _start () Backtrace after (x86_64 platform): (gdb) bt #0 sincosf () at ../sysdeps/x86_64/fpu/s_sincosf.S:77 <-- built-in version #1 0x000000000046150c in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #2 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #3 pxObject::applyMatrix (this=0x340f610, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #4 0x000000000048ba31 in pxObject::drawInternal (this=0x340f610, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #5 0x000000000048bf52 in pxObject::drawInternal (this=0x3458940, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #6 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5c30, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #7 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #8 0x000000000048c5f7 in pxObject::createSnapshot (this=this@entry=0x34a92f0, fbo=..., separateContext=separateContext@entry=false, antiAliasing=antiAliasing@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1556 #9 0x000000000048bdb3 in pxObject::drawInternal (this=0x34a92f0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1343 #10 0x000000000048bf52 in pxObject::drawInternal (this=0x3484670, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #11 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5ab0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #12 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #13 0x000000000048bb26 in pxObject::drawInternal (this=0x3432b50, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #14 0x000000000048bf52 in pxObject::drawInternal (this=0x33b51a0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #15 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #16 0x000000000048bb26 in pxObject::drawInternal (this=0x3396d60, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #17 0x000000000048bf52 in pxObject::drawInternal (this=0x2e444b0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #18 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #19 0x00000000004b1231 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 #20 0x0000000000486e44 in pxScene2d::onUpdate (this=0x2e5f7b0, t=1519220497) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 #21 0x00000000004b0008 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 #22 0x00000000004b068a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 pxscene#23 0x00007f830a0c72e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 pxscene#24 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 pxscene#25 0x00007f830a0c73d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 pxscene#26 0x00000000004afbe8 in pxMain (argc=<optimized out>, argv=0x7ffe4b7e2de8) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 pxscene#27 0x00007f83093f000a in __libc_start_main (main=0x45b1a0 <main(int, char**)>, argc=2, argv=0x7ffe4b7e2de8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe4b7e2dd8) at ../csu/libc-start.c:308 pxscene#28 0x000000000045b95a in _start ()
mfiess
pushed a commit
that referenced
this pull request
Feb 27, 2018
Backtrace before (note that it causes stack-overflow): (gdb) bt #0 sincosf (x=-6.16183472, s=s@entry=0x7fffd382066c, c=c@entry=0x7fffd3820668) at pxCore/src/pxMatrix4T.cpp:28 #1 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382069c, c=c@entry=0x7fffd3820698) at pxCore/src/pxMatrix4T.cpp:28 #2 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206cc, c=c@entry=0x7fffd38206c8) at pxCore/src/pxMatrix4T.cpp:28 #3 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38206fc, c=c@entry=0x7fffd38206f8) at pxCore/src/pxMatrix4T.cpp:28 #4 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382072c, c=c@entry=0x7fffd3820728) at pxCore/src/pxMatrix4T.cpp:28 #5 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382075c, c=c@entry=0x7fffd3820758) at pxCore/src/pxMatrix4T.cpp:28 #6 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382078c, c=c@entry=0x7fffd3820788) at pxCore/src/pxMatrix4T.cpp:28 #7 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207bc, c=c@entry=0x7fffd38207b8) at pxCore/src/pxMatrix4T.cpp:28 #8 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38207ec, c=c@entry=0x7fffd38207e8) at pxCore/src/pxMatrix4T.cpp:28 #9 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382081c, c=c@entry=0x7fffd3820818) at pxCore/src/pxMatrix4T.cpp:28 #10 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382084c, c=c@entry=0x7fffd3820848) at pxCore/src/pxMatrix4T.cpp:28 #11 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382087c, c=c@entry=0x7fffd3820878) at pxCore/src/pxMatrix4T.cpp:28 #12 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208ac, c=c@entry=0x7fffd38208a8) at pxCore/src/pxMatrix4T.cpp:28 #13 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd38208dc, c=c@entry=0x7fffd38208d8) at pxCore/src/pxMatrix4T.cpp:28 #14 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382090c, c=c@entry=0x7fffd3820908) at pxCore/src/pxMatrix4T.cpp:28 #15 0x00000000004d0a5b in sincosf (x=<optimized out>, s=s@entry=0x7fffd382094c, c=c@entry=0x7fffd3820948) at pxCore/src/pxMatrix4T.cpp:28 #16 0x00000000004614bc in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #17 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7fffd3820a30) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #18 pxObject::applyMatrix (this=0x1d3ab80, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #19 0x000000000048b9e1 in pxObject::drawInternal (this=0x1d3ab80, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #20 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc790, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #21 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #22 0x000000000048bad6 in pxObject::drawInternal (this=0x1d0ed70, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #23 0x000000000048bf02 in pxObject::drawInternal (this=0x1cdc280, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #24 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #25 0x000000000048bad6 in pxObject::drawInternal (this=0x1c620b0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #26 0x000000000048bf02 in pxObject::drawInternal (this=0x1786380, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #27 0x000000000048c9d8 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #28 0x00000000004b11e1 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 #29 0x0000000000486df4 in pxScene2d::onUpdate (this=0x1786190, t=1519218877) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 #30 0x00000000004affb8 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 #31 0x00000000004b063a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 #32 0x00007fba9acf92e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 #33 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 #34 0x00007fba9acf93d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 #35 0x00000000004afb98 in pxMain (argc=<optimized out>, argv=0x7fffd3821458) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 #36 0x00007fba9a02200a in __libc_start_main (main=0x45b150 <main(int, char**)>, argc=2, argv=0x7fffd3821458, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffd3821448) at ../csu/libc-start.c:308 #37 0x000000000045b90a in _start () Backtrace after (x86_64 platform): (gdb) bt #0 sincosf () at ../sysdeps/x86_64/fpu/s_sincosf.S:77 <-- built-in version #1 0x000000000046150c in pxMatrix4T<float>::rotateInRadians (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../ src/pxMatrix4T.h:209 #2 pxMatrix4T<float>::rotateInDegrees (z=1, y=0, x=0, angle=<optimized out>, this=0x7ffe4b7e1ff0) at pxCore/examples/pxScene2d/src/../../../src/pxMatrix4T.h:180 #3 pxObject::applyMatrix (this=0x340f610, m=...) at pxCore/examples/pxScene2d/src/pxScene2d.h:499 #4 0x000000000048ba31 in pxObject::drawInternal (this=0x340f610, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1253 #5 0x000000000048bf52 in pxObject::drawInternal (this=0x3458940, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #6 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5c30, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #7 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #8 0x000000000048c5f7 in pxObject::createSnapshot (this=this@entry=0x34a92f0, fbo=..., separateContext=separateContext@entry=false, antiAliasing=antiAliasing@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1556 #9 0x000000000048bdb3 in pxObject::drawInternal (this=0x34a92f0, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1343 #10 0x000000000048bf52 in pxObject::drawInternal (this=0x3484670, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #11 0x000000000048bf52 in pxObject::drawInternal (this=0x33b5ab0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #12 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #13 0x000000000048bb26 in pxObject::drawInternal (this=0x3432b50, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #14 0x000000000048bf52 in pxObject::drawInternal (this=0x33b51a0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #15 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #16 0x000000000048bb26 in pxObject::drawInternal (this=0x3396d60, maskPass=maskPass@entry=false) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1362 #17 0x000000000048bf52 in pxObject::drawInternal (this=0x2e444b0, maskPass=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:1374 #18 0x000000000048ca28 in non-virtual thunk to pxScene2d::onDraw() () at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2225 #19 0x00000000004b1231 in pxWindowNative::drawFrame (this=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:823 #20 0x0000000000486e44 in pxScene2d::onUpdate (this=0x2e5f7b0, t=1519220497) at pxCore/examples/pxScene2d/src/pxScene2d.cpp:2289 #21 0x00000000004b0008 in sceneWindow::onAnimationTimer (this=<optimized out>) at pxCore/examples/pxScene2d/src/pxScene.cpp:370 #22 0x00000000004b068a in pxWindowNative::onGlutTimer (v=<optimized out>) at pxCore/src/glut/pxWindowNative.cpp:310 #23 0x00007f830a0c72e3 in fghCheckTimers () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:236 #24 glutMainLoopEvent () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:452 #25 0x00007f830a0c73d4 in glutMainLoop () at /usr/src/debug/freeglut-3.0.0-6.fc27.x86_64/src/fg_main.c:489 #26 0x00000000004afbe8 in pxMain (argc=<optimized out>, argv=0x7ffe4b7e2de8) at pxCore/examples/pxScene2d/src/pxScene.cpp:623 #27 0x00007f83093f000a in __libc_start_main (main=0x45b1a0 <main(int, char**)>, argc=2, argv=0x7ffe4b7e2de8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe4b7e2dd8) at ../csu/libc-start.c:308 #28 0x000000000045b95a in _start ()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please review for inclusion in the main pxCore repository.