stap on syscall probe errors with "unresolved target-symbol expression: identifier"

Solution Verified - Updated -

Issue

  • stap on syscall probe errors with unresolved target-symbol expression: identifier
  • Using SystemTap to trace a syscall probe, the variables do not work and error when implementing
#!/usr/bin/stap

probe syscall.umask {
    printf("> %s[%d] %#o\n", execname(), tid(), $mask);
    printf("%s\n", task_ancestry(pid2task(tid()), 0));
    print_ubacktrace();
}

probe syscall.umask.return {
    printf("< %s[%d] %o\n", execname(), tid(), $retval);
}

Environment

  • Red Hat Enterprise Linux 8
  • SystemTap with probe alias such as the built-in syscall family

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content