Bug 1187982
Summary: | Android Emulator doesn't work on 3.18.3 and above | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Sudhir Khanger <sudhir> |
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 22 | CC: | adrian.sandu, drindt, gansalmon, guido.aulisi, itamar, jforbes, jonathan, kernel-maint, madhu.chinakonda, mchehab |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-07-21 04:52:26 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Created attachment 986626 [details]
emulator -verbose output when working under 3.17.4
The problem exists on kernel-3.18.5-201.fc21.x86_64 too. Nexus 4 works for API 10 to API 19 but doesn't with API 21. Nexus 5 and 6 aren't working at all. Other hardware profile work too. I'm having the same problem with kernel 3.18.5-101.fc20.x86_64. Using strace I got these messages looping: ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = -1 EINTR (Interrupted system call) --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} --- rt_sigreturn() = -1 EINTR (Interrupted system call) select(27, [11 25 26], [], [], {0, 0}) = 0 (Timeout) select(27, [11 25 26], [], [], {0, 0}) = 0 (Timeout) ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 ioctl(16, KVM_RUN, 0) = 0 3.18.6-200.fc21.x86_64 from updates-testing also fails to start Android Emulator. 3.18.7-100.fc20.x86_64 works with android 4.4.2 on KVM also with google services. I didn't try android 5, but I don't think this is kernel related. Guido, Yes, 4.x.x works. 5.0 emulator doesn't work. 5.0 emulator work on 3.17.x but doesn't on 3.18.x series. Any reason you think this is not kernel related? Sudhir, can you reproduce without the nvidia driver loaded, in an untainted kernel just to rule that out? Justin, I installed everything from scratch including Fedora 21, Android Studio, SDK, emulator images, etc. I can also reproduce the problem without Nvidia drivers installed. On 3.17.4 which comes with Fedora 21 I see connection refused line but it continues but on 3.18.x and 3.19.x it is stuck at he connection refused error. emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused emulator: ASC 127.0.0.1:1970: Retrying connection. Connector FD = 32 emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused emulator: ASC 127.0.0.1:1970: Retrying connection. Connector FD = 32 Thanks. Created attachment 993767 [details]
dmesg on 3.18.7 without nvidia driver
Created attachment 993768 [details]
dmesg on 3.17.4 without nvidia driver emulator works fine
Created attachment 993769 [details]
Emulator debug-all on 3.17.4
Problem continues to exist in kernel-4.0.0-0.rc1.git1.2.fc23.x86_64. Created attachment 996756 [details]
Android 5.0 emulator debug log
I have been trying out kernel post 3.17.4 which came pre-installed. Android 5.0 emulator works with 3.17.8-300.fc21.x86_64. After that we moved to 3.18.x series and it stopped working.
Did we or upstream change anything related to Android 5.0 emulator that comes in your mind that could cause this issue?
Android Emulator API 22 which was released today is a also not working. Any pointers on how to resolve or pin point this problem would be very much appreciated. After installing kernel-3.19.1-201 everyhing is back working. @Daniel Rindt Are you sure Android emulator 5.0 and 5.1 work on kernel-3.19.1-201? A while back when I tried Rawhide nodebug kernel-4.0.0-0.rc1.git1.2.fc23.x86_64 it didn't work for me. (In reply to Sudhir Khanger from comment #16) > @Daniel Rindt Are you sure Android emulator 5.0 and 5.1 work on > kernel-3.19.1-201? A while back when I tried Rawhide nodebug > kernel-4.0.0-0.rc1.git1.2.fc23.x86_64 it didn't work for me. Absolutely, i wouldn't write it then. (In reply to Sudhir Khanger from comment #16) > @Daniel Rindt Are you sure Android emulator 5.0 and 5.1 work on > kernel-3.19.1-201? A while back when I tried Rawhide nodebug > kernel-4.0.0-0.rc1.git1.2.fc23.x86_64 it didn't work for me. The emulator as said is back working again. But there are quite other issues with the latest kernel. Power saving an usb is just painfully. Same with SATA links which frequently throws issues by writing. Not to forget my ABRT is flooding with MCE stuff which is not to analyze because of empty mcelog. So better stick on 3.17.4-301 for now. I get MCE warning every 15 minutes. It probably has something to do with your system hardware. I had to uninstall abrt to get rid of those. Do you use hardware acceleration for your emulators via kvm? By any chance could you please attach the output of following command. emulator -avd <image-name> -debug all (In reply to Sudhir Khanger from comment #19) > I get MCE warning every 15 minutes. It probably has something to do with > your system hardware. I had to uninstall abrt to get rid of those. It's not really clear to me whats going on there. This looks to me weird. The device is totally new and works fine. But the logs are getting bigger and bigger with "empty" mcelog messages. > Do you use hardware acceleration for your emulators via kvm? Yes with "kvm_intel". > By any chance could you please attach the output of following command. > emulator -avd <image-name> -debug all Attached for you config and debug log as requested. Created attachment 1005230 [details]
emulator configuration
Created attachment 1005231 [details]
emulator debug messages
Created attachment 1008993 [details]
Same problem on 3.19.2 gentoo
A little bit offtopic (I use another distribution .. don't think it matters though) but I seem to have the same problem ..
Adrian, Do you still have Android Emulator 5.0 or above not working with Fedora 3.19.x? BTW I don't think you have to explicitly enable kvm if you had the emulator image created by Android Studio. And neither you want to use emulator64-x86. Simply using 'emulator -avd Nexus_5_API_22' will do the job. Guessing from the name of you emulator image you seem to be using Android Studion. /opt/android-sdk-update-manager/tools/emulator64-x86 -debug all -verbose -gpu on -netdelay none -netspeed full -avd Nexus_5_API_22 -qemu -enable-kvm -m 1024 Thanks. Sorry for the confusion, I'm on Gentoo ( server ). My desktop ( fedora ) doesn't have issues yet ( haven't upgraded either for a while now ). I am using Android Studio .. I don't know what emulator version I have though ( emulator -version doesn't yell anything regarded to a version number ) I was wondering if you guys identified the problem .. maybe you can tell me what exactly was so I can try and cherrypick the patch in my kernel ( I compile my own ). When I said Android emulator version I meant the API_22 part from the Nexus_5_API_22 which you have to choose yourself when creating an emulator image. Ok. Yeah, It was 5.0.1. Also. I too had 3.16.7 without issues then I upgraded to 3.19.2 and the problem appeared. I'm mostly using a Nexus 5 hardware profile with Android API 22 ( Android 5.1 ) and default ( non-google-api ) x86_64 image. Adrian, Daniel above commented that he doesn't have this problems with 3.19.x. Are you saying you are not able to get a working Android emulator 5.x on your system running kernel 3.19.2? Yes. That's why I posted my debug log in thr first place. Also.. Like I said before.. I'm not having this problem on a fedora box.. I'm having it on a gentoo box running a custom build kernel ( with aufs patches and various other tweaks that don't matter in this situation ). Created attachment 1011206 [details]
Android 5 API 22 emulator -debug-all on 3.19.3
Like @Adrian Sandu I too can confirm that Android emulator 5.0 API 22 is still broken on Fedora running 3.19.3-200.fc21.x86_64
*********** MASS BUG UPDATE ************** We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 21 kernel bugs. Fedora 21 has now been rebased to 3.19.5-200.fc21. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you have moved on to Fedora 22, and are still experiencing this issue, please change the version to Fedora 22. If you experience different issues, please open a new bug report for those. The bug still exists on 3.19.5-200.fc21. Same goes for kernel 4.0.1 After much bisect .. Here's the conclusion I got to: It's not a fedora issue. It's a kernel issue. It's been broken since before 3.18.0-rc1 ! Hope this helps !!! [dexter@localhost linux-stable]$ git bisect bad d7a2a246a1b5a0b0c803e800019600051e1e6f1a is the first bad commit commit d7a2a246a1b5a0b0c803e800019600051e1e6f1a Author: Wanpeng Li <wanpeng.li.com> Date: Tue Aug 19 17:04:40 2014 +0800 KVM: x86: #GP when attempts to write reserved bits of Variable Range MTRRs Section 11.11.2.3 of the SDM mentions "All other bits in the IA32_MTRR_PHYSBASEn and IA32_MTRR_PHYSMASKn registers are reserved; the processor generates a general-protection exception(#GP) if software attempts to write to them". This patch do it in kvm. Signed-off-by: Wanpeng Li <wanpeng.li.com> Signed-off-by: Paolo Bonzini <pbonzini> :040000 040000 bbf87a3fa19f36defb6aea6002be8523b292b160 a4fc4fe26a8872c52f0a858b3082c9efd3edfeca M arch [dexter@localhost linux-stable]$ git bisect log git bisect start # good: [bfe01a5ba2490f299e1d2d5508cbbbadd897bbe9] Linux 3.17 git bisect good bfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 # bad: [f114040e3ea6e07372334ade75d1ee0775c355e1] Linux 3.18-rc1 git bisect bad f114040e3ea6e07372334ade75d1ee0775c355e1 # bad: [35a9ad8af0bb0fa3525e6d0d20e32551d226f38e] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next git bisect bad 35a9ad8af0bb0fa3525e6d0d20e32551d226f38e # bad: [683a52a10148e929fb4844f9237f059a47c0b01b] Merge tag 'tty-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty git bisect bad 683a52a10148e929fb4844f9237f059a47c0b01b # good: [76272ab3f348d303eb31a5a061601ca8e0f9c5ce] staging: rtl8821ae: remove driver git bisect good 76272ab3f348d303eb31a5a061601ca8e0f9c5ce # bad: [e4e65676f272adb63655a2ca95207e8212d282f1] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm git bisect bad e4e65676f272adb63655a2ca95207e8212d282f1 # good: [39520eea198a7fbba35f4c7cffb4323f78455716] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid git bisect good 39520eea198a7fbba35f4c7cffb4323f78455716 # good: [57d104c153d3d6d7bea60089e80f37501851ed2c] ufs: add UFS power management support git bisect good 57d104c153d3d6d7bea60089e80f37501851ed2c # skip: [9da48b5502622f9f0e49df957521ec43a0c9f4c1] arm/arm64: KVM: vgic: Fix SGI writes to GICD_I{CS}PENDR0 git bisect skip 9da48b5502622f9f0e49df957521ec43a0c9f4c1 # skip: [7e362919a59e6fc60e08ad1cf0b047291d1ca2e9] arm/arm64: KVM: vgic: Clarify and correct vgic documentation git bisect skip 7e362919a59e6fc60e08ad1cf0b047291d1ca2e9 # skip: [c1bfb577addd4867a82c4f235824a315d5afb94a] arm/arm64: KVM: vgic: switch to dynamic allocation git bisect skip c1bfb577addd4867a82c4f235824a315d5afb94a # bad: [a7c0b07d570848e50fce4d31ac01313484d6b844] KVM: nVMX: nested TPR shadow/threshold emulation git bisect bad a7c0b07d570848e50fce4d31ac01313484d6b844 # bad: [54ad89b05ec49b90790de814647b244d3d2cc5ca] kvm: x86: fix tracing for 32-bit git bisect bad 54ad89b05ec49b90790de814647b244d3d2cc5ca # bad: [592f085847f4ea753586dfe6ce75ba37d5992a45] KVM: emulate: do not return X86EMUL_PROPAGATE_FAULT explicitly git bisect bad 592f085847f4ea753586dfe6ce75ba37d5992a45 # good: [adfb5d2746bfbe692324bd26a6de05a3a036b38e] KVM: x86: fix check legal type of Variable Range MTRRs git bisect good adfb5d2746bfbe692324bd26a6de05a3a036b38e # bad: [1e1b6c26443547b05925ae4a4494884c92eb7d95] KVM: x86: recalculate_apic_map after enabling apic git bisect bad 1e1b6c26443547b05925ae4a4494884c92eb7d95 # bad: [d7a2a246a1b5a0b0c803e800019600051e1e6f1a] KVM: x86: #GP when attempts to write reserved bits of Variable Range MTRRs git bisect bad d7a2a246a1b5a0b0c803e800019600051e1e6f1a # first bad commit: [d7a2a246a1b5a0b0c803e800019600051e1e6f1a] KVM: x86: #GP when attempts to write reserved bits of Variable Range MTRRs Adrian have you thought about filing a bug report upstream. I would do it myself but I am afraid I might miscommunicate. If you do so please post the report link here. Thanks for looking into it. Sure ! https://code.google.com/p/android/issues/detail?id=174557 https://bugzilla.kernel.org/show_bug.cgi?id=98841 Also mailed the author. Let's hope this gets it fixed. Thank you. You welcome. Can you update this bug's version to 22 ? Bug still present in 4.0.4-301.fc22.x86_64 Still present in 4.0.5-300.fc22.x86_64 Has anyone tried the fix posted on Android Issue tracker? I don't have a Fedora machine to give it a try. https://code.google.com/p/android/issues/detail?id=174557#c10 I can confirm that replacing the bios.bin fixes the issue. https://code.google.com/p/android/issues/detail?id=174557#c10 Workaround is already posted and Google will release an updated emulator at some point of time. This is not Fedora bug. I am closing it. Thanks everyone for investigating and helping resolve this issue. |
Created attachment 986625 [details] emulator -verbose output when not working Description of problem: Android Emulator just shows black screen when run on kernel-3.18.3 and kernel-3.18.4 from updates-testing. It works fine in kernel-3.17.4-301.fc21.x86_64. Version-Release number of selected component (if applicable): How reproducible:Always Steps to Reproduce: 1. emulator -avd <image-name> 2. 3. Actual results: Android Emulator doesn't boot. Just shows a black screen. Expected results: Additional info: