ltrace produces no debug output at all, workaround is compiling with "-fcf-protection=none"

Bug #1992939 reported by Vangelis Koukis
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ltrace (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Hello,

Running ltrace on any executable on current Ubuntu produces no debug output at all.
I have verified the behavior shown below on kinetic and focal.
Compiling with "-fcf-protection=none" seems to be a workaround.
The breakage seems to be related to "Intel CET Support" and the following upstream patch seems relevant:
https://gitlab.com/cespedes/ltrace/-/commit/ec563704ab5ef48bf308924de4ef021c4d0cd2af

More information on how to reproduce follows:

*** kinetic

# cat /etc/os-release
PRETTY_NAME="Ubuntu Kinetic Kudu (development branch)"
NAME="Ubuntu"
VERSION_ID="22.10"
VERSION="22.10 (Kinetic Kudu)"
VERSION_CODENAME=kinetic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=kinetic
LOGO=ubuntu-logo

# apt install ltrace
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ltrace is already the newest version (0.7.3-6.1ubuntu6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# ltrace ls -d .
.
+++ exited (status 0) +++

FAIL:

$ gcc -o hello hello.c
$ ltrace ./hello
Hello, World!
+++ exited (status 0) +++

SUCCESS:

$ gcc -fcf-protection=none -o hello hello.c
$ ltrace ./hello
puts("Hello, World!"Hello, World!
) = 14
+++ exited (status 0) +++

Thank you,
Vangelis

ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: ltrace 0.7.3-6.1ubuntu6
Uname: Linux 5.4.72-microsoft-standard-WSL2 x86_64
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Fri Oct 14 06:40:46 2022
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
SourcePackage: ltrace
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Vangelis Koukis (vkoukis) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ltrace (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Huh, I thought it was some combination of PIE and bindnow that broke ltrace. We should look at including the patch I guess, unless there will be a ltrace release including it at some point.

Another workaround btw is to use latrace instead.

tags: added: foundation-todo
Revision history for this message
Lukas Märdian (slyon) wrote :

Setting to Triaged/Low as there is an easy workaround available: using latrace.

Changed in ltrace (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
tags: added: foundations-todo
removed: foundation-todo
Revision history for this message
Walter (wdoekes) wrote :

Bug also present on Jammy. Workaround with `-fcf-protection=none` is confirmed to work.

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.