Graceful reboot is not possible as "adb_release" gets called twice

Bug #965926 reported by Sunil Kamath
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
IglooCommunity
Fix Committed
Medium
supriya karanth

Bug Description

Way to reproduce:
1. Use latest boot binaries to flash snowball image. (example ICS).
2. After boot enter “reboot” in command prompt.
One should be able to find following crash:
root@android:/ # reboot
 [ 106.740966] adb_release
[ 106.743438] Unable to handle kernel NULL pointer dereference at virtual address 00000070
 [ 106.757476] WARNING: at /mnt/jenkins/workspace/linaro-android_snowball-ics-gcc46-igloo-stable-blob/build/kernel/arch/arm/mach-ux500/clock.c:161 clk_disable+0x44/0x50()
[ 106.757629] [<c0026aa8>] (clk_disable+0x44/0x50) from [<c033980c>] (ab8500_usb_phy_disable+0x64/0xec)
[ 106.757659] [<c033980c>] (ab8500_usb_phy_disable+0x64/0xec) from [<c03399ac>] (ab8500_usb_phy_disable_work+0x3c/0x50)
[ 106.757690] [<c03399ac>] (ab8500_usb_phy_disable_work+0x3c/0x50) from [<c004f170>] (process_one_work+0x138/0x4ac)

This issue should be solved for graceful reboot.

Rate of Reproducibility : 3/5.

PS: If we comment out the code under ab8500_usb_phy_disable_work then reproducibility rate is reduced. But it’s important that we solve the issue real cause itself.

Revision history for this message
Sunil Kamath (sunil-kamath) wrote :

Below mentioned issue has dependency on this issue:
"872833 Snowball: Device hangs while bootup with both soft/hard boot"

Assigning to USB expert.

Changed in igloocommunity:
assignee: Sunil Kamath (sunil-kamath) → supriya karanth (supriya-karanth)
Changed in igloocommunity:
status: New → Confirmed
Changed in igloocommunity:
milestone: 2012.04 → 2012.05
Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :
Download full text (11.4 KiB)

Also observed on
https://android-build.linaro.org/builds/~linaro-android/snowball-ics-gcc46-igloo-stable-blob/#build=256

Type reboot on serial console after bootup: Causes crash
5/5 times

Logs:
====

130|root@android:/ # reboot
[ 144.606506] SysRq : Emergency Remount R/O
[ 145.416809] EXT4-fs (mmcblk1p3): re-mounted. Opts: (null)
[ 146.415252] EXT4-fs (mmcblk1p5): re-mounted. Opts: (null)
[ 146.426269] Emergency Remount complete
[ 146.526733] adb_release
[ 146.529235] Unable to handle kernel paging request at virtual address 00100104
[ 146.536437] pgd = eaa68000
[ 146.541259] musb-hdrc musb-hdrc: remove, state 1
[ 146.549957] usb usb1: USB disconnect, device number 1
[ 146.555023] usb 1-1: USB disconnect, device number 3
[ 146.560638] [00100104] *pgd=2aa3a831, *pte=00000000, *ppte=00000000
[ 146.568603] Internal error: Oops: 817 [#1] PREEMPT SMP
[ 146.573730] dbx500_dump notified of crash
[ 146.579803] Modules linked in: cw1200_core(C) mac80211
[ 146.584960] CPU: 0 Tainted: G WC (3.3.0+ #1)
[ 146.590362] PC is at remove_config+0x80/0x13c
[ 146.594696] LR is at usb_remove_config+0x50/0x6c
[ 146.599334] pc : [<c034d8b4>] lr : [<c03593bc>] psr: 60000013
[ 146.599334] sp : eaa6de90 ip : eaa6ded0 fp : eaa6decc
[ 146.610809] r10: c093d4c8 r9 : c096e988 r8 : c093d488
[ 146.616027] r7 : 00200200 r6 : 00100100 r5 : c093d4a4 r4 : c093d4c8
[ 146.622528] r3 : 00200200 r2 : 00200200 r1 : 00100100 r0 : 00100100
[ 146.629058] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 146.636199] Control: 10c5787d Table: 2aa6804a DAC: 00000015
[ 146.641937]
[ 146.641937] PC: 0xc034d834:
[ 146.646209] d834 e1a0c00d e92ddff0 e24cb004 e24dd014 e92d4000 e8bd4000 e3a06c01 e3a07c02
[ 146.654418] d854 e1a05001 e50b0030 e281a024 e3406010 e3407020 e59f90f0 ea000006 e894000c
[ 146.662597] d874 e5823004 e5832000 e5143024 e88400c0 e3530000 1a000019 e5954024 e154000a
[ 146.670806] d894 e2448040 1afffff4 e5953020 e3a01c01 e595001c e3a02c02 e3401010 e3402020
[ 146.679016] d8b4 e5803004 e5830000 e595300c e585101c e5852020 e3530000 0a000005 e59f0088
[ 146.687225] d8d4 e5d020d4 e3520000 1a00000b e1a00005 e12fff33 e3a00000 e24bd028 e89daff0
[ 146.695434] d8f4 e5d920bc e3520000 1a00000d e1a01008 e1a00005 e12fff33 eaffffde e51b3030
[ 146.703643] d914 e28000c0 e59f2044 e5931000 e5953000 e58d5000 e2811020 ebfbe53c e595300c
[ 146.711853]
[ 146.711853] LR: 0xc035933c:
[ 146.716094] 933c e1a00005 eb0a4abd e3a00000 e89da9f8 e1a00008 ebffff9e eafffff8 e3e00012
[ 146.724304] 935c e89da9f8 c07944d0 c0e145d8 c093d1cc e1a0c00d e92dd870 e24cb004 e24dd00c
[ 146.732513] 937c e92d4000 e8bd4000 e280603c e1a04000 e1a00006 e1a05001 eb0a54b3 e594300c
[ 146.740722] 939c e1a01000 e1530005 0a000006 e1a00006 eb0a5310 e1a00004 e1a01005 ebffd11d
[ 146.748931] 93bc e24bd018 e89da870 e1a00004 e50b1020 ebffd0d4 e51b1020 eafffff3 e1a0c00d
[ 146.757141] 93dc e92dd818 e24cb004 e92d4000 e8bd4000 e5901018 e590400c e2813001 e3510000
[ 146.765319] 93fc e5803018 189da818 e5940000 e5903000 e5933014 e3530000 0a000001 e12fff33
[ 146.773529] 941c e5940000 e5900004 e5941004 e5903008 e5933014 e12fff33 e1a00004 e59f10...

Revision history for this message
Sunil Kamath (sunil-kamath) wrote :

This will be investigated in wk#19 as planned.

Changed in igloocommunity:
status: Confirmed → In Progress
Revision history for this message
supriya karanth (supriya-karanth) wrote :

adb_closed_callback in adb_release is causing the issue. The "remove_config" function is getting called twice. Investigation ongoing

Changed in igloocommunity:
milestone: 2012.05 → 2012.06
Changed in igloocommunity:
milestone: 2012.06 → 2012.07
Changed in igloocommunity:
milestone: 2012.07 → 2012.09
Revision history for this message
Jayeeta Bandyopadhyay (jayeeta) wrote :

Fixed with attached patch

Changed in igloocommunity:
milestone: 2012.09 → none
Revision history for this message
supriya karanth (supriya-karanth) wrote :

patch pushed to igloo kernel community

Changed in igloocommunity:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.