Closed Bug 1064214 Opened 8 years ago Closed 8 years ago

Emulator warning: 'GetPrevFBAcquireFd: FB acquire fence is invalid!'

Categories

(Core :: Graphics, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: tzimmermann, Assigned: sotaro)

References

Details

Attachments

(1 file)

On FirefoxOS for emulator-jb, I see a lot of the following warnings in the logcat:

> E/        (   45): GetPrevFBAcquireFd: FB acquire fence is invalid!

It looks like a duplicate of bug 1047149, which was fixed a while ago, but I just updated and rebuilt Gecko's master branch. The stack trace for the failed function is shown below.

Breakpoint 1, mozilla::GonkDisplayJB::GetPrevFBAcquireFd (this=0x40433340) at ../../../../gecko/widget/gonk/libdisplay/GonkDisplayJB.cpp:310
310	{
(gdb) bt
#0  mozilla::GonkDisplayJB::GetPrevFBAcquireFd (this=0x40433340) at ../../../../gecko/widget/gonk/libdisplay/GonkDisplayJB.cpp:310
#1  0x40f3d256 in mozilla::layers::CompositorOGL::SetFBAcquireFence (this=<optimized out>, aLayer=<optimized out>) at ../../../gecko/gfx/layers/opengl/CompositorOGL.cpp:1430
#2  0x40f3d1de in mozilla::layers::CompositorOGL::SetFBAcquireFence (this=0x4749d980, aLayer=<optimized out>) at ../../../gecko/gfx/layers/opengl/CompositorOGL.cpp:1405
#3  0x40f3d1de in mozilla::layers::CompositorOGL::SetFBAcquireFence (this=0x4749d980, aLayer=<optimized out>) at ../../../gecko/gfx/layers/opengl/CompositorOGL.cpp:1405
#4  0x40f25984 in mozilla::layers::LayerManagerComposite::Render (this=0x46bf2800) at ../../../gecko/gfx/layers/composite/LayerManagerComposite.cpp:701
#5  0x40f25c54 in EndTransaction (aFlags=<optimized out>, this=0x46bf2800, aCallback=<optimized out>, aCallbackData=<optimized out>)
    at ../../../gecko/gfx/layers/composite/LayerManagerComposite.cpp:259
#6  mozilla::layers::LayerManagerComposite::EndTransaction (this=0x46bf2800, aCallback=<optimized out>, aCallbackData=<optimized out>, aFlags=<optimized out>)
    at ../../../gecko/gfx/layers/composite/LayerManagerComposite.cpp:214
#7  0x40f25d32 in mozilla::layers::LayerManagerComposite::EndEmptyTransaction (this=0x46bf2800, aFlags=<optimized out>)
    at ../../../gecko/gfx/layers/composite/LayerManagerComposite.cpp:209
#8  0x40f38d08 in mozilla::layers::CompositorParent::CompositeToTarget (this=0x4737d400, aTarget=0x0, aRect=0x0) at ../../../gecko/gfx/layers/ipc/CompositorParent.cpp:700
#9  0x40a00c80 in DispatchToMethod<FdWatcher, void (FdWatcher::*)()> (method=
    (void (FdWatcher::*)(FdWatcher * const)) 0x40f38e1b <mozilla::layers::CompositorParent::CompositeCallback()>, obj=<optimized out>, arg=<optimized out>)
    at ../../../gecko/ipc/chromium/src/base/tuple.h:383
#10 RunnableMethod<FdWatcher, void (FdWatcher::*)(), Tuple0>::Run (this=<optimized out>) at ../../../gecko/ipc/chromium/src/base/task.h:307
#11 0x40bebd48 in MessageLoop::RunTask (this=0x45fffdf0, task=0x48764f60) at ../../../gecko/ipc/chromium/src/base/message_loop.cc:357
#12 0x40beef8a in MessageLoop::DeferOrRunPendingTask (this=<optimized out>, pending_task=<optimized out>) at ../../../gecko/ipc/chromium/src/base/message_loop.cc:365
#13 0x40bf0cfe in DoWork (this=<optimized out>) at ../../../gecko/ipc/chromium/src/base/message_loop.cc:443
#14 MessageLoop::DoWork (this=0x45fffdf0) at ../../../gecko/ipc/chromium/src/base/message_loop.cc:422
#15 0x40becdf2 in base::MessagePumpDefault::Run (this=0x45c13dc0, delegate=0x45fffdf0) at ../../../gecko/ipc/chromium/src/base/message_pump_default.cc:34
#16 0x40becf7e in MessageLoop::RunInternal (this=0x45fffdf0) at ../../../gecko/ipc/chromium/src/base/message_loop.cc:229
#17 0x40becf96 in RunHandler (this=0x45fffdf0) at ../../../gecko/ipc/chromium/src/base/message_loop.cc:222
#18 MessageLoop::Run (this=0x45fffdf0) at ../../../gecko/ipc/chromium/src/base/message_loop.cc:196
#19 0x40bf1e1c in base::Thread::ThreadMain (this=0x45c12eb0) at ../../../gecko/ipc/chromium/src/base/thread.cc:168
#20 0x40be5f98 in ThreadFunc (closure=<optimized out>) at ../../../gecko/ipc/chromium/src/base/platform_thread_posix.cc:39
#21 0x40086a5c in __thread_entry (func=0x40be5f91 <ThreadFunc(void*)>, arg=0x45c12eb0, tls=0x45ffff00) at bionic/libc/bionic/pthread_create.cpp:92
#22 0x40086bd8 in pthread_create (thread_out=0x45c12eb8, attr=<optimized out>, start_routine=0x78, arg=0x45c12eb0) at bionic/libc/bionic/pthread_create.cpp:201
I confirmed it, I am going to investigate more.
Assignee: nobody → sotaro.ikeda.g
By using a patch of 1054929, I checked the problem. This bug is not related to obsoleted fd close problem. It is just gonk provide invalid fd. emulator seems not support full HwComposer capability. It seems to affect to the problem.
Sotaro,

Since it affects the Emulator, can you please upload a patch to remove the log at: http://mxr.mozilla.org/mozilla-central/source/widget/gonk/libdisplay/FramebufferSurface.cpp#174 .

Or do we have any check/build flag in framework to detect Emulator v/s actual Phone?
Flags: needinfo?(sotaro.ikeda.g)
It seems better just to remove the log.

If we want to do the emulator check, the code becomes like the following.
http://mxr.mozilla.org/mozilla-central/source/content/media/omx/OmxDecoder.cpp#413
Flags: needinfo?(sotaro.ikeda.g)
Attachment #8486123 - Flags: review?(sushilchauhan)
Attachment #8486123 - Flags: review?(sushilchauhan) → review+
https://hg.mozilla.org/mozilla-central/rev/ea0dea3c6a11
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.