Closed Bug 1031949 Opened 11 years ago Closed 11 years ago

Crash in GonkDisplay::SwapBuffers() because Framebuffer tries to dup uninitialized Fence [SGS2][JB]

Categories

(Core Graveyard :: Widget: Gonk, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla33

People

(Reporter: _AtilA_, Assigned: _AtilA_)

Details

Attachments

(1 file)

I got this crash on SGS2, but it will probably crash any JellyBean based device that hits direct FrameBuffer rendering code path (not HWComposer). The problem is that FramebufferSurface::GetPrevFBAcquireFd() is being called before mPrevFBAcquireFence has been properly initialized, so the mPrevFBAcquireFence->dup() is segfaulting.
This fixes the issue.
Attachment #8447772 - Flags: review?(sotaro.ikeda.g)
Comment on attachment 8447772 [details] [diff] [review] 0001-Bug-1031949-Crash-in-GonkDisplay-SwapBuffers-because.patch Review of attachment 8447772 [details] [diff] [review]: ----------------------------------------------------------------- 0 could be a valid file descriptor number. Can we use Fence::isValid() for validity check?
(In reply to Sotaro Ikeda [:sotaro] from comment #2) > Comment on attachment 8447772 [details] [diff] [review] > 0001-Bug-1031949-Crash-in-GonkDisplay-SwapBuffers-because.patch > > Review of attachment 8447772 [details] [diff] [review]: > ----------------------------------------------------------------- > > 0 could be a valid file descriptor number. Can we use Fence::isValid() for > validity check? That's actually a pointer - http://hg.mozilla.org/mozilla-central/file/7c794981d046/widget/gonk/libdisplay/FramebufferSurface.h#l80 , so this check is fine AFAIK. isValid() won't work since there's no object to call it on.
Comment on attachment 8447772 [details] [diff] [review] 0001-Bug-1031949-Crash-in-GonkDisplay-SwapBuffers-because.patch Review of attachment 8447772 [details] [diff] [review]: ----------------------------------------------------------------- Sorry, I just misunderstood the patch.
Attachment #8447772 - Flags: review?(sotaro.ikeda.g) → review+
(In reply to Juan Gomez [:_AtilA_] from comment #0) > I got this crash on SGS2, but it will probably crash any JellyBean based > device that hits direct FrameBuffer rendering code path (not HWComposer). > The problem is that FramebufferSurface::GetPrevFBAcquireFd() is being called > before mPrevFBAcquireFence has been properly initialized, so the > mPrevFBAcquireFence->dup() is segfaulting. FWIW, I've only seen this on 4.2 devices.
I have this issue in 4.3. Anyway, reproduce it should be as easy as renaming hwcomposer.device.so to force the device use the framebuffer render path.
Assignee: nobody → atilag
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: