Date: Tue, 18 Jan 2011 00:16:28 -0600 From: Javier Liendo <javier@liendo.net> To: freebsd-questions@freebsd.org Subject: dtrace/userland causing segmentation fault Message-ID: <AANLkTinhPCdkt7PzjK=SgEeHQS4tZuwT8Za9kBpvVe0G@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
hello freebsd gurus... i'm currently using FreeBSD 9.0-CURRENT-201101... dtrace is enable and working [root@ ~]# dtrace -l | tail -5 41473 profile tick-1= 000 41474 profile tick-5= 000 41475 profile tick-1= sec 41476 database5533 db main query-done 41477 database5533 db main query-start i=B4m trying to use dtrace with a very basic userland program and i=B4m 100% of the time getting segmentation faults... ------ probes definition file ------ [root@ ~]# cat simple_probes.d provider simple { probe loop(int); }; ------ simple program ------ [root@ ~]# cat simple.c #include <stdio.h> #include "simple_probes.h" int main() { int i; i=3D0; while(1) { printf("%d\n",i); i++; SIMPLE_LOOP(i); } return(0); } ------ the steps i use to get the program compiled are ------ [root@ ~]# dtrace -C -h -s simple_probes.d [root@ ~]# gcc -c simple.c [root@ ~]# dtrace -G -s simple_probes.d simple.o [root@ ~]# gcc -lelf -o simple simple_probes.o simple.o ------ but when i run the program i always get segmentation fault >:( -----= - [root@ ~]# ./simple 0 Segmentation fault: 11 (core dumped) i=B4ve been banging my head against a wall trying to troubleshoot this issue with obviously no success... have any of the freebsd gurus found a similar behavior in the past regarding userland dtrace? any pointers/links/words of encouragement will be greatly appreciated... regards, javier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinhPCdkt7PzjK=SgEeHQS4tZuwT8Za9kBpvVe0G>