Skip to content

Native unwinding fails across signal frames on AArch64 #341

Description

@K0u1e

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

It looks like elfutils fails to unwind past the signal frame on AArch64, so pystack cannot recover the native frames below it. Would you be interested in a patch for this?

Expected Behavior

No response

Steps To Reproduce

run this script

import ctypes
import os
import signal
import subprocess


@ctypes.CFUNCTYPE(None, ctypes.c_int)
def dump_stack(*_):
    subprocess.run(
        ["pystack", "remote", "--native", "--no-color", str(os.getpid())]
    )


libc = ctypes.CDLL(None)
libc.signal.argtypes = (ctypes.c_int, ctypes.c_void_p)
libc.signal(signal.SIGUSR1, dump_stack)
os.kill(os.getpid(), signal.SIGUSR1)

and get

* - Unable to merge native stack due to insufficient native information - *

Pystack Version

1.7.0

Python Version

3.13

Linux distribution

Debian

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions