Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

Running apps with GDB segfaults #1365

@jonnius

Description

@jonnius
  • Device: any (last tested at least FP2 and Xperia X)
  • Channel: any (last tested at devel and nightly CI builds)
  • Build: any (last tested on CI server build from 6th february)

Steps to reproduce

  • Install any app (commands below are for Webber 0.5.1)
  • Launch app at least once
  • Make system image writable
  • Install gdb and some debug packages:
sudo apt update
sudo apt install gdb libssl1.0.0-dbg
  • Enter a shell (e.g. via adb shell)
  • Run the app with gdb:
gdb -ex run --args /opt/click.ubuntu.com/webber.timsueberkrueb/0.5.1/lib/arm-linux-gnueabihf/bin/webber --desktop_file_hint=/home/phablet/.cache/ubuntu-app-launch/desktop/webber.timsueberkrueb_webber_0.5.1.desktop

Expected behavior

The app starts.

Actual behavior

There is a segfault before the app starts with

Program received signal SIGSEGV, Segmentation fault.
0xf77cadde in ?? () from /lib/ld-linux-armhf.so.3

Backtrace:

#0  0xf77cadde in ?? () from /lib/ld-linux-armhf.so.3
#1  0xf77cadf6 in ?? () from /lib/ld-linux-armhf.so.3
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

after installing libc6-dbg (and libssl1.0.0-dbg to get more informative output), there is just a (recoverable) SIGILL:

Program received signal SIGILL, Illegal instruction.
_armv7_tick () at armv4cpuid.S:94
94	armv4cpuid.S: No such file or directory.

Logfiles and additional information

  • When starting the app the same way without gdb, it works fine:
    /opt/click.ubuntu.com/webber.timsueberkrueb/0.5.1/lib/arm-linux-gnueabihf/bin/webber --desktop_file_hint=/home/phablet/.cache/ubuntu-app-launch/desktop/webber.timsueberkrueb_webber_0.5.1.desktop
  • Other devs confirmed that starting apps with GDB has been working before (may have been back in 2017 or 2018).
  • This bug is the reason we cannot implement on-device-debugging in Clickable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions