Looks like either a bug in gralloc or in our use. The fact that it
happens on unregisterBuffer() makes me wondering about
https://bugzilla.mozilla.org/show_bug.cgi?id=824666

Le 10/04/2014 17:55, Jose Vidal a écrit :
> El jueves, 10 de abril de 2014 05:26:41 UTC-5, Juan Gómez escribió:
>> Hi Jose,
>> When you run ./run-gdb.sh , it always stop at this line. You only have to 
>> continue (pressing 'c' and <Enter>) and wait for the crash. When this 
>> happens, type: 'bt' and paste the results. Anyway, if I remember correctly, 
>> you are trying to run FirefoxOS in a scale, right? So what you are trying to 
>> achieve is porting FirefoxOS to something that is not a mobile... this is 
>> not a trivial task, and to make it happes I'm afraid that you'll need deeper 
>> knowledge of Gecko, debugging techniques, etc. So be patient and try to read 
>> a lot of code :) ... in the meantime we will try to help you but most of the 
>> times you won't probably get a satisfying answer.
> 
> Hi Juan,
> 
> Yes, I'm to porting B2G in freescale device.
> 
> This is the last gdb, I hope that it help you:
> 
> ---------------
> Remote debugging from host 127.0.0.1
> __dl__start () at bionic/linker/arch/arm/begin.S:35
> 35            mov     r0, sp
> (gdb) c
> Continuing.
> Loading JavaScript value pretty-printers; see js/src/gdb/README.
> If they cause trouble, type: disable pretty-printer .* SpiderMonkey
> 1397058225460 Marionette      INFO    marionette enabled via build flag and 
> pref
> [New Thread 3581.3597]
> 1397058227742 Marionette      INFO    marionette-server.js loaded
> 1397058227925 Marionette      INFO    B2G emulator: no
> 1397058227926 Marionette      INFO    Device detected is var_som_mx6q
> 1397058227927 Marionette      INFO    Listening on port 2828
> 
> 1397058227928 Marionette      INFO    Marionette server ready
> System JS : ERROR 
> jar:file:///system/b2g/omni.ja!/components/SettingsService.js:119 - 
> NS_ERROR_FAILURE: Component returned failure code: 0x80004005 
> (NS_ERROR_FAILURE) [nsISettingsServiceCallback.handle]
> ###################################### forms.js loaded
> ############################### browserElementPanning.js loaded
> ######################## BrowserElementChildPreload.js loaded
> *** UTM:SVC TimerManager:registerTimer - id: user-agent-updates-timer
> Crash reporter : Can't fetch app.reportCrashes. Exception: [Exception... 
> "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) 
> [nsIPrefBranch.getBoolPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  
> location: "JS frame :: chrome://b2g/content/shell.js :: shell_reportCrash :: 
> line 141"  data: no][New Thread 3581.3605]
> WARNING: generic atexit() called from legacy shared library
> XXX FIXME : Got a mozContentEvent: system-message-listener-ready
> ###################################### forms.js loaded
> ############################### browserElementPanning.js loaded
> ######################## BrowserElementChildPreload.js loaded
> XXX FIXME : Got a mozContentEvent: nfc-hardware-state-change
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x42a81290 in ?? ()
>    from 
> /home/jvidal/Projects/imx_fos102/B2G/out/target/product/var_som_mx6q/system/lib/libGAL.so
> (gdb) bt
> #0  0x42a81290 in ?? ()
>    from 
> /home/jvidal/Projects/imx_fos102/B2G/out/target/product/var_som_mx6q/system/lib/libGAL.so
> #1  0x42a823a6 in gcoSURF_Unlock ()
>    from 
> /home/jvidal/Projects/imx_fos102/B2G/out/target/product/var_som_mx6q/system/lib/libGAL.so
> #2  0x42a57498 in gc_gralloc_unregister_buffer(gralloc_module_t const*, 
> native_handle const*) ()
>    from 
> /home/jvidal/Projects/imx_fos102/B2G/out/target/product/var_som_mx6q/system/lib/hw/gralloc_viv.imx6.so
> #3  0x4002e5d8 in gralloc_unregister_buffer (module=<optimized out>, handle=
>     0x512bbf00) at hardware/imx/mx6/libgralloc_wrapper/mapper.cpp:90
> #4  0x4014e4ae in android::GraphicBufferMapper::unregisterBuffer (this=
>     0x4041812c, handle=0x512bbf00)
>     at frameworks/native/libs/ui/GraphicBufferMapper.cpp:66
> #5  0x4014d6b8 in android::GraphicBuffer::free_handle (this=0x512bba80)
>     at frameworks/native/libs/ui/GraphicBuffer.cpp:101
> #6  0x4014d7ce in android::GraphicBuffer::~GraphicBuffer (this=0x512bba80, 
>     __in_chrg=<optimized out>)
>     at frameworks/native/libs/ui/GraphicBuffer.cpp:94
> #7  0x4014d7ec in android::GraphicBuffer::~GraphicBuffer (this=0x512bba80, 
>     __in_chrg=<optimized out>)
>     at frameworks/native/libs/ui/GraphicBuffer.cpp:96
> ---Type <return> to continue, or q <return> to quit---
> #8  0x40f5b0c8 in decStrong (this=0x512bbae4, id=<optimized out>)
>     at ../../../frameworks/native/include/utils/RefBase.h:173
> #9  decStrong (this=0x512bba84, id=<optimized out>)
>     at ../../../frameworks/native/include/ui/ANativeObjectBase.h:66
> #10 ~sp (this=0xbef89824, __in_chrg=<optimized out>)
>     at ../../../frameworks/native/include/utils/StrongPointer.h:149
> #11 mozilla::layers::MagicGrallocBufferHandle::~MagicGrallocBufferHandle 
> (this=
>     0xbef89824, __in_chrg=<optimized out>)
>     at ../../dist/include/mozilla/layers/ShadowLayerUtilsGralloc.h:39
> #12 0x4110055e in 
> IPC::ParamTraits<mozilla::layers::MagicGrallocBufferHandle>::Read 
> (aMsg=0xbef8989c, aIter=<optimized out>, aResult=0xbef89928)
>     at ../../../gecko/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp:133
> #13 0x40f72428 in ReadParam<mozilla::layers::MagicGrallocBufferHandle> (m=
>     0xbef8989c, p=0xbef89928, iter=0xbef89890)
>     at ../../../gecko/ipc/chromium/src/chrome/common/ipc_message_utils.h:121
> #14 Read<mozilla::layers::MagicGrallocBufferHandle> (__iter=0xbef89890, __msg=
>     0xbef8989c, __v=0xbef89928, this=<optimized out>)
>     at _ipdlheaders/mozilla/layers/PLayerTransactionChild.h:506
> #15 mozilla::layers::PLayerTransactionChild::Read (this=<optimized out>, __v=
>     0xbef89928, __msg=0xbef8989c, __iter=0xbef89890)
>     at PLayerTransactionChild.cpp:4905
> #16 0x40f7b202 in 
> mozilla::layers::PLayerTransactionChild::SendPGrallocBufferConstructor 
> (this=0x51bf4840, actor=0x539b1400, size=..., format=@0xbef8990c, 
> ---Type <return> to continue, or q <return> to quit---
>     usage=@0xbef89908, handle=0xbef89928) at PLayerTransactionChild.cpp:142
> #17 0x40f7b280 in 
> mozilla::layers::PLayerTransactionChild::SendPGrallocBufferConstructor 
> (this=0x51bf4840, size=..., format=@0xbef8990c, usage=@0xbef89908, 
>     handle=0xbef89928) at PLayerTransactionChild.cpp:91
> #18 0x41100218 in mozilla::layers::ShadowLayerForwarder::AllocGrallocBuffer (
>     this=<optimized out>, aSize=<optimized out>, aFormat=2, aUsage=307, 
>     aHandle=0xbef89928)
>     at ../../../gecko/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp:416
> #19 0x411370e0 in mozilla::layers::GrallocTextureClientOGL::AllocateGralloc (
>     this=0x539b13a0, aSize=..., aAndroidFormat=2, aUsage=307)
>     at ../../../gecko/gfx/layers/opengl/GrallocTextureClient.cpp:416
> #20 0x41137202 in mozilla::layers::GrallocTextureClientOGL::AllocateForSurface
>     (this=<optimized out>, aSize=...)
>     at ../../../gecko/gfx/layers/opengl/GrallocTextureClient.cpp:361
> #21 0x411152a8 in 
> mozilla::layers::ContentClientRemoteBuffer::CreateAndAllocateTextureClient 
> (this=0x538cdd50, aClient=..., aFlags=16384)
>     at ../../../gecko/gfx/layers/client/ContentClient.cpp:177
> #22 0x411153be in 
> mozilla::layers::ContentClientRemoteBuffer::BuildTextureClients 
> (this=0x538cdd50, aFormat=..., aRect=..., aFlags=1)
>     at ../../../gecko/gfx/layers/client/ContentClient.cpp:216
> #23 0x4111543c in mozilla::layers::ContentClientRemoteBuffer::CreateBuffer (
>     this=0x538cdd50, aType=..., aRect=..., aFlags=1, aBlackDT=0xbef899fc, 
>     aWhiteDT=0xbef89a00)
> ---Type <return> to continue, or q <return> to quit---
>     at ../../../gecko/gfx/layers/client/ContentClient.cpp:241
> #24 0x4110bb92 in mozilla::layers::RotatedContentBuffer::BeginPaint (this=
>     0x538cdd60, aLayer=0x55cbd680, aFlags=1)
>     at ../../../gecko/gfx/layers/RotatedBuffer.cpp:627
> #25 0x41114450 in 
> mozilla::layers::DeprecatedContentClientRemoteBuffer::BeginPaintBuffer 
> (this=<optimized out>, aLayer=<optimized out>, aFlags=<optimized out>)
>     at ../../dist/include/mozilla/layers/ContentClient.h:329
> #26 0x4111332a in mozilla::layers::ClientThebesLayer::PaintThebes (this=
>     0x55cbd680) at ../../../gecko/gfx/layers/client/ClientThebesLayer.cpp:55
> #27 0x4111365a in mozilla::layers::ClientThebesLayer::RenderLayer (this=
>     0x55cbd680) at ../../../gecko/gfx/layers/client/ClientThebesLayer.cpp:103
> #28 0x41112410 in mozilla::layers::ClientContainerLayer::RenderLayer (
>     this=<optimized out>)
>     at ../../../gecko/gfx/layers/client/ClientContainerLayer.h:83
> #29 0x41112410 in mozilla::layers::ClientContainerLayer::RenderLayer (
>     this=<optimized out>)
>     at ../../../gecko/gfx/layers/client/ClientContainerLayer.h:83
> #30 0x41112b74 in mozilla::layers::ClientLayerManager::EndTransactionInternal 
> (
>     this=0x56e07200, aCallback=
>     0x4171f949 
> <mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, 
> gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion 
> const&, void*)>, aCallbackData=0xbef89f64)
>     at ../../../gecko/gfx/layers/client/ClientLayerManager.cpp:191
> ---Type <return> to continue, or q <return> to quit---
> #31 0x41113182 in mozilla::layers::ClientLayerManager::EndTransaction (this=
>     0x56e07200, aCallback=
>     0x4171f949 
> <mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, 
> gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion 
> const&, void*)>, aCallbackData=0xbef89f64, aFlags=
>     mozilla::layers::LayerManager::END_DEFAULT)
>     at ../../../gecko/gfx/layers/client/ClientLayerManager.cpp:214
> #32 0x417466e4 in nsDisplayList::PaintForFrame (this=0xbef89f48, aBuilder=
>     0xbef89f64, aCtx=<optimized out>, aForFrame=<optimized out>, aFlags=13)
>     at ../../../gecko/layout/base/nsDisplayList.cpp:1337
> #33 0x41746868 in nsDisplayList::PaintRoot (this=0xbef89f48, aBuilder=
>     0xbef89f64, aCtx=0x0, aFlags=13)
>     at ../../../gecko/layout/base/nsDisplayList.cpp:1178
> #34 0x4174e478 in nsLayoutUtils::PaintFrame (aRenderingContext=0x0, aFrame=
>     0x527b62b8, aDirtyRegion=<optimized out>, aBackstop=4294967295, 
> aFlags=772)
>     at ../../../gecko/layout/base/nsLayoutUtils.cpp:2426
> #35 0x41717214 in PresShell::Paint (this=0x506ddca0, 
>     aViewToPaint=<optimized out>, aDirtyRegion=..., aFlags=1)
>     at ../../../gecko/layout/base/nsPresShell.cpp:5928
> #36 0x414fd13a in nsViewManager::ProcessPendingUpdatesForView (this=
>     0x5069d7f0, aView=0x528f68d0, aFlushDirtyRegion=<optimized out>)
>     at ../../../gecko/view/src/nsViewManager.cpp:422
> #37 0x4171b9ce in nsRefreshDriver::Tick (this=0x506e1f30, 
> ---Type <return> to continue, or q <return> to quit---
>     aNowEpoch=<optimized out>, aNowTime=...)
>     at ../../../gecko/layout/base/nsRefreshDriver.cpp:1207
> #38 0x4171bd1a in TickDriver (now=<optimized out>, jsnow=1397058243948966, 
>     driver=<optimized out>)
>     at ../../../gecko/layout/base/nsRefreshDriver.cpp:168
> #39 mozilla::RefreshDriverTimer::Tick (this=<optimized out>)
>     at ../../../gecko/layout/base/nsRefreshDriver.cpp:160
> #40 0x40ddc17a in nsTimerImpl::Fire (this=0x527fef00)
>     at ../../../gecko/xpcom/threads/nsTimerImpl.cpp:551
> #41 0x40ddc22a in nsTimerEvent::Run (this=<optimized out>)
>     at ../../../gecko/xpcom/threads/nsTimerImpl.cpp:635
> #42 0x40dda452 in ProcessNextEvent (result=0xbef8a5d7, mayWait=false, this=
>     0x40402470) at ../../../gecko/xpcom/threads/nsThread.cpp:643
> #43 nsThread::ProcessNextEvent (this=0x40402470, mayWait=<optimized out>, 
>     result=0xbef8a5d7) at ../../../gecko/xpcom/threads/nsThread.cpp:567
> #44 0x40dac086 in NS_ProcessNextEvent (thread=<optimized out>, 
>     mayWait=<optimized out>) at 
> ../../../gecko/xpcom/glue/nsThreadUtils.cpp:263
> #45 0x40f0ff4e in mozilla::ipc::MessagePump::Run (this=0x40401e20, aDelegate=
>     0x404fc1a0) at ../../../gecko/ipc/glue/MessagePump.cpp:95
> #46 0x40f04512 in MessageLoop::RunInternal (this=<optimized out>)
>     at ../../../gecko/ipc/chromium/src/base/message_loop.cc:226
> #47 0x40f045c4 in RunHandler (this=0x404fc1a0)
>     at ../../../gecko/ipc/chromium/src/base/message_loop.cc:219
> ---Type <return> to continue, or q <return> to quit---
> #48 MessageLoop::Run (this=0x404fc1a0)
>     at ../../../gecko/ipc/chromium/src/base/message_loop.cc:193
> #49 0x41352e96 in nsBaseAppShell::Run (this=0x50925ca0)
>     at ../../../gecko/widget/xpwidgets/nsBaseAppShell.cpp:164
> #50 0x4196b624 in nsAppStartup::Run (this=0x509fd970)
>     at ../../../../gecko/toolkit/components/startup/nsAppStartup.cpp:276
> #51 0x41947c96 in XREMain::XRE_mainRun (this=0xbef8a81c)
>     at ../../../gecko/toolkit/xre/nsAppRunner.cpp:4008
> #52 0x41948fb0 in XREMain::XRE_main (this=0xbef8a81c, argc=<optimized out>, 
>     argv=<optimized out>, aAppData=<optimized out>)
>     at ../../../gecko/toolkit/xre/nsAppRunner.cpp:4075
> #53 0x41949104 in XRE_main (argc=1, argv=0xbef8c9d4, aAppData=0x261a4, 
>     aFlags=<optimized out>) at ../../../gecko/toolkit/xre/nsAppRunner.cpp:4285
> #54 0x0000b164 in do_main (argv=0xbef8c9d4, argc=1)
>     at ../../../gecko/b2g/app/nsBrowserApp.cpp:163
> #55 main (argc=<optimized out>, argv=<optimized out>)
>     at ../../../gecko/b2g/app/nsBrowserApp.cpp:256
> (gdb) 
> 
> --------------------
> 
> I appreciate any kind of help.
> 
> 
> Thanks in advance.
> 
> 
> Regards,
> 
> Jose
>>
>>
>>
>>
>>
>>
>> On Thu, Apr 10, 2014 at 11:38 AM, Jose Vidal <[email protected]> wrote:
>>
>> El jueves, 10 de abril de 2014 04:34:20 UTC-5, Jose Vidal escribió:
>>
>>
>>> El jueves, 10 de abril de 2014 04:27:23 UTC-5, Alexandre Lissy escribió:
>>
>>>
>>
>>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>
>>>>> I have
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>> 11|root@android:/ # ls system/lib/hw/hwcomposer
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>> hwcomposer.imx6.so        hwcomposer_viv.imx6.so
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>> 11|root@android:/ # ls system/lib/hw/hwcomposer
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>> Which one  hwcomposer do you say ?
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>
>>>> I would say both. But I don't know the difference between yours, this is
>>
>>>
>>
>>>>
>>
>>>
>>
>>>> not what I was expecting. What does |ls -al /system/lib/hw/| show?
>>
>>>
>>
>>>
>>
>>>
>>
>>> I'm renaming of both
>>
>>>
>>
>>>
>>
>>>
>>
>>> hwcomposer.imx6.so  by hwcomposer.imx6.so_backup
>>
>>>
>>
>>> hwcomposer_viv.imx6.so  by hwcomposer_viv.imx6.so_backup
>>
>>>
>>
>>>
>>
>>>
>>
>>> root@android:/ # ls -al /system/lib/hw/
>>
>>>
>>
>>> -rwxrwxr-x system   system       9572 2014-03-28 12:36 audio.a2dp.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system       5436 2014-03-28 12:35 
>>> audio.primary.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system      28148 2014-03-28 12:36 audio.primary.imx6.so
>>
>>>
>>
>>> -rwxrwxr-x system   system      17776 2014-03-28 12:36 
>>> audio.r_submix.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system       5468 2014-03-28 12:36 audio.usb.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system      75236 2014-03-28 12:36 
>>> audio_policy.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system      95768 2014-03-28 12:58 camera.imx6.so
>>
>>>
>>
>>> -rwxrwxr-x system   system       9796 2014-03-28 12:35 gralloc.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system       9856 2014-03-28 12:36 gralloc.imx6.so
>>
>>>
>>
>>> -rw-rw-r-- system   system      18032 2014-03-25 14:00 gralloc_viv.imx6.so
>>
>>>
>>
>>> -rwxrwxr-x system   system      17632 2014-04-04 10:09 
>>> hwcomposer.imx6.so_backup
>>
>>>
>>
>>> -rw-rw-r-- system   system      34108 2014-03-25 14:00 
>>> hwcomposer_viv.imx6.so_backup
>>
>>>
>>
>>> -rwxrwxr-x system   system       9484 2014-03-28 12:36 keystore.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system       5412 2014-03-28 12:35 lights.imx6.so
>>
>>>
>>
>>> -rwxrwxr-x system   system       5372 2014-03-28 12:35 local_time.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system       5372 2014-03-28 12:35 power.default.so
>>
>>>
>>
>>> -rwxrwxr-x system   system      13716 2014-03-28 12:36 power.imx6.so
>>
>>
>>
>> Alexandre,
>>
>>
>>
>> After the changes  I get
>>
>>
>>
>>
>> (gdb) bt
>>
>> #0  __dl__start () at bionic/linker/arch/arm/begin.S:35
>>
>> #1  0x00000000 in ?? ()
>>
>>
>>
>> I see the same result
>>
>>
>>
>>
>> What do you think ?
>>
>>
>>
>>
>>
>> Jose
>>
>> _______________________________________________
>>
>> dev-b2g mailing list
>>
>> [email protected]
>>
>> https://lists.mozilla.org/listinfo/dev-b2g
> 
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
> 

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to