Python should be compiled with USDT/dtrace user-space probes

Bug #1818778 reported by Trent Lloyd on 2019-03-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.7 (Ubuntu)
Trent Lloyd
python3.8 (Ubuntu)
Trent Lloyd

Bug Description

Python3.6 and later support being compiled with USDT/dtrace user-space probes, this allows tools such as perf and BPF utilities (bpfcc-tools) to do runtime profiling and tracing of Python execution.

Ubuntu should compile Python with this support to enable better debugging of Python applications in production. perf/bpf tools can be attached to running production processes without having to restart them under a debugger which may destroy the situation you are trying to observe. This would be particularly useful with OpenStack deployments for example.

The current python3.6/python3.7/python3.8 packages do not build with this support, because it requires a build-dependency on systemtap-sdt-dev and the option --with-dtrace to be passed at compile time.

systemtap-sdt-dev is not currently in main, however, it was previously approved for a MIR in Bug #1203590 - it seems the original packages this was required for (Source Package: ust) was demoted to universe at some point and the systemtap-sdt-dev dependency went with it. So I am hopeful it will be re-approved for main inclusion and allow this to be done

Trent Lloyd (lathiat) on 2019-03-06
Changed in python3.8 (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
assignee: nobody → Trent Lloyd (lathiat)
Trent Lloyd (lathiat) wrote :

Attaching debdiff showing how to enable build-time support. debian/control is generated for the python version by debian/ so we patch both files, then enable --with-dtrace in the rules.

At this stage this patch is blocked by the MIR for systemtap-sdt-dev, and I will also file this upstream in Debian for the same

Trent Lloyd (lathiat) wrote :

Adding patch (git format-patch) against upstream Debian cpython-team/python3 git repository (canonical home of debian/ for python3 packages)

Trent Lloyd (lathiat) on 2019-03-06
Changed in python3.7 (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
assignee: nobody → Trent Lloyd (lathiat)

The attachment "lp1818778-python3.8-enable-usdt.patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Trent Lloyd (lathiat) wrote :

You can unsubscribe ubuntu-sponsors from this

tags: removed: patch
Seth Arnold (seth-arnold) wrote :

The systemtap dependency may be easier to handle this time around than last time: we've slightly changed the rules about build-dependencies:

Be sure to pay attention to this point:

> - If you have a build-dependency which does not result in a runtime
> dependency, but *does* result in code being copied into the final
> package, you must ensure that this code copying is declared using the
> Built-Using header[5]. (This is an uncommon case; the vast majority of
> the affected packages are written in go, where our package toolchain
> handles this automatically today.)


Simon Quigley (tsimonq2) wrote :

Unsubscribing the Ubuntu Sponsors Team as per the comment in #4.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.8 - 3.8.0~a4-3

python3.8 (3.8.0~a4-3) experimental; urgency=medium

  * Update symbols files.

 -- Matthias Klose <email address hidden> Wed, 15 May 2019 00:30:25 +0200

Changed in python3.8 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers