Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Sep 2023 20:00:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273607] ktrace(1) doesn't log some system calls
Message-ID:  <bug-273607-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273607

            Bug ID: 273607
           Summary: ktrace(1) doesn't log some system calls
           Product: Base System
           Version: 13.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

I run this code that calls the open(2) system function, and clock_gettime(2)
system function:

#include <time.h>
#include <fcntl.h>
#include <stdio.h>

int main() {
        printf("--before--\n");
        open(NULL, 0);
        struct timespec tp;
        clock_gettime(CLOCK_SECOND, &tp);
        printf("--after--\n");
        return 0;
}


When this program is run under ktrace(1) (with -di flags), only openat(2) c=
all
appears in the dump, and clock_gettime(2) doesn't appear there:

 83299 a.out    CALL  write(0x1,0x821ac4000,0xb)
 83299 a.out    GIO   fd 1 wrote 11 bytes
       "--before--
       "
 83299 a.out    RET   write 11/0xb
 83299 a.out    CALL  openat(AT_FDCWD,0,0<O_RDONLY>)
 83299 a.out    RET   openat -1 errno 14 Bad address
 83299 a.out    CALL  write(0x1,0x821ac4000,0xa)
 83299 a.out    GIO   fd 1 wrote 10 bytes
       "--after--
       "
 83299 a.out    RET   write 10/0xa
 83299 a.out    CALL  exit(0)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273607-227>