Obsolete
Status Update
Comments
ar...@gmail.com <ar...@gmail.com> #2
[Comment deleted]
ar...@gmail.com <ar...@gmail.com> #3
i have endless loop too.
$ tools/emulator -version
Android emulator version 20.0.1.0 (build_id OPENMASTER-403220)
$ grep name /proc/cpuinfo
model name : AMD A8-3850 APU with Radeon(tm) HD Graphics
model name : AMD A8-3850 APU with Radeon(tm) HD Graphics
model name : AMD A8-3850 APU with Radeon(tm) HD Graphics
model name : AMD A8-3850 APU with Radeon(tm) HD Graphics
$ uname -a
Linux alix-co 3.4.7-1-ARCH #1 SMP PREEMPT Sun Jul 29 20:05:01 UTC 2012 i686 GNU/Linux
$ strace tools/emulator -verbose -show-kernel -gpu off -avd AL10VT -qemu -enable-kvm -m 512
i got loop, nothing else:
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb74a2768) = ? ERESTARTNOINTR (To be restarted)
--- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} ---
sigreturn() (mask []) = 120
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb74a2768) = ? ERESTARTNOINTR (To be restarted)
--- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} ---
sigreturn() (mask []) = 120
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb74a2768) = ? ERESTARTNOINTR (To be restarted)
--- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} ---
sigreturn() (mask []) = 120
$ tools/emulator -version
Android emulator version 20.0.1.0 (build_id OPENMASTER-403220)
$ grep name /proc/cpuinfo
model name : AMD A8-3850 APU with Radeon(tm) HD Graphics
model name : AMD A8-3850 APU with Radeon(tm) HD Graphics
model name : AMD A8-3850 APU with Radeon(tm) HD Graphics
model name : AMD A8-3850 APU with Radeon(tm) HD Graphics
$ uname -a
Linux alix-co 3.4.7-1-ARCH #1 SMP PREEMPT Sun Jul 29 20:05:01 UTC 2012 i686 GNU/Linux
$ strace tools/emulator -verbose -show-kernel -gpu off -avd AL10VT -qemu -enable-kvm -m 512
i got loop, nothing else:
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb74a2768) = ? ERESTARTNOINTR (To be restarted)
--- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} ---
sigreturn() (mask []) = 120
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb74a2768) = ? ERESTARTNOINTR (To be restarted)
--- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} ---
sigreturn() (mask []) = 120
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb74a2768) = ? ERESTARTNOINTR (To be restarted)
--- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} ---
sigreturn() (mask []) = 120
me...@thomaskeller.biz <me...@thomaskeller.biz> #4
Same for me here:
$ uname -a
Linux host 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 x86_64 x86_64 GNU/Linux
$ grep name /proc/cpuinfo
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
$ ./emulator -version
Android emulator version 20.0.3.0 (build_id OPENMASTER-427395)
Renaming the `ddms` program temporarily fixed the issue for us as well.
$ uname -a
Linux host 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 x86_64 x86_64 GNU/Linux
$ grep name /proc/cpuinfo
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
$ ./emulator -version
Android emulator version 20.0.3.0 (build_id OPENMASTER-427395)
Renaming the `ddms` program temporarily fixed the issue for us as well.
dr...@gmail.com <dr...@gmail.com> #5
Latest SDK revision is affected too with
Linux 3.6.11-1-ARCH #1 SMP PREEMPT Tue Dec 18 08:57:15 CET 2012 x86_64 GNU/Linux
ArchLinux
Linux 3.6.11-1-ARCH #1 SMP PREEMPT Tue Dec 18 08:57:15 CET 2012 x86_64 GNU/Linux
ArchLinux
[Deleted User] <[Deleted User]> #6
Exactly the same issue for me with latest SDK on more-or-less latest Fedora 18 (kernel 3.8.9-200.fc18.x86_64). Physical machine (not virtual), good spec hardware.
The process interval timer sends a SIGALRM so frequently that there appears not to be enough time for the fork() to complete before the alarm goes off.
The attached file is the source for an LD_PRELOAD library I've written which disables the interval timer just before fork() is called, then re-enables it immediately afterwards. This works around the issue for me without having to move ddms out of the way.
$ make
$ LD_PRELOAD=/path/to/wrapper.so ./emulator64-x86 <arguments>
The process interval timer sends a SIGALRM so frequently that there appears not to be enough time for the fork() to complete before the alarm goes off.
The attached file is the source for an LD_PRELOAD library I've written which disables the interval timer just before fork() is called, then re-enables it immediately afterwards. This works around the issue for me without having to move ddms out of the way.
$ make
$ LD_PRELOAD=/path/to/wrapper.so ./emulator64-x86 <arguments>
a....@gmail.com <a....@gmail.com> #7
Same for me. Running a 2.6.38 Linux kernel, running Android Emulator version 21.1.0. Renaming `ddms` works, for now.
dr...@gmail.com <dr...@gmail.com> #8
[Comment deleted]
dr...@gmail.com <dr...@gmail.com> #9
latest sdk update make all hacks stops working.
thanks google to make things unworkable again!
now I'm just stuck at
emulator: ping command: /opt/android-sdk/tools/ddms ping emulator 22.3.0 "NVIDIA Corporation" "GeForce GT 330M/PCIe/SSE2" "3.3.0 NVIDIA 331.20"
thanks google to make things unworkable again!
now I'm just stuck at
emulator: ping command: /opt/android-sdk/tools/ddms ping emulator 22.3.0 "NVIDIA Corporation" "GeForce GT 330M/PCIe/SSE2" "3.3.0 NVIDIA 331.20"
dr...@gmail.com <dr...@gmail.com> #10
I have endless
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 8226] close(28) = 0
[pid 8226] connect(28, {sa_family=AF_INET, sin_port=htons(1970), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
em...@gmail.com <em...@gmail.com> #11
I switched to genymotion http://www.genymotion.com/ , just works and way faster than that whole kvm hack.
dr...@gmail.com <dr...@gmail.com> #12
thanks.
yes it's just works the way google can't win many years
yes it's just works the way google can't win many years
al...@thinkmassive.org <al...@thinkmassive.org> #13
I have this issue on two machines, both running Ubuntu Server 12.04 64-bit and Android emulator version 22.3.0 (build_id OPENMASTER-887826)
Uninstalling the qemu-kvm package is a workaround that allows the Android emulator to run, but obviously without virtualization extensions. On both machines VT is enabled, and I get the following output whether or not qemu-kvm is installed:
$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
Home workstation - Intel Core2 Quad Q9300 @ 2.50GHz
Linux 3.5.0-23-generic #35~precise1-Ubuntu SMP x86_64 GNU/Linux
Dell PowerEdge R710 - Intel Xeon(R) E5520 @ 2.27GHz
Linux 3.5.0-45-generic #68~precise1-Ubuntu SMP x86_64 GNU/Linux
On a few SuperMicro servers I have the same emulator version, and the same OS+kernel as my home workstation, and they all run fine with -enable-kvm. They all have Intel Xeon E3-1270 v3 @ 3.50GHz.
Uninstalling the qemu-kvm package is a workaround that allows the Android emulator to run, but obviously without virtualization extensions. On both machines VT is enabled, and I get the following output whether or not qemu-kvm is installed:
$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
Home workstation - Intel Core2 Quad Q9300 @ 2.50GHz
Linux 3.5.0-23-generic #35~precise1-Ubuntu SMP x86_64 GNU/Linux
Dell PowerEdge R710 - Intel Xeon(R) E5520 @ 2.27GHz
Linux 3.5.0-45-generic #68~precise1-Ubuntu SMP x86_64 GNU/Linux
On a few SuperMicro servers I have the same emulator version, and the same OS+kernel as my home workstation, and they all run fine with -enable-kvm. They all have Intel Xeon E3-1270 v3 @ 3.50GHz.
di...@android.com <di...@android.com> #14
As can be seen in the source, the SIGALRM is disabled during the fork() and child process execution. This is to avoid exactly that kind of problem, which makes this all the more puzzling. The issue cannot be reproduced locally, unfortunately, but there may be ways to refactor the code for this to happen in a different context.
ko...@gmail.com <ko...@gmail.com> #15
Just updated to latest today (2014/03/26) and am seeing the emulator caught in an endless loop.
KVM was not installed. Installing it didn't change things.
Using 64 bit or 32 bit makes no difference.
emulator -version
Android emulator version 22.6.2.0 (build_id OPENMASTER-1085508)
uname -a
Linux ip-10-216-149-59 3.2.0-24-virtual #39-Ubuntu SMP Mon May 21 18:44:18 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
grep name /proc/cpuinfo
model name : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
model name : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
strace /opt/android/sdk/tools/emulator -no-window -camera-back emulated -avd TEST_EMULATOR -logcat '*:v' -verbose -port 5554
...
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f66a4ea9a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0) = 56
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0) = 56
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f66a4ea9a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0) = 56
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f66a4ea9a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0) = 56
clone( <unfinished ...>
KVM was not installed. Installing it didn't change things.
Using 64 bit or 32 bit makes no difference.
emulator -version
Android emulator version 22.6.2.0 (build_id OPENMASTER-1085508)
uname -a
Linux ip-10-216-149-59 3.2.0-24-virtual #39-Ubuntu SMP Mon May 21 18:44:18 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
grep name /proc/cpuinfo
model name : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
model name : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
strace /opt/android/sdk/tools/emulator -no-window -camera-back emulated -avd TEST_EMULATOR -logcat '*:v' -verbose -port 5554
...
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f66a4ea9a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0) = 56
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0) = 56
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f66a4ea9a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0) = 56
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f66a4ea9a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0) = 56
clone( <unfinished ...>
ps...@gmail.com <ps...@gmail.com> #16
I observed this while building 4.2.2 emulator on ubuntu 12.04. I saw the same clone/SIGALRM loop. It appears to be due to a clone in the pulseaudio code called from external/qemu/audio/paaudio.c. Attached is a patch that works for me. It adds the BEGIN_NOSIGALRM guard.
How many other external library clone() calls need to be guarded like this one???
How many other external library clone() calls need to be guarded like this one???
gu...@gmail.com <gu...@gmail.com> #17
I'm having a similar issue, my system is Fedora 20 x86_64, kernel 3.18.5-101.fc20.x86_64, with or without kvm.
Android tools version is 24.0.2.
emulator64-x86 -avd phone -verbose -qemu -enable-kvm
hangs at the line:
emulator: ping program: /home/guido/android-sdk-linux/tools/ddms
strace dump:
......
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) = -1 EINTR (Interrupted system call)
--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(26, [10 24 25], [], [], {0, 0}) = 0 (Timeout)
select(26, [10 24 25], [], [], {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
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
ioctl(16, KVM_RUN, 0) = 0
ioctl(16, KVM_RUN, 0) = 0
ioctl(16, KVM_RUN, 0) = 0
--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
rt_sigreturn() = 0
select(26, [10 24 25], [], [], {0, 0}) = 0 (Timeout)
select(26, [10 24 25], [], [], {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
....
Android tools version is 24.0.2.
emulator64-x86 -avd phone -verbose -qemu -enable-kvm
hangs at the line:
emulator: ping program: /home/guido/android-sdk-linux/tools/ddms
strace dump:
......
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) = -1 EINTR (Interrupted system call)
--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(26, [10 24 25], [], [], {0, 0}) = 0 (Timeout)
select(26, [10 24 25], [], [], {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
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
ioctl(16, KVM_RUN, 0) = 0
ioctl(16, KVM_RUN, 0) = 0
ioctl(16, KVM_RUN, 0) = 0
--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
rt_sigreturn() = 0
select(26, [10 24 25], [], [], {0, 0}) = 0 (Timeout)
select(26, [10 24 25], [], [], {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
....
gu...@gmail.com <gu...@gmail.com> #18
Maybe this was caused by a kernel upgrade from 3.17.y to 3.18.y.
There's a bug report on redhat bugzilla about this:https://bugzilla.redhat.com/show_bug.cgi?id=1187982
There's a bug report on redhat bugzilla about this:
bo...@google.com <bo...@google.com> #19
fedora 21 with kernel 3.17.4-301.fc21.x86-64 can boot emulator without problem
bo...@google.com <bo...@google.com> #20
fedora 21 with kernel 3.19.3-200.fc21.x86_64 works as well.
de...@d3xt3r01.tk <de...@d3xt3r01.tk> #21
3.19.3 works !? Weird ! doesn't work on my end.
Updatedhttps://bugzilla.redhat.com/show_bug.cgi?id=1187982 with more info. ( submitted a bug report to the kvm guys and one here )
Updated
di...@android.com <di...@android.com> #22
Closing this bug as it turned out to be a kernel issue, see content of link in #23
Thanks
Thanks
Description
SDK tools version: Revision 19
Version of the platform running in the emulator: Android 4.0.3, x86 (KVM)
STEPS TO REPRODUCE:
1. get headless debian squeeze 64-bit system (intel i7 CPU)
1. install KVM support
2. android create avd --name x86_4_0_3 --target <id> --abi x86 --sdcard 128M
3. emulator-x86 -verbose -show-kernel -avd x86_4_0_3 -no-window -qemu -enable-kvm
EXPECTED RESULTS:
1. emulator-x86 boots up and shows the kernel logs
OBSERVED RESULTS:
1. emulator hangs after "emulator: ping program: /opt/android-sdk-linux/tools/ddms"
2. strace indicates an endless loop (see details below)
3. temporary fix "mv tools/ddms tools/ddms.fork.fix" causes qemu-setup.c to skip a fork() invocation (see details below)
ADDITIONAL INFORMATION:
Therefore, we looked into the source code of the qemu / android emulator and stumbled over:
qemu-setup.c -> android_emulation_setup(...)
if (path_exists(tmp)) {
...
/* disable SIGALRM for the fork(), the periodic signal seems to
* interefere badly with the fork() implementation on Linux running
* under VMWare.
*/
BEGIN_NOSIGALRM
pid = fork();
if (pid == 0) {
int fd = open("/dev/null", O_WRONLY);
dup2(fd, 1);
dup2(fd, 2);
execl( tmp, _ANDROID_PING_PROGRAM, "ping", "emulator", VERSION_STRING, NULL );
}
END_NOSIGALRM
}
We are pretty certain that the codes hangs while invoking fork().
Firing strace
strace emulator-x86 -verbose -show-kernel -avd x86_4_0_3 -no-window -qemu -enable-kvm
spits out an endless continuation of
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0) = ? ERESTARTNOINTR (To be restarted)
--- SIGIO (I/O possible) @ 0 (0) ---
clock_gettime(CLOCK_MONOTONIC, {55232, 717872152}) = 0 sigreturn() = 120
--- SIGIO (I/O possible) @ 0 (0) ---
clock_gettime(CLOCK_MONOTONIC, {55232, 719018162}) = 0 sigreturn() = 120
--- SIGIO (I/O possible) @ 0 (0) ---
clock_gettime(CLOCK_MONOTONIC, {55232, 719310431}) = 0 sigreturn() = 120
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0) = ? ERESTARTNOINTR (To be restarted)
As a temporary workaround, the branch of code in qemu-setup.c triggering the fork() can be avoided by renaming the "ping program" (namely ddms) by
mv tools/ddms tools/ddms.fork.fix
However, we would like to avoid this "hack" in a productive system.