Hi Christian,

Fairly easy to reproduce. I just tried with current qemu (version 4.2.1
(Debian 1:4.2-3ubuntu6.6)).

You need to download the Android 9.0r2 ISO image from the Android-x86
project. Here's a link for the 64-bit image (I chose the non k49 one) :

https://www.fosshub.com/Android-x86.html?dwl=android-x86_64-9.0-r2.iso

Then boot the image in Qemu :
qemu-system-x86_64 -machine q35,vmport=off -cpu host -accel kvm -smp 2 -m 4G 
-audiodev pa,id=pasound,timer-period=5000 -device ES1370,audiodev=pasound 
-device virtio-vga,virgl=on -device virtio-mouse -device virtio-keyboard -drive 
file=android-x86_64-9.0-r2.iso,if=virtio,media=cdrom,format=raw,readonly=on 
-display gtk,gl=on -usb -nodefaults -monitor vc -nic 
user,hostfwd=tcp:127.0.0.1:5555-:5555

It shouldn't take long before the screen freezes. Here's the associated log 
entry :
----- LOG START -----
10-05 01:00:18.548  1147  1259 F libc    : Fatal signal 11 (SIGSEGV), code 1 
(SEGV_MAPERR), fault addr 0xe8 in tid 1259 (frame-worker), pid 1147 
(surfaceflinger)
10-05 01:00:18.565  4406  4406 F DEBUG   : *** *** *** *** *** *** *** *** *** 
*** *** *** *** *** *** ***
10-05 01:00:18.565  4406  4406 F DEBUG   : Build fingerprint: 
'Android-x86/android_x86_64/x86_64:9/PI/lh03251128:userdebug/test-keys'
10-05 01:00:18.565  4406  4406 F DEBUG   : Revision: '0'
10-05 01:00:18.565  4406  4406 F DEBUG   : ABI: 'x86_64'
10-05 01:00:18.565  4406  4406 F DEBUG   : pid: 1147, tid: 1259, name: 
frame-worker  >>> /system/bin/surfaceflinger <<<
10-05 01:00:18.565  4406  4406 F DEBUG   : signal 11 (SIGSEGV), code 1 
(SEGV_MAPERR), fault addr 0xe8
10-05 01:00:18.565  4406  4406 F DEBUG   : Cause: null pointer dereference
10-05 01:00:18.565  4406  4406 F DEBUG   :     rax 0000000000000000  rbx 
00007eb0cc0585b0  rcx 0000000000000000  rdx 00007eb0d2a9cc08
10-05 01:00:18.565  4406  4406 F DEBUG   :     r8  0000000000000000  r9  
00000000ffffffff  r10 0000000000000000  r11 0000000000000246
10-05 01:00:18.565  4406  4406 F DEBUG   :     r12 0000000000000001  r13 
00007eb0d30d7050  r14 000000000000001e  r15 00007eb0d30d7100
10-05 01:00:18.565  4406  4406 F DEBUG   :     rdi 0000000000000000  rsi 
fffffffffffffff0
10-05 01:00:18.565  4406  4406 F DEBUG   :     rbp 00007eb0ccf01400  rsp 
00007eb0ccf01310  rip 00007eb0cd2892ac
10-05 01:00:18.566  4406  4406 F DEBUG   : 
10-05 01:00:18.566  4406  4406 F DEBUG   : backtrace:
10-05 01:00:18.566  4406  4406 F DEBUG   :     #00 pc 00000000000202ac  
/system/vendor/lib64/hw/hwcomposer.drm.so 
(android::DrmDisplayCompositor::CommitFrame(android::DrmDisplayComposition*, 
bool)+668)
10-05 01:00:18.566  4406  4406 F DEBUG   :     #01 pc 000000000001e72b  
/system/vendor/lib64/hw/hwcomposer.drm.so 
(android::DrmDisplayCompositor::ApplyFrame(std::__1::unique_ptr<android::DrmDisplayComposition,
 std::__1::default_delete<android::DrmDisplayComposition>>, int)+27)
10-05 01:00:18.566  4406  4406 F DEBUG   :     #02 pc 000000000001e68e  
/system/vendor/lib64/hw/hwcomposer.drm.so 
(android::DrmDisplayCompositor::FrameWorker::Routine()+318)
10-05 01:00:18.566  4406  4406 F DEBUG   :     #03 pc 00000000000372e8  
/system/vendor/lib64/hw/hwcomposer.drm.so 
(android::Worker::InternalRoutine()+72)
10-05 01:00:18.566  4406  4406 F DEBUG   :     #04 pc 0000000000037466  
/system/vendor/lib64/hw/hwcomposer.drm.so 
(_ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN7android6WorkerEFvvEPS8_EEEEEPvSD_+54)
10-05 01:00:18.566  4406  4406 F DEBUG   :     #05 pc 0000000000092bfb  
/system/lib64/libc.so (__pthread_start(void*)+27)
10-05 01:00:18.566  4406  4406 F DEBUG   :     #06 pc 000000000002af0d  
/system/lib64/libc.so (__start_thread+61)
----- LOG END -----

It seems the problem doesn't happen when using the Android 8.1-r3 image,
or I didn't try long enough. As I said, using SDL "solves" the problem.

One could argue the problem is with Android itself, but then why would
it react differently depending on which frontend, GTK or SDL, is used ?
Shouldn't it be transparent to the emulated system ?

I saw other people reporting the problem on a russian forum (don't
remember which one), not anywhere else (I searched only for Android
problems with virglrenderer). I had to translate since I'm not russian
myself (I'm french). Interestingly, shortly after reporting the bug
here, I was contacted by a Russian who confirmed he had the same
problem.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1896250

Title:
  SDL support is missing while virglrenderer has problems with GTK

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1896250/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to