Как определить, почему сервер Android ADB дает сбой из-за сбоя, в результате которого несколько устройств переходят в автономный режим? - PullRequest
0 голосов
/ 19 сентября 2018

Я пытаюсь определить причину сбоя сервера Android ADB и выводит список segfault, который приводит к тому, что при перезапуске ADB несколько устройств отображаются в списке как offline.Мы проводим различные Appium тесты на множестве Android телефонов.Эта проблема возникла недавно, когда серверный процесс Android ADB будет завершен с SIGSEGV, а затем мы должны перезапустить сервер Android ADB.

Когда возникает проблема со сбоем сервера adb, мы видим, что он вызываетUSB отключения в журналах dmesg.После перезапуска adb эти устройства отображаются как «отключенные», и они никогда не возвращаются к available.Я полагаю, что offline вызывает появление отключений dmesg.

Вопрос

  1. Как мы определяем, почему происходит этот segfault и что устройствабыть переведен в режим offline?
  2. Есть ли способ вывести эти устройства из offline через командную строку (возможно, через ОС или подсистему USB?

Спасибоyou

Вот вывод из / var / log / messages вокруг adb

    Sep 17 20:31:15 mcbqa01 kernel: adb[1716]: segfault at 11 ip 000055e5220326d0 sp 00007fff2d46fbc0 error 4 in adb[55e521fd3000+226000]
Sep 17 20:31:15 mcbqa01 abrt-hook-ccpp: Process 1716 (adb) of user 1001 killed by SIGSEGV - dumping core
Sep 17 20:31:17 mcbqa01 systemd: adb.service: main process exited, code=dumped, status=11/SEGV
Sep 17 20:31:17 mcbqa01 adb: cannot connect to daemon at tcp:5037: Connection refused
Sep 17 20:31:17 mcbqa01 systemd: Unit adb.service entered failed state.
Sep 17 20:31:17 mcbqa01 systemd: adb.service failed.
Sep 17 20:31:17 mcbqa01 abrt-server: Executable '/opt/android-sdk-linux/platform-tools/adb' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Sep 17 20:31:17 mcbqa01 abrt-hook-ccpp: Process 31525 (adb) of user 1001 killed by SIGABRT - ignoring (repeated crash)
Sep 17 20:31:17 mcbqa01 abrt-hook-ccpp: Process 31533 (adb) of user 1001 killed by SIGABRT - ignoring (repeated crash)
Sep 17 20:31:20 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:23 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:24 mcbqa01 abrt-hook-ccpp: Process 32330 (adb) of user 1001 killed by SIGABRT - ignoring (repeated crash)
Sep 17 20:31:24 mcbqa01 abrt-hook-ccpp: Process 32318 (adb) of user 1001 killed by SIGABRT - ignoring (repeated crash)
Sep 17 20:31:26 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:27 mcbqa01 abrt-hook-ccpp: Process 32706 (adb) of user 1001 killed by SIGABRT - ignoring (repeated crash)
Sep 17 20:31:29 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:33 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:36 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:39 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:42 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:46 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:49 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:52 mcbqa01 systemd: adb.service holdoff time over, scheduling restart.
Sep 17 20:31:52 mcbqa01 adb: * daemon not running; starting now at tcp:5037
Sep 17 20:31:55 mcbqa01 adb: * daemon started successfully

Вот вывод из dmesg

Sep17 20:31] adb[1716]: segfault at 11 ip 000055e5220326d0 sp 00007fff2d46fbc0 error 4 in adb[55e521fd3000+226000]
[  +1.775065] usb 1-5.3.4: USB disconnect, device number 43
[  +0.188885] usb 1-5.3.4: new high-speed USB device number 56 using xhci_hcd
[  +0.091012] usb 1-5.3.4: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000002] usb 1-5.3.4: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-5.3.4: Product: SAMSUNG_Android
[  +0.000001] usb 1-5.3.4: Manufacturer: SAMSUNG
[  +0.000001] usb 1-5.3.4: SerialNumber: 9887bc324933524a4a
[  +0.003418] cdc_acm 1-5.3.4:1.1: ttyACM27: USB ACM device
[  +0.740720] usb 1-6.4.1: USB disconnect, device number 26
[  +0.186862] usb 1-6.4.1: new high-speed USB device number 57 using xhci_hcd
[  +0.093515] usb 1-6.4.1: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000002] usb 1-6.4.1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-6.4.1: Product: SAMSUNG_Android
[  +0.000001] usb 1-6.4.1: Manufacturer: SAMSUNG
[  +0.000001] usb 1-6.4.1: SerialNumber: 9888293936434c4e5a
[  +0.003659] cdc_acm 1-6.4.1:1.1: ttyACM11: USB ACM device
[  +0.060833] TCP: request_sock_TCP: Possible SYN flooding on port 5037. Sending cookies.  Check SNMP counters.
[  +1.959089] usb 1-5.3.1: USB disconnect, device number 17
[  +0.186920] usb 1-5.3.1: new high-speed USB device number 58 using xhci_hcd
[  +0.091914] usb 1-5.3.1: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000003] usb 1-5.3.1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-5.3.1: Product: SAMSUNG_Android
[  +0.000001] usb 1-5.3.1: Manufacturer: SAMSUNG
[  +0.000000] usb 1-5.3.1: SerialNumber: 9887e0443337344d5a
[  +0.003028] cdc_acm 1-5.3.1:1.1: ttyACM4: USB ACM device
[  +4.708485] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[  +0.129704] usb 1-5.3.1: USB disconnect, device number 58
[  +0.000583] cdc_acm 1-5.3.1:1.1: failed to set dtr/rts
[  +0.186356] usb 1-5.3.1: new high-speed USB device number 59 using xhci_hcd
[  +0.092522] usb 1-5.3.1: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000002] usb 1-5.3.1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-5.3.1: Product: SAMSUNG_Android
[  +0.000000] usb 1-5.3.1: Manufacturer: SAMSUNG
[  +0.000001] usb 1-5.3.1: SerialNumber: 9887e0443337344d5a
[  +0.003784] cdc_acm 1-5.3.1:1.1: ttyACM4: USB ACM device
[  +0.484707] usb 1-6.3.1: USB disconnect, device number 19
[  +0.297011] usb 1-6.3.1: new high-speed USB device number 60 using xhci_hcd
[  +0.090696] usb 1-6.3.1: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000001] usb 1-6.3.1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-6.3.1: Product: SAMSUNG_Android
[  +0.000001] usb 1-6.3.1: Manufacturer: SAMSUNG
[  +0.000000] usb 1-6.3.1: SerialNumber: 9887e0343947574e5a
[  +0.003260] cdc_acm 1-6.3.1:1.1: ttyACM5: USB ACM device
[  +3.960992] usb 1-5.1.3: USB disconnect, device number 23
[  +0.240155] usb 1-5.1.3: new high-speed USB device number 61 using xhci_hcd
[  +0.091700] usb 1-5.1.3: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000002] usb 1-5.1.3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-5.1.3: Product: SAMSUNG_Android
[  +0.000001] usb 1-5.1.3: Manufacturer: SAMSUNG
[  +0.000001] usb 1-5.1.3: SerialNumber: 98896a42463036585a
[  +0.003018] cdc_acm 1-5.1.3:1.1: ttyACM9: USB ACM device
[  +2.993201] usb 1-5.1.3: USB disconnect, device number 61
[  +0.000093] usb 1-5.4.1: USB disconnect, device number 20
[  +0.000103] cdc_acm 1-5.1.3:1.1: failed to set dtr/rts
[  +0.293856] usb 1-5.4.1: new high-speed USB device number 62 using xhci_hcd
[  +0.092660] usb 1-5.4.1: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000001] usb 1-5.4.1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-5.4.1: Product: SAMSUNG_Android
[  +0.000001] usb 1-5.4.1: Manufacturer: SAMSUNG
[  +0.000000] usb 1-5.4.1: SerialNumber: 98897a394942395534
[  +0.004245] cdc_acm 1-5.4.1:1.1: ttyACM6: USB ACM device
[  +0.068100] usb 1-5.1.3: new high-speed USB device number 63 using xhci_hcd
[  +0.099429] usb 1-5.1.3: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000001] usb 1-5.1.3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-5.1.3: Product: SAMSUNG_Android
[  +0.000001] usb 1-5.1.3: Manufacturer: SAMSUNG
[  +0.000000] usb 1-5.1.3: SerialNumber: 98896a42463036585a
[  +0.004664] cdc_acm 1-5.1.3:1.1: ttyACM9: USB ACM device
[  +1.740801] usb 1-5.2.2: USB disconnect, device number 22
[  +0.186143] usb 1-5.2.2: new high-speed USB device number 64 using xhci_hcd
[  +0.093362] usb 1-5.2.2: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000001] usb 1-5.2.2: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000001] usb 1-5.2.2: Product: SAMSUNG_Android
[  +0.000001] usb 1-5.2.2: Manufacturer: SAMSUNG
[  +0.000000] usb 1-5.2.2: SerialNumber: 98882945544432574a
[  +0.003880] cdc_acm 1-5.2.2:1.1: ttyACM8: USB ACM device
[ +11.236567] usb 1-5.3.4: USB disconnect, device number 56
[  +0.439363] usb 1-5.3.4: new high-speed USB device number 65 using xhci_hcd
[  +0.095522] usb 1-5.3.4: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000002] usb 1-5.3.4: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000000] usb 1-5.3.4: Product: SAMSUNG_Android
[  +0.000001] usb 1-5.3.4: Manufacturer: SAMSUNG
[  +0.000001] usb 1-5.3.4: SerialNumber: 9887bc324933524a4a
[  +0.004070] cdc_acm 1-5.3.4:1.1: ttyACM27: USB ACM device
[  +0.485050] usb 1-6.3.4: USB disconnect, device number 44
[  +0.439432] usb 1-6.3.4: new high-speed USB device number 66 using xhci_hcd
[  +0.093196] usb 1-6.3.4: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000006] usb 1-6.3.4: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000003] usb 1-6.3.4: Product: SAMSUNG_Android
[  +0.000003] usb 1-6.3.4: Manufacturer: SAMSUNG
[  +0.000002] usb 1-6.3.4: SerialNumber: 988923395134504238
[  +0.004078] cdc_acm 1-6.3.4:1.1: ttyACM28: USB ACM device
[  +3.815314] usb 1-5.3.4: USB disconnect, device number 65
[  +0.000253] cdc_acm 1-5.3.4:1.1: failed to set dtr/rts
[  +0.190305] usb 1-5.3.4: new high-speed USB device number 67 using xhci_hcd
[  +0.097474] usb 1-5.3.4: New USB device found, idVendor=04e8, idProduct=6860
[  +0.000005] usb 1-5.3.4: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[  +0.000003] usb 1-5.3.4: Product: SAMSUNG_Android
[  +0.000003] usb 1-5.3.4: Manufacturer: SAMSUNG
[  +0.000002] usb 1-5.3.4: SerialNumber: 9887bc324933524a4a
[  +0.005432] cdc_acm 1-5.3.4:1.1: ttyACM27: USB ACM device
...