[emulator-l] b2g crash: Segmentation fault at ../../../gecko/media/libjpeg/simd/jsimd_arm.c:277

RESOLVED DUPLICATE of bug 1184418

Status

Firefox OS
Emulator
RESOLVED DUPLICATE of bug 1184418
3 years ago
3 years ago

People

(Reporter: edgar, Assigned: edgar)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

3 years ago
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 69.524]
0x7ff00000 in ?? ()
(gdb) bt
#0  0x7ff00000 in ?? ()
#1  0xb4d79fe8 in jsimd_ycc_rgb_convert (cinfo=<optimized out>, input_buf=<optimized out>, input_row=<optimized out>, output_buf=<optimized out>, num_rows=0)
    at ../../../gecko/media/libjpeg/simd/jsimd_arm.c:277
#2  0x00000000 in ?? ()
(Assignee)

Comment 1

3 years ago
We still have no idea about what cause this crash. But we found that if we use the standalone emulator build [1] of studio-1.3-release branch [2], this issue isn't occurred any more, we can boot b2g successfully [3] (Thanks to Samael).

And there is another advantage of using standalone build: ideally the host binary generated by standalone build can be used for all platforms (similar idea as bug 1121378), but I haven't try it yet.

However, we have to figure out how to integrate standalone build into full image build, so that we can automatically rebuild emulator when the source repository changes.

Hi Thomas, may I have your opinion on this? Should we go with this direction? Thank you.

[1] The emulator was released via binary since lollipop, so it provides a way to build standalone emulator, see bug #1171774 comment #1 for the details.
[2] https://github.com/android/platform_external_qemu/tree/studio-1.3-release, studio* seems the new branches to release emulator, https://groups.google.com/forum/#!topic/android-emulator-dev/Vr7KKZrmEzs.
[3] I have tried build standalone emulator with lollipop-mr1-release but still unable to boot b2g successfully.
Flags: needinfo?(tzimmermann)
(In reply to Edgar Chen [:edgar][:echen] from comment #1)
> We still have no idea about what cause this crash. But we found that if we
> use the standalone emulator build [1] of studio-1.3-release branch [2], this
> issue isn't occurred any more, we can boot b2g successfully [3] (Thanks to
> Samael).

Are you building from this branch? That's not a pre-built binary, right?

I'm just asking because we'll need all our patches in this branch.

> And there is another advantage of using standalone build: ideally the host
> binary generated by standalone build can be used for all platforms (similar
> idea as bug 1121378), but I haven't try it yet.

There are dependencies between Android HAL drivers and the QEmu code. So I'm rather skeptical if the standalone binary could be used with multiple versions/platforms.

> However, we have to figure out how to integrate standalone build into full
> image build, so that we can automatically rebuild emulator when the source
> repository changes.

Oh, that's not easy, I'd guess. We also have to rebuild the kernel by hand. But automating this sounds like a good idea.

> Hi Thomas, may I have your opinion on this? Should we go with this
> direction? Thank you.

Sure! If you think it makes sense then please explore it. :) The worst thing is that it doesn't work, but then we at least know why.


> [1] The emulator was released via binary since lollipop, so it provides a
> way to build standalone emulator, see bug #1171774 comment #1 for the
> details.
> [2]
> https://github.com/android/platform_external_qemu/tree/studio-1.3-release,
> studio* seems the new branches to release emulator,
> https://groups.google.com/forum/#!topic/android-emulator-dev/Vr7KKZrmEzs.
> [3] I have tried build standalone emulator with lollipop-mr1-release but
> still unable to boot b2g successfully.
Flags: needinfo?(tzimmermann)
(In reply to Edgar Chen [:edgar][:echen] from comment #0)
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 69.524]
> 0x7ff00000 in ?? ()
> (gdb) bt
> #0  0x7ff00000 in ?? ()
> #1  0xb4d79fe8 in jsimd_ycc_rgb_convert (cinfo=<optimized out>,
> input_buf=<optimized out>, input_row=<optimized out>, output_buf=<optimized
> out>, num_rows=0)

num_rows is zero. This looks like a corner case that could crash the code.

>     at ../../../gecko/media/libjpeg/simd/jsimd_arm.c:277
> #2  0x00000000 in ?? ()
(Assignee)

Comment 4

3 years ago
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #2)
> (In reply to Edgar Chen [:edgar][:echen] from comment #1)
> > We still have no idea about what cause this crash. But we found that if we
> > use the standalone emulator build [1] of studio-1.3-release branch [2], this
> > issue isn't occurred any more, we can boot b2g successfully [3] (Thanks to
> > Samael).
> 
> Are you building from this branch? That's not a pre-built binary, right?
> 
> I'm just asking because we'll need all our patches in this branch.
> 

Yes, we built from studio-1.3-release branch, not a pre-built binary.
I haven't porting our patches yet, I would like to fix this crash issue first.
This crash is 100% reproduced during b2g boot-up.

> > And there is another advantage of using standalone build: ideally the host
> > binary generated by standalone build can be used for all platforms (similar
> > idea as bug 1121378), but I haven't try it yet.
> 
> There are dependencies between Android HAL drivers and the QEmu code. So I'm
> rather skeptical if the standalone binary could be used with multiple
> versions/platforms.

Hmm, that could be an problem. I haven't try using standalone binary on ics and kk version yet.
That will be the second stage, I will first focus on porting our changes and making it work on l first.
(Assignee)

Comment 5

3 years ago
Please see comment #1.
Assignee: nobody → echen
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1184418
You need to log in before you can comment on or make changes to this bug.