Created attachment 133269 [details] logcat Hi, the issue appeared in the last two days. --------- beginning of crash 08-06 12:40:10.513 2352 2352 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x42c4 in tid 2352 (surfaceflinger) 08-06 12:40:10.567 2607 2607 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 08-06 12:40:10.567 2607 2607 F DEBUG : Build fingerprint: 'Android-x86/android_x86_64/x86_64:7.1.2/NZH54B/utente08042339:eng/test-keys' 08-06 12:40:10.567 2607 2607 F DEBUG : Revision: '0' 08-06 12:40:10.567 2607 2607 F DEBUG : ABI: 'x86_64' 08-06 12:40:10.567 2607 2607 F DEBUG : pid: 2352, tid: 2352, name: surfaceflinger >>> /system/bin/surfaceflinger <<< 08-06 12:40:10.567 2607 2607 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x42c4 08-06 12:40:10.567 2607 2607 F DEBUG : rax 0000000000004200 rbx 000072ecccc31198 rcx 0000000000000009 rdx ffffffffffffffb0 08-06 12:40:10.567 2607 2607 F DEBUG : rsi 0000000000000000 rdi 000072ecce226208 08-06 12:40:10.567 2607 2607 F DEBUG : r8 0000000000000f00 r9 00007ffc53933920 r10 0000000000003000 r11 000072ecccc03318 08-06 12:40:10.567 2607 2607 F DEBUG : r12 000072ecce285838 r13 0000000000000010 r14 000072ecce278600 r15 000072ecce227b70 08-06 12:40:10.567 2607 2607 F DEBUG : cs 0000000000000033 ss 000000000000002b 08-06 12:40:10.567 2607 2607 F DEBUG : rip 000072eccd530588 rbp 0000000000000001 rsp 00007ffc53934300 eflags 0000000000010246 08-06 12:40:10.574 2607 2607 F DEBUG : 08-06 12:40:10.574 2607 2607 F DEBUG : backtrace: 08-06 12:40:10.574 2607 2607 F DEBUG : #00 pc 0000000000088588 /system/lib64/dri/i965_dri.so 08-06 12:40:10.574 2607 2607 F DEBUG : #01 pc 000000000006a5f8 /system/lib64/dri/i965_dri.so 08-06 12:40:10.574 2607 2607 F DEBUG : #02 pc 00000000002e4c48 /system/lib64/dri/i965_dri.so 08-06 12:40:10.574 2607 2607 F DEBUG : #03 pc 0000000000012da4 /system/lib64/egl/libGLES_mesa.so 08-06 12:40:10.574 2607 2607 F DEBUG : #04 pc 0000000000005a14 /system/lib64/egl/libGLES_mesa.so (eglCreateContext+356) 08-06 12:40:10.574 2607 2607 F DEBUG : #05 pc 0000000000015b9d /system/lib64/libEGL.so (eglCreateContext+141) 08-06 12:40:10.574 2607 2607 F DEBUG : #06 pc 000000000003e542 /system/lib64/libsurfaceflinger.so 08-06 12:40:10.574 2607 2607 F DEBUG : #07 pc 0000000000044448 /system/lib64/libsurfaceflinger.so (_ZN7android14SurfaceFlinger4initEv+936) 08-06 12:40:10.574 2607 2607 F DEBUG : #08 pc 000000000000130d /system/bin/surfaceflinger 08-06 12:40:10.574 2607 2607 F DEBUG : #09 pc 000000000001c994 /system/lib64/libc.so (__libc_init+84) 08-06 12:40:10.574 2607 2607 F DEBUG : #10 pc 00000000000011c4 /system/bin/surfaceflinger Here follows addr2line with source/function/line involved: utente@utente-System-Product-Name:~/nougat-x86$ addr2line -Cfe out/target/product/x86_64/symbols/system/lib64/dri/i965_dri.so 0000000000088588 intel_batchbuffer_init /proc/self/cwd/external/mesa/src/mesa/drivers/dri/i965/intel_batchbuffer.c:90 000000000006a5f8 brwCreateContext /proc/self/cwd/external/mesa/src/mesa/drivers/dri/i965/brw_context.c:937 00000000002e4c48 driCreateContextAttribs /proc/self/cwd/external/mesa/src/mesa/drivers/dri/common/dri_util.c:452 ^C utente@utente-System-Product-Name:~/nougat-x86$ addr2line -Cfe out/target/product/x86_64/symbols/system/lib64/egl/libGLES_mesa.so 0000000000012da4 dri2_create_context /proc/self/cwd/external/mesa/src/egl/drivers/dri2/egl_dri2.c:1244 ^C Mauro android-x86 team
Created attachment 133270 [details] dmesg
Created attachment 133271 [details] addr2line output
Created attachment 133272 [details] [review] tombstone
Yep, I've reproduced this on Android-IA, will attempt to bisect.
Created attachment 133424 [details] [review] workaround There are 2 places causing a crash in recent batchbuffer changes ... both of them are accessing context like this: struct brw_context *brw = container_of(batch, brw, batch) functions are intel_batchbuffer_init and brw_emit_reloc on the first issue brw->screen can be null, 2nd one I believe happens via initial blorp_clear that calls brw_upload_state_base_address. Attached a workaround for these.
having said that, as a disclaimer this workaround applies on top of commit 29ba502a4e28471f67e4e904ae503157087efd20 which I bisected to be the first one that introduces crashes
Should be fixed by commit da0840246fd91134a61e35f1bd987d77111aed26 Author: Kenneth Graunke <kenneth@whitecape.org> Date: Thu Aug 10 20:47:53 2017 -0700 i965: Clean up intel_batchbuffer_init().
Hi, The problem is still happening with latest mesa-dev. Attaching the latest dmesg/logcat/addrline Mauro
Created attachment 133524 [details] dmesg collected from build with-mesa-dev
Created attachment 133525 [details] logcat collected from build with-mesa-dev
Created attachment 133526 [details] addr2line collected from build with-mesa-dev
(In reply to Mauro Rossi from comment #8) > Hi, > The problem is still happening with latest mesa-dev. > Huh that's weird, even on the same line. Which git commit is your tree based on?
Hi, apologies my fault, I had fetched but I had forgot to rebase, so I was seeing the bug that was been corrected. Sorry, I guess I can't open a bug for my brain :-) Mauro
(In reply to Mauro Rossi from comment #13) > Hi, > > apologies my fault, > > I had fetched but I had forgot to rebase, > so I was seeing the bug that was been corrected. > > Sorry, I guess I can't open a bug for my brain :-) > > Mauro no worries :)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.