Closed Bug 919901 Opened 6 years ago Closed 6 years ago

B2G Emulator: A signal dispatching bug in Linux 2.6.29

Categories

(Firefox OS Graveyard :: Emulator, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: laszio.bugzilla, Assigned: vicamo)

References

Details

Attachments

(2 files, 1 obsolete file)

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>
Blocks: b2g-emulator
Summary: A signal dispatching bug in Linux 2.6.29 → B2G Emulator: A signal dispatching bug in Linux 2.6.29
Assignee: nobody → vyang
Attachment #809077 - Flags: feedback?(thuang)
Attached file Github pull request for b2g-manifest (obsolete) —
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)
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.
Attachment #809113 - Flags: review?(mwu)
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.
(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)
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+
Attachment #809077 - Flags: feedback?(thuang) → feedback+
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
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
(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.