android-rpi/device_brcm_rpi3

Android 7.1.1 starts Faied (audioserver killed)

zydz opened this issue · 1 comments

zydz commented

[ 12.172995] type=1400 audit(12.139:8): avc: denied { getattr } for pid=402 comm="audioserver" path="/vendor" dev="rootfs" ino=5866 scontext=u:r:audioserver:s0 tcont1
[ 12.648083] init: Service 'audioserver' (pid 402) killed by signal 11
[ 12.654814] init: Service 'audioserver' (pid 402) killing any children in process group

Build fingerprint: 'Android/rpi3/rpi3:7.1.1/NMF26Q/zhou11081630:eng/test-keys'
Revision: '0'
ABI: 'arm'
pid: 5332, tid: 5336, name: AudioOut_D >>> /system/bin/audioserver <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
r0 00000000 r1 a847f6bc r2 a847f6d8 r3 00000000
r4 a89c31a4 r5 00000000 r6 a847f6d8 r7 a847f6d8
r8 a847f830 r9 ffffffff sl ffffffff fp a847f804
ip a9614fe0 sp a847f6a8 lr a96111cd pc a9618046 cpsr 60070030
d0 ffffffffffffffff d1 ffffffffffffffff
d2 ffffffffffffffff d3 ffffffffffffffff
d4 a9096808a8999c50 d5 a8cd5924a89944f0
d6 0000000000000000 d7 0000000800000000
d8 0000000000000000 d9 0000000000000000
d10 0000000000000000 d11 0000000000000000
d12 0000000000000000 d13 0000000000000000
d14 0000000000000000 d15 0000000000000000
d16 0000000000000480 d17 0000000000000128
d18 0000000000000460 d19 0000000000000108
d20 0000000000000000 d21 0000000000000002
d22 0000000000000000 d23 0000000000000000
d24 0000000000000000 d25 0000000000000000
d26 0000000000000000 d27 0000000000000000
d28 0000000000000000 d29 0000000000000000
d30 0000000000000000 d31 0000000000000000
scr 80000000

backtrace:
#00 pc 00002046 /system/lib/libtinyalsa.so (pcm_get_htimestamp+5)
#1 pc 000011c9 /system/lib/hw/audio.primary.rpi3.so
#2 pc 00003fe7 /system/lib/libnbaio.so (_ZN7android18AudioStreamOutSink12getTimestampERNS_17ExtendedTimestampE+26)
#3 pc 0002fabd /system/lib/libaudioflinger.so
#4 pc 0000e345 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
#5 pc 00046ff3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
#6 pc 00019e0d /system/lib/libc.so (__start_thread+6)

stack:
a847f668 a851b00c
a847f66c a851e400
a847f670 a8508000
a847f674 a8508008
a847f678 a851b00c
a847f67c 00001a94
a847f680 a908c861 /system/lib/libaudioflinger.so
a847f684 a8c7fb6b /system/lib/libc.so (je_free+78)
a847f688 9ae99ad0
a847f68c a847f6cc
a847f690 a830f010
a847f694 a851b000
a847f698 9ae99ad0
a847f69c a851e400
a847f6a0 a851e454
a847f6a4 a847f6cc
#00 a847f6a8 a89c31a4
a847f6ac a847f6e0
a847f6b0 a89c3140

Could someone help me to fix this crash?

zydz commented

~/pi3-android/external/tinyalsa

diff --git a/pcm.c b/pcm.c
index 78e1cea..5913594 100644
--- a/pcm.c
+++ b/pcm.c
@@ -1001,6 +1001,7 @@ fail_close:

int pcm_is_ready(struct pcm *pcm)
{

  • if (pcm==NULL) return 0;
    return pcm->fd >= 0;
    }
    fix it temperately as above. NULL pointer.