Closed Bug 853976 Opened 11 years ago Closed 11 years ago

Another genlock failure as we are not setting READ_ONLY access mode where we should (inside SyncFrontBufferToBackBuffer)

Categories

(Core :: Graphics: Layers, defect)

Other Branch
ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bjacob, Unassigned)

References

Details

Look at what's going on between frame 8 and frame 7!


#0  __libc_android_abort () at bionic/libc/unistd/abort.c:82
#1  0x40047df2 in perform_lock_unlock_operation (buffer_handle=0x48bfe510, lockType=1, timeout=1000)
    at hardware/qcom/display/libgenlock/genlock.cpp:144
#2  0x40048262 in genlock_lock_buffer (buffer_handle=0x48bfe510, lockType=GENLOCK_WRITE_LOCK, timeout=1000)
    at hardware/qcom/display/libgenlock/genlock.cpp:349
#3  0x4316aeee in gralloc_lock (module=0x4316c250, handle=0x48bfe510, usage=<value optimized out>, l=<value optimized out>, t=0, w=320, h=480, 
    vaddr=0xbec2c88c) at hardware/qcom/display/libgralloc/mapper.cpp:256
#4  0x401bc648 in android::GraphicBufferMapper::lock (this=0x4316c250, handle=<value optimized out>, usage=<value optimized out>, bounds=..., 
    vaddr=0xbec2c88c) at frameworks/base/libs/ui/GraphicBufferMapper.cpp:76
#5  0x401bbb8e in android::GraphicBuffer::lock (this=0x48f0eb80, usage=51, rect=..., vaddr=<value optimized out>)
    at frameworks/base/libs/ui/GraphicBuffer.cpp:175
#6  0x401bbbb6 in android::GraphicBuffer::lock (this=0x0, usage=320, vaddr=0xbec2c88c) at frameworks/base/libs/ui/GraphicBuffer.cpp:162
#7  0x41dfa7f4 in mozilla::layers::ShadowLayerForwarder::PlatformOpenDescriptor (aMode=mozilla::layers::OPEN_READ_WRITE, aSurface=...)
    at /hack/mozilla-graphics/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp:367
#8  0x41df0a36 in mozilla::layers::ShadowLayerForwarder::OpenDescriptor (aMode=mozilla::layers::OPEN_READ_ONLY, aSurface=...)
    at /hack/mozilla-graphics/gfx/layers/ipc/ShadowLayers.cpp:452
#9  0x41df660e in mozilla::layers::TextureClientShmem::GetSurface (this=0x483a26d0) at /hack/mozilla-graphics/gfx/layers/client/TextureClient.cpp:277
#10 0x41df663c in mozilla::layers::TextureClientShmem::LockSurface (this=0x0) at ../../dist/include/mozilla/layers/TextureClient.h:231
#11 0x41dc4800 in mozilla::layers::ThebesLayerBuffer::EnsureBuffer (this=0x49455330) at /hack/mozilla-graphics/gfx/layers/ThebesLayerBuffer.cpp:334
#12 0x41dc4880 in mozilla::layers::ThebesLayerBuffer::GetContextForQuadrantUpdate (this=0x0, aBounds=...)
    at /hack/mozilla-graphics/gfx/layers/ThebesLayerBuffer.cpp:270
#13 0x41de759e in mozilla::layers::ContentClientDoubleBuffered::UpdateDestinationFrom (this=<value optimized out>, aSource=..., aUpdateRegion=...)
    at /hack/mozilla-graphics/gfx/layers/client/ContentClient.cpp:429
#14 0x41de7714 in mozilla::layers::ContentClientDoubleBuffered::SyncFrontBufferToBackBuffer (this=0x49455320)
    at /hack/mozilla-graphics/gfx/layers/client/ContentClient.cpp:417
#15 0x41dba32a in mozilla::layers::BasicThebesLayer::PaintThebes (this=0x44852880, aContext=0x46529630, aMaskLayer=<value optimized out>, 
    aCallback=<value optimized out>, aCallbackData=0xbec2de18, aReadback=0xbec2d0ec)
    at /hack/mozilla-graphics/gfx/layers/basic/BasicThebesLayer.cpp:89
#16 0x41dbaab2 in mozilla::layers::BasicShadowableThebesLayer::PaintThebes (this=0x44852880, aContext=0x46529630, aMaskLayer=<value optimized out>, 
    aCallback=0x40e233f1 <mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, nsIntRegion const&, void*)>, aCallbackData=0xbec2de18, aReadback=0xbec2d0ec) at /hack/mozilla-graphics/gfx/layers/basic/BasicThebesLayer.cpp:265
#17 0x41db3920 in mozilla::layers::BasicLayerManager::PaintSelfOrChildren (this=0x47be3420, aPaintContext=..., aGroupTarget=0x46529630)
    at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:831
#18 0x41db3ef6 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x47be3420, aTarget=0x46529630, aLayer=0x44852880, 
    aCallback=<value optimized out>, aCallbackData=0xbec2de18, aReadback=0xbec2d0ec)
    at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:938
#19 0x41db39ee in mozilla::layers::BasicLayerManager::PaintSelfOrChildren (this=0x47be3420, aPaintContext=..., aGroupTarget=0x46529630)
    at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:846
#20 0x41db3ef6 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x47be3420, aTarget=0x46529630, aLayer=0x4931b400, 
    aCallback=<value optimized out>, aCallbackData=0xbec2de18, aReadback=0xbec2d534)
    at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:938
#21 0x41db39ee in mozilla::layers::BasicLayerManager::PaintSelfOrChildren (this=0x47be3420, aPaintContext=..., aGroupTarget=0x46529630)
    at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:846
#22 0x41db3ef6 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x47be3420, aTarget=0x46529630, aLayer=0x4931ac00, 
    aCallback=<value optimized out>, aCallbackData=0xbec2de18, aReadback=0x0) at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:938
#23 0x41db4a68 in mozilla::layers::BasicLayerManager::EndTransactionInternal (this=0x47be3420, aCallback=<value optimized out>, 
    aCallbackData=<value optimized out>, aFlags=<value optimized out>) at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:591
#24 0x41db4bca in mozilla::layers::BasicLayerManager::EndTransaction (this=0x0, aCallback=0x140, aCallbackData=0x1e0, aFlags=3200436364)
    at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:510
#25 0x41db502c in mozilla::layers::BasicShadowLayerManager::EndTransaction (this=0x0, aCallback=warning: (Internal error: pc 0x140 in read in psymtab, but not in symtab.)

0x140, aCallbackData=0x1e0, aFlags=3200436364)
    at /hack/mozilla-graphics/gfx/layers/basic/BasicLayerManager.cpp:1157
#26 0x40e5c52a in nsDisplayList::PaintForFrame (this=<value optimized out>, aBuilder=0xbec2de18, aCtx=<value optimized out>, 
    aForFrame=<value optimized out>, aFlags=13) at /hack/mozilla-graphics/layout/base/nsDisplayList.cpp:1172
#27 0x40e5c762 in nsDisplayList::PaintRoot (this=0xbec2e1a0, aBuilder=0xbec2de18, aCtx=0x0, aFlags=13)
    at /hack/mozilla-graphics/layout/base/nsDisplayList.cpp:1033
#28 0x40e76fa4 in nsLayoutUtils::PaintFrame (aRenderingContext=<value optimized out>, aFrame=0x47e06298, aDirtyRegion=<value optimized out>, 
    aBackstop=<value optimized out>, aFlags=772) at /hack/mozilla-graphics/layout/base/nsLayoutUtils.cpp:2038
#29 0x40e8c31e in PresShell::Paint (this=0x43ed6380, aViewToPaint=0x47be0970, aDirtyRegion=<value optimized out>, aFlags=<value optimized out>)
    at /hack/mozilla-graphics/layout/base/nsPresShell.cpp:5618
#30 0x412c2fd2 in nsViewManager::ProcessPendingUpdatesForView (this=0x47b61400, aView=0x47be0970, aFlushDirtyRegion=<value optimized out>)
    at /hack/mozilla-graphics/view/src/nsViewManager.cpp:400
#31 0x412c307a in nsViewManager::ProcessPendingUpdates (this=<value optimized out>) at /hack/mozilla-graphics/view/src/nsViewManager.cpp:1120
#32 0x40e97202 in nsRefreshDriver::Tick (this=<value optimized out>, aNowEpoch=909392216, aNowTime=...)
    at /hack/mozilla-graphics/layout/base/nsRefreshDriver.cpp:960
#33 0x40e977e2 in mozilla::RefreshDriverTimer::TickDriver (aTimer=<value optimized out>, aClosure=<value optimized out>)
    at /hack/mozilla-graphics/layout/base/nsRefreshDriver.cpp:164
#34 mozilla::RefreshDriverTimer::Tick (aTimer=<value optimized out>, aClosure=<value optimized out>)
    at /hack/mozilla-graphics/layout/base/nsRefreshDriver.cpp:156
#35 mozilla::RefreshDriverTimer::TimerTick (aTimer=<value optimized out>, aClosure=<value optimized out>)
    at /hack/mozilla-graphics/layout/base/nsRefreshDriver.cpp:181
#36 0x41d224d2 in nsTimerImpl::Fire (this=0x47554650) at /hack/mozilla-graphics/xpcom/threads/nsTimerImpl.cpp:498
Ah no, GDB got param values wrong there. What's really happening is we're not setting the access mode to read-only where we should.


(gdb) frame 9
#9  0x41df660e in mozilla::layers::TextureClientShmem::GetSurface (this=0x483a26d0) at /hack/mozilla-graphics/gfx/layers/client/TextureClient.cpp:277
277         mSurface = ShadowLayerForwarder::OpenDescriptor(mode, mDescriptor);
(gdb) l
272         }
273         MOZ_ASSERT(mAccessMode == ACCESS_READ_WRITE || mAccessMode == ACCESS_READ_ONLY);
274         OpenMode mode = mAccessMode == ACCESS_READ_WRITE
275                         ? OPEN_READ_WRITE
276                         : OPEN_READ_ONLY;
277         mSurface = ShadowLayerForwarder::OpenDescriptor(mode, mDescriptor);
278       }
279
280       return mSurface.get();
281     }
(gdb) p mAccessMode
$4 = mozilla::layers::TextureClient::ACCESS_READ_WRITE
Summary: Another genlock failure as we are still mis-propagating READ_ONLY as READ_WRITE !! → Another genlock failure as we are not setting READ_ONLY access mode where we should (inside SyncFrontBufferToBackBuffer)
Version: Trunk → Other Branch
Haven't gotten this again recently. Assuming fixed.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.