B2G Emulator: A signal dispatching bug in Linux 2.6.29

RESOLVED FIXED

Status

Firefox OS
Emulator
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Ting-Yuan Huang, Assigned: vicamo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
We need this fix or all the signal handlers can only work by chance on Linux 2.6.29 + goldfish-armv7, which is the default configuration of the Firefox OS emulator.

commit d71e1352e240dea32d481ad8d662e8de4406ac7e
Author: Catalin Marinas <catalin.marinas@arm.com>
Date:   Sat May 30 14:00:15 2009 +0100

    Clear the IT state when invoking a Thumb-2 signal handler
    
    If a process is interrupted during an If-Then block and a signal is
    invoked, the ITSTATE bits must be cleared otherwise the handler would
    not run correctly.
    
    Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Joseph S. Myers <joseph@codesourcery.com>
(Assignee)

Updated

5 years ago
Blocks: 905098
Summary: A signal dispatching bug in Linux 2.6.29 → B2G Emulator: A signal dispatching bug in Linux 2.6.29
(Assignee)

Comment 1

5 years ago
Created attachment 809077 [details]
Github pull request for kernel_goldfish
Assignee: nobody → vyang
Attachment #809077 - Flags: feedback?(thuang)
(Assignee)

Comment 2

5 years ago
Created attachment 809079 [details]
Github pull request for prebuilts/qemu-kernel
Attachment #809079 - Flags: feedback?(thuang)
(Assignee)

Comment 3

5 years ago
Created attachment 809113 [details]
Github pull request for b2g-manifest

For jellybean, its qemu-kernel HEAD is now AOSP tag "android-4.3_r2.1".  We have to track master branch of Mozilla's fork as we have done to B2G ICS to include prebuilt kernel images here.

The qemu-kernel project entry was placed in `base-jb.xml` and is moved to `emulator-jb.xml` in this patch.
Attachment #809113 - Flags: review?(mwu)

Comment 4

5 years ago
I think we actually rely on prebuilts/qemu-kernel, so it can't be removed from base-jb.xml. See build/core/Makefile. I haven't actually tested in a while, so lemme know if that somehow doesn't apply anymore.

Updated

5 years ago
Attachment #809113 - Flags: review?(mwu)

Comment 5

5 years ago
Also, we shouldn't bother upgrading the JB emulator to a fixed 2.6.29 kernel - we can just use 3.4 there. We should modify our emulator launcher script to use the 3.4 kernel.
(Assignee)

Comment 6

5 years ago
(In reply to Michael Wu [:mwu] from comment #4)
> I think we actually rely on prebuilts/qemu-kernel, so it can't be removed
> from base-jb.xml. See build/core/Makefile. I haven't actually tested in a
> while, so lemme know if that somehow doesn't apply anymore.

Thanks.

(In reply to Michael Wu [:mwu] from comment #5)
> Also, we shouldn't bother upgrading the JB emulator to a fixed 2.6.29 kernel
> - we can just use 3.4 there. We should modify our emulator launcher script
> to use the 3.4 kernel.

The qemu-kernel history tree looks like:

  *  commit cc1a057
  |\ summary: Merge "chage default kernel to 3.4"
  | \
  |  * commit 384a196
  | /  summary: chage default kernel to 3.4
  |/
  *  commit ec4a882
  |\ summary: Merge "update 3.4 kernel from commit fb3ea4f"
  | \
  |  |
  |  * commit 5145627 (tag: refs/tags/android-4.3_r2.1) <---------- Gonk JB is here
  |  | summary: update 3.4 kernel from commit fb3ea4f

Before commit 384a196 (chage default kernel to 3.4), we have file system layout:

  .
  |-- arm
  |   |-- 3.4
  |   |   |-- kernel-qemu-armv7
  |   |   `-- vmlinux-qemu-armv7
  |   |-- kernel-qemu-armv7
  |   `-- vmlinux-qemu-armv7

And after:

  .
  |-- arm
  |   |-- 2.6
  |   |   |-- kernel-qemu-armv7
  |   |   `-- vmlinux-qemu-armv7
  |   |-- kernel-qemu-armv7
  |   `-- vmlinux-qemu-armv7

Considering we may have to merge further kernel changes like:

  * commit eb4c2db - fix device lock-up in the kernel space
  * commit 1d8f0ba - enable NSA SELinux support
  ...

then we'll have to revert the change we've done to emulator launcher script to pick up correct kernel images again.  What about:

  1) branch qemu-kernel,
  2) pin the initial HEAD to commit cc1a057 (Merge "chage default kernel to 3.4")
  3) update kernel images with GitHub PR (attachment 809077 [details]) included

This way, we always know how many changes are included in current kernel images and we'll always use kernel images directly under prebuilts/qemu-kernel.  What do you think?
Flags: needinfo?(mwu)
(Reporter)

Comment 7

5 years ago
Comment on attachment 809079 [details]
Github pull request for prebuilts/qemu-kernel

Tested several times and it seemed to work correctly. No failures observed. Without this it always fails against patches in bug 899493.
Attachment #809079 - Flags: feedback?(thuang) → feedback+
(Reporter)

Updated

5 years ago
Attachment #809077 - Flags: feedback?(thuang) → feedback+
(Assignee)

Comment 9

5 years ago
Comment on attachment 809113 [details]
Github pull request for b2g-manifest

Not going to update JB kernel, although it's also tested.  Leave JB unfixed and buy us some time to have a chance to re-evaluate the work needed to upgrade JB kernel to 3.4 directly.
Attachment #809113 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 11

4 years ago
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #9)
> Comment on attachment 809113 [details]
> Github pull request for b2g-manifest
> 
> Not going to update JB kernel, although it's also tested.  Leave JB unfixed
> and buy us some time to have a chance to re-evaluate the work needed to
> upgrade JB kernel to 3.4 directly.

This part is automatically included because of bug 916863 (emulator NFC).
You need to log in before you can comment on or make changes to this bug.