|
|
Created:
5 years, 10 months ago by mille Modified:
5 years, 10 months ago Reviewers:
jbudorick CC:
chromium-reviews, klundberg+watch_chromium.org, yfriedman+watch_chromium.org, jbudorick+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMake gdb debugging on un-rooted devices work for Android 5.x.
Android 5.x does not allow running the gdb executable in
/data/local/tmp. For gdb to be executable by the package
it need to be located in /data/data/{PACKAGE-NAME} which is
allowed to run the exucutable.
BUG=453379
Committed: https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e
Cr-Commit-Position: refs/heads/master@{#313737}
Patch Set 1 #Patch Set 2 : Address debugging Release builds #Messages
Total messages: 13 (2 generated)
jimmym@opera.com changed reviewers: + jbudorick@chromium.org
jbudorick: Does this look okay? Do you (Chrome on Android) have the same problem, if so, how do you circumvent it without rooting the device?
On 2015/01/29 13:50:31, mille wrote: > jbudorick: Does this look okay? Do you (Chrome on Android) have the same > problem, if so, how do you circumvent it without rooting the device? lgtm Thanks for the patch. I was able to reproduce the issue with a non-rooted L phone, but I think most people on the team use rooted devices.
The CQ bit was checked by jimmym@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/884993003/1
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e Cr-Commit-Position: refs/heads/master@{#313737}
Message was sent while issue was closed.
On 2015/01/29 18:19:41, I haz the power (commit-bot) wrote: > Patchset 1 (id:??) landed as > https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e > Cr-Commit-Position: refs/heads/master@{#313737} This CL breaks adb_gdb on a rooted N5 (running L), please fix it or revert the CL. fqian@isabella:/usr/local/google/code/clankium-master/src$ adb_gdb_chrome --verbose Auto-config: --adb=/usr/local/google/code/clankium-master/src/third_party/android_tools/sdk//platform-tools/adb Auto-config: --toolchain=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin Host gdb client: /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb Auto-config: --gdbserver=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver Auto-config: --symbol-dir=/usr/local/google/code/clankium-master/src/out/Release/lib Device build fingerprint: google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys Host build fingerprint: google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys Auto-config: --no-pull-libs (fingerprint match) Found process PID: 32348 Shell UID: 0 Command prefix: '' Command suffix: '' Pushing gdbserver /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver to /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 run-as: Package 'com.google.android.apps.chrome' is not debuggable /system/bin/app_process.real: No such file or directory Pulling app_process from device Setting network redirection (host:5039 -> device:5039) Starting gdbserver in the background: adb shell /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 :5039 --attach 32348 background job pid: 14872 Job control: [1]+ 14872 Done ( "$ADB" shell $COMMAND_PREFIX $TARGET_GDBSERVER :$TARGET_PORT --attach $PID $COMMAND_SUFFIX > $GDBSERVER_LOG 2>&1 ) ERROR: GDBServer could not attach to PID 32348! Failure log (use --verbose for more information): /system/bin/sh: /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746: not found Killing background gdbserver process: 14872 Removing target gdbserver binary: /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746. Cleaning up: /tmp/fqian-adb-gdb-tmp-14746
Message was sent while issue was closed.
On 2015/01/30 01:30:32, Feng Qian wrote: > On 2015/01/29 18:19:41, I haz the power (commit-bot) wrote: > > Patchset 1 (id:??) landed as > > https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e > > Cr-Commit-Position: refs/heads/master@{#313737} > > This CL breaks adb_gdb on a rooted N5 (running L), please fix it or revert the > CL. I tried this on a rooted N5 on L prior to giving approval... argh. > fqian@isabella:/usr/local/google/code/clankium-master/src$ adb_gdb_chrome > --verbose > Auto-config: > --adb=/usr/local/google/code/clankium-master/src/third_party/android_tools/sdk//platform-tools/adb > Auto-config: > --toolchain=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin > Host gdb client: > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb > Auto-config: > --gdbserver=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > Auto-config: > --symbol-dir=/usr/local/google/code/clankium-master/src/out/Release/lib > Device build fingerprint: > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > Host build fingerprint: > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > Auto-config: --no-pull-libs (fingerprint match) > Found process PID: 32348 > Shell UID: 0 > Command prefix: '' > Command suffix: '' > Pushing gdbserver > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > to /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > run-as: Package 'com.google.android.apps.chrome' is not debuggable This line stands out to me. > /system/bin/app_process.real: No such file or directory > Pulling app_process from device > Setting network redirection (host:5039 -> device:5039) > Starting gdbserver in the background: > adb shell /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > :5039 --attach 32348 > background job pid: 14872 > Job control: [1]+ 14872 Done ( "$ADB" shell $COMMAND_PREFIX > $TARGET_GDBSERVER :$TARGET_PORT --attach $PID $COMMAND_SUFFIX > $GDBSERVER_LOG > 2>&1 ) > ERROR: GDBServer could not attach to PID 32348! > Failure log (use --verbose for more information): > /system/bin/sh: > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746: not found > Killing background gdbserver process: 14872 > Removing target gdbserver binary: > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746. > Cleaning up: /tmp/fqian-adb-gdb-tmp-14746
Message was sent while issue was closed.
On 2015/01/30 01:35:02, jbudorick wrote: > On 2015/01/30 01:30:32, Feng Qian wrote: > > On 2015/01/29 18:19:41, I haz the power (commit-bot) wrote: > > > Patchset 1 (id:??) landed as > > > https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e > > > Cr-Commit-Position: refs/heads/master@{#313737} > > > > This CL breaks adb_gdb on a rooted N5 (running L), please fix it or revert the > > CL. > > I tried this on a rooted N5 on L prior to giving approval... argh. Checked again, unable to reproduce this error on a rooted N5 on L. > > > fqian@isabella:/usr/local/google/code/clankium-master/src$ adb_gdb_chrome > > --verbose > > Auto-config: > > > --adb=/usr/local/google/code/clankium-master/src/third_party/android_tools/sdk//platform-tools/adb > > Auto-config: > > > --toolchain=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin > > Host gdb client: > > > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb > > Auto-config: > > > --gdbserver=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > > Auto-config: > > --symbol-dir=/usr/local/google/code/clankium-master/src/out/Release/lib > > Device build fingerprint: > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > > Host build fingerprint: > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > > Auto-config: --no-pull-libs (fingerprint match) > > Found process PID: 32348 > > Shell UID: 0 > > Command prefix: '' > > Command suffix: '' > > Pushing gdbserver > > > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > > to /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > > run-as: Package 'com.google.android.apps.chrome' is not debuggable > > This line stands out to me. > > > /system/bin/app_process.real: No such file or directory > > Pulling app_process from device > > Setting network redirection (host:5039 -> device:5039) > > Starting gdbserver in the background: > > adb shell /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > > :5039 --attach 32348 > > background job pid: 14872 > > Job control: [1]+ 14872 Done ( "$ADB" shell $COMMAND_PREFIX > > $TARGET_GDBSERVER :$TARGET_PORT --attach $PID $COMMAND_SUFFIX > $GDBSERVER_LOG > > 2>&1 ) > > ERROR: GDBServer could not attach to PID 32348! > > Failure log (use --verbose for more information): > > /system/bin/sh: > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746: not found > > Killing background gdbserver process: 14872 > > Removing target gdbserver binary: > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746. > > Cleaning up: /tmp/fqian-adb-gdb-tmp-14746
Message was sent while issue was closed.
On 2015/01/30 02:02:50, jbudorick wrote: > On 2015/01/30 01:35:02, jbudorick wrote: > > On 2015/01/30 01:30:32, Feng Qian wrote: > > > On 2015/01/29 18:19:41, I haz the power (commit-bot) wrote: > > > > Patchset 1 (id:??) landed as > > > > https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e > > > > Cr-Commit-Position: refs/heads/master@{#313737} > > > > > > This CL breaks adb_gdb on a rooted N5 (running L), please fix it or revert > the > > > CL. > > > > I tried this on a rooted N5 on L prior to giving approval... argh. > > Checked again, unable to reproduce this error on a rooted N5 on L. > > > > > > fqian@isabella:/usr/local/google/code/clankium-master/src$ adb_gdb_chrome > > > --verbose > > > Auto-config: > > > > > > --adb=/usr/local/google/code/clankium-master/src/third_party/android_tools/sdk//platform-tools/adb > > > Auto-config: > > > > > > --toolchain=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin > > > Host gdb client: > > > > > > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb > > > Auto-config: > > > > > > --gdbserver=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > > > Auto-config: > > > --symbol-dir=/usr/local/google/code/clankium-master/src/out/Release/lib > > > Device build fingerprint: > > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > > > Host build fingerprint: > > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > > > Auto-config: --no-pull-libs (fingerprint match) > > > Found process PID: 32348 > > > Shell UID: 0 > > > Command prefix: '' > > > Command suffix: '' > > > Pushing gdbserver > > > > > > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > > > to /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > > > run-as: Package 'com.google.android.apps.chrome' is not debuggable > > > > This line stands out to me. Indeed, this line appears to be the problem. We don't package Release builds with android:debuggable (https://code.google.com/p/chromium/codesearch#chromium/src/build/android/ant/...), so the run-as will fail when attempting to run with those packages. > > > > > /system/bin/app_process.real: No such file or directory > > > Pulling app_process from device > > > Setting network redirection (host:5039 -> device:5039) > > > Starting gdbserver in the background: > > > adb shell /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > > > :5039 --attach 32348 > > > background job pid: 14872 > > > Job control: [1]+ 14872 Done ( "$ADB" shell > $COMMAND_PREFIX > > > $TARGET_GDBSERVER :$TARGET_PORT --attach $PID $COMMAND_SUFFIX > > $GDBSERVER_LOG > > > 2>&1 ) > > > ERROR: GDBServer could not attach to PID 32348! > > > Failure log (use --verbose for more information): > > > /system/bin/sh: > > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746: not found > > > Killing background gdbserver process: 14872 > > > Removing target gdbserver binary: > > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746. > > > Cleaning up: /tmp/fqian-adb-gdb-tmp-14746
Message was sent while issue was closed.
On 2015/01/30 02:28:28, jbudorick wrote: > On 2015/01/30 02:02:50, jbudorick wrote: > > On 2015/01/30 01:35:02, jbudorick wrote: > > > On 2015/01/30 01:30:32, Feng Qian wrote: > > > > On 2015/01/29 18:19:41, I haz the power (commit-bot) wrote: > > > > > Patchset 1 (id:??) landed as > > > > > https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e > > > > > Cr-Commit-Position: refs/heads/master@{#313737} > > > > > > > > This CL breaks adb_gdb on a rooted N5 (running L), please fix it or revert > > the > > > > CL. > > > > > > I tried this on a rooted N5 on L prior to giving approval... argh. > > > > Checked again, unable to reproduce this error on a rooted N5 on L. > > > > > > > > > fqian@isabella:/usr/local/google/code/clankium-master/src$ adb_gdb_chrome > > > > --verbose > > > > Auto-config: > > > > > > > > > > --adb=/usr/local/google/code/clankium-master/src/third_party/android_tools/sdk//platform-tools/adb > > > > Auto-config: > > > > > > > > > > --toolchain=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin > > > > Host gdb client: > > > > > > > > > > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb > > > > Auto-config: > > > > > > > > > > --gdbserver=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > > > > Auto-config: > > > > --symbol-dir=/usr/local/google/code/clankium-master/src/out/Release/lib > > > > Device build fingerprint: > > > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > > > > Host build fingerprint: > > > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > > > > Auto-config: --no-pull-libs (fingerprint match) > > > > Found process PID: 32348 > > > > Shell UID: 0 > > > > Command prefix: '' > > > > Command suffix: '' > > > > Pushing gdbserver > > > > > > > > > > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > > > > to /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > > > > run-as: Package 'com.google.android.apps.chrome' is not debuggable > > > > > > This line stands out to me. > > Indeed, this line appears to be the problem. We don't package Release builds > with android:debuggable > (https://code.google.com/p/chromium/codesearch#chromium/src/build/android/ant/...), > so the run-as will fail when attempting to run with those packages. > > > > > > > > /system/bin/app_process.real: No such file or directory > > > > Pulling app_process from device > > > > Setting network redirection (host:5039 -> device:5039) > > > > Starting gdbserver in the background: > > > > adb shell > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > > > > :5039 --attach 32348 > > > > background job pid: 14872 > > > > Job control: [1]+ 14872 Done ( "$ADB" shell > > $COMMAND_PREFIX > > > > $TARGET_GDBSERVER :$TARGET_PORT --attach $PID $COMMAND_SUFFIX > > > $GDBSERVER_LOG > > > > 2>&1 ) > > > > ERROR: GDBServer could not attach to PID 32348! > > > > Failure log (use --verbose for more information): > > > > /system/bin/sh: > > > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746: not > found > > > > Killing background gdbserver process: 14872 > > > > Removing target gdbserver binary: > > > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746. > > > > Cleaning up: /tmp/fqian-adb-gdb-tmp-14746 Latest patch should address debugging for Release builds on rooted devices.
Message was sent while issue was closed.
On 2015/01/30 09:48:47, mille wrote: > On 2015/01/30 02:28:28, jbudorick wrote: > > On 2015/01/30 02:02:50, jbudorick wrote: > > > On 2015/01/30 01:35:02, jbudorick wrote: > > > > On 2015/01/30 01:30:32, Feng Qian wrote: > > > > > On 2015/01/29 18:19:41, I haz the power (commit-bot) wrote: > > > > > > Patchset 1 (id:??) landed as > > > > > > https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e > > > > > > Cr-Commit-Position: refs/heads/master@{#313737} > > > > > > > > > > This CL breaks adb_gdb on a rooted N5 (running L), please fix it or > revert > > > the > > > > > CL. > > > > > > > > I tried this on a rooted N5 on L prior to giving approval... argh. > > > > > > Checked again, unable to reproduce this error on a rooted N5 on L. > > > > > > > > > > > > fqian@isabella:/usr/local/google/code/clankium-master/src$ > adb_gdb_chrome > > > > > --verbose > > > > > Auto-config: > > > > > > > > > > > > > > > --adb=/usr/local/google/code/clankium-master/src/third_party/android_tools/sdk//platform-tools/adb > > > > > Auto-config: > > > > > > > > > > > > > > > --toolchain=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin > > > > > Host gdb client: > > > > > > > > > > > > > > > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb > > > > > Auto-config: > > > > > > > > > > > > > > > --gdbserver=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > > > > > Auto-config: > > > > > --symbol-dir=/usr/local/google/code/clankium-master/src/out/Release/lib > > > > > Device build fingerprint: > > > > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > > > > > Host build fingerprint: > > > > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys > > > > > Auto-config: --no-pull-libs (fingerprint match) > > > > > Found process PID: 32348 > > > > > Shell UID: 0 > > > > > Command prefix: '' > > > > > Command suffix: '' > > > > > Pushing gdbserver > > > > > > > > > > > > > > > /usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver > > > > > to /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > > > > > run-as: Package 'com.google.android.apps.chrome' is not debuggable > > > > > > > > This line stands out to me. > > > > Indeed, this line appears to be the problem. We don't package Release builds > > with android:debuggable > > > (https://code.google.com/p/chromium/codesearch#chromium/src/build/android/ant/...), > > so the run-as will fail when attempting to run with those packages. > > > > > > > > > > > /system/bin/app_process.real: No such file or directory > > > > > Pulling app_process from device > > > > > Setting network redirection (host:5039 -> device:5039) > > > > > Starting gdbserver in the background: > > > > > adb shell > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746 > > > > > :5039 --attach 32348 > > > > > background job pid: 14872 > > > > > Job control: [1]+ 14872 Done ( "$ADB" shell > > > $COMMAND_PREFIX > > > > > $TARGET_GDBSERVER :$TARGET_PORT --attach $PID $COMMAND_SUFFIX > > > > $GDBSERVER_LOG > > > > > 2>&1 ) > > > > > ERROR: GDBServer could not attach to PID 32348! > > > > > Failure log (use --verbose for more information): > > > > > /system/bin/sh: > > > > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746: not > > found > > > > > Killing background gdbserver process: 14872 > > > > > Removing target gdbserver binary: > > > > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746. > > > > > Cleaning up: /tmp/fqian-adb-gdb-tmp-14746 > > Latest patch should address debugging for Release builds on rooted devices. Since your original patch was already committed, could you upload the fix to a separate review? |