5 Replies Latest reply: Sep 11, 2013 2:50 PM by NickAlcock RSS

    DTrace stuck when listing probes with "-P" and "-p"

    GregoryG.

      Hello,

      To provide some other feedback with UEK3/Dtrace 0.4 Beta1

      1/- I've built a small USDT sample:

      demo_probes.d

      provider demo {
       probe progress__counter(int);
      };
      

      demo.c

      #include <sys/sdt.h>
      
      /*
       ** USDT probes with DTrace and UEK3 beta1
       **/
      
      int main(int argc, char *argv[]) {
         int i=0;
      
         while (1) {
            sleep(1); 
            i++; 
            DTRACE_PROBE1(demo, progress__counter, i);
         }
      }

      2/- When I run it and use -p and -l together, it works well:

      dtrace -p 7276 -l |grep demo
        803   demo7276              demo                              main progress-counter

      3/- When I use -p -P and -l together, the command get stuck:

      dtrace -p 7276 -P 'demo7276' -l

      In this case, running strace on dtrace shows:

      strace -p 9018
      Process 9018 attached - interrupt to quit
      futex(0x101d3dc, FUTEX_WAIT_PRIVATE, 1, NULL

      Best Regards

      Gregory