Open Bug 1221055 Opened 10 years ago Updated 3 years ago

valgrind reports many warnings when running mochitest on MacOS

Categories

(Core :: Graphics, defect)

x86_64
macOS
defect

Tracking

()

People

(Reporter: jonco, Unassigned)

Details

(Keywords: valgrind, Whiteboard: [gfx-noted])

Attachments

(1 file)

Attached file mochilog.zip
While investigating bug 1217177 I ran the browser_syncui mochitest on MacOS under valgrind, and it reported many many warnings that appear to be related the system's graphics libraries. I built firefox with: --enable-valgrind --disable-jemalloc --disable-replace-malloc --enable-debug --enable-optimize I ran the test with: mach mochitest --debugger="valgrind" --debugger-args="--smc-check=all-non-file --vex-iropt-register-updates=allregs-at-mem-access --show-mismatched-frees=no --dsymutil=yes" browser_syncui.js Some examples are: ==97458== Conditional jump or move depends on uninitialised value(s) ==97458== at 0x1005807BF: _CFMachPortCreateWithPort2 (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation) ==97458== by 0x107A6AA76: CVDisplayLink::init() (in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo) ==97458== by 0x107A6A798: CVCGDisplayLink::initWithCGDisplays(unsigned int*, long, int*) (in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo) ==97458== by 0x107A6A5DE: CVDisplayLinkCreateWithCGDisplays (in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo) ==97458== by 0x107A6C528: CVDisplayLinkCreateWithActiveCGDisplays (in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo) ==97458== by 0x10A9299AA: OSXVsyncSource::OSXDisplay::EnableVsync() (gfxPlatformMac.cpp:510) ==97458== by 0x10A928C3D: gfxPlatformMac::CreateHardwareVsyncSource() (gfxPlatformMac.cpp:627) ==97458== by 0x10A923136: gfxPlatform::Init() (gfxPlatform.cpp:628) ==97458== by 0x10A922064: gfxPlatform::GetPlatform() (gfxPlatform.cpp:455) ==97458== by 0x10C7C648A: nsRefreshDriver::ChooseTimer() const (nsRefreshDriver.cpp:699) ==97458== by 0x10C7C78A3: nsRefreshDriver::EnsureTimerStarted(nsRefreshDriver::EnsureTimerStartedFlags) (nsRefreshDriver.cpp:1047) ==97458== by 0x10C7C7A2F: nsRefreshDriver::MostRecentRefresh() const (nsRefreshDriver.cpp:936) ==97458== Thread 34 Compositor: ==97458== Invalid write of size 8 ==97458== at 0x139B4FF4D: IntelStateHeaps::allocateHeap(IntelStateHeaps::HeapInfo&, unsigned int, unsigned int) (in /System/Library/Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsGLDriver) ==97458== by 0x139B4FE65: IntelStateHeaps::initHeaps(GLDShareGroupRec*) (in /System/Library/Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsGLDriver) ==97458== by 0x139B4F8DB: GenContext::Initialize(GLDContextRec*) (in /System/Library/Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsGLDriver) ==97458== by 0x139B4EFBB: Gen7Context::Initialize(GLDContextRec*) (in /System/Library/Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsGLDriver) ==97458== by 0x139B4E993: glrInitializeContext (in /System/Library/Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsGLDriver) ==97458== by 0x124988E3E: gldCreateContext (in /System/Library/PrivateFrameworks/GPUSupport.framework/Versions/A/Libraries/libGPUSupportMercury.dylib) ==97458== by 0x13694C83D: gliCreateContextWithShared (in /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLEngine.bundle/GLEngine) ==97458== by 0x103FA7BF6: CGLCreateContext (in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL) ==97458== by 0x100D634F4: -[NSOpenGLContext initWithFormat:shareContext:] (in /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit) ==97458== by 0x10A80614E: mozilla::gl::GLContextProviderCGL::CreateForWindow(nsIWidget*) (GLContextProviderCGL.mm:216) ==97458== by 0x10A8F6A19: mozilla::layers::CompositorOGL::CreateContext() (CompositorOGL.cpp:125) ==97458== by 0x10A8F6FAF: mozilla::layers::CompositorOGL::Initialize() (CompositorOGL.cpp:220) ==97458== Address 0x132f2e038 is not stack'd, malloc'd or (recently) free'd ==97458== Invalid write of size 8 ==97458== at 0x1057D6C75: _platform_bzero$VARIANT$Unknown (in /usr/lib/system/libsystem_platform.dylib) ==97458== by 0x1234402E23BD: gldReadTextureData (in /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver) ==97458== by 0x12344033107E: gldBlitFramebufferData (in /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver) ==97458== by 0x123440331290: gldBlitFramebufferData (in /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver) ==97458== by 0x136AF2260: gliUpdateDispatchState (in /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLEngine.bundle/GLEngine) ==97458== by 0x136A664E9: gleBindFramebuffer (in /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLEngine.bundle/GLEngine) ==97458== by 0x1369A1578: glBindFramebuffer_Exec (in /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLEngine.bundle/GLEngine) ==97458== by 0x10A7E22B0: mozilla::gl::GLContext::InitWithPrefix(char const*, bool) (GLContext.h:1929) ==97458== by 0x10A8061EF: mozilla::gl::GLContextProviderCGL::CreateForWindow(nsIWidget*) (GLContextProviderCGL.mm:251) ==97458== by 0x10A8F6A19: mozilla::layers::CompositorOGL::CreateContext() (CompositorOGL.cpp:125) ==97458== by 0x10A8F6FAF: mozilla::layers::CompositorOGL::Initialize() (CompositorOGL.cpp:220) ==97458== by 0x10A8D7516: mozilla::layers::CompositorParent::InitializeLayerManager(nsTArray<mozilla::layers::LayersBackend> const&) (CompositorParent.cpp:1454) ==97458== Address 0x12436b000 is not stack'd, malloc'd or (recently) free'd Full log is attached.
Keywords: valgrind
Most of those are due to Valgrind not correctly tracking which parts of the address space are validly addressable. That can happen with graphics hardware that is mapped into user space though some magic ioctls. I can look at this further if it is of concern. I suspect there are no mozilla-specific issues, although it is hard to say for sure without looking further at it.
(In reply to Julian Seward [:jseward] from comment #1) No particular concern here, although it would be nice to be able to run Valgrind on MacOS without getting a million warnings. Feel free to close.
Whiteboard: [gfx-noted]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: