Date: Mon, 14 Feb 2022 11:03:47 +0000 From: Amit kumar <akamit91@hotmail.com> To: "freebsd-dtrace@FreeBSD.org" <freebsd-dtrace@FreeBSD.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Cc: "markj@FreeBSD.org" <markj@FreeBSD.org> Subject: dtrace fails to trace on FreeBSD-14(CURRENT) with ASLR and W^X Message-ID: <SJ0PR18MB49326C3D1DF915EB841CC2D8DC339@SJ0PR18MB4932.namprd18.prod.outlook.com>
index | next in thread | raw e-mail
[-- Attachment #1 --] Encountered this issue while running https://github.com/freebsd/freebsd-src/blob/main/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.d a somewhat simpler method to reproduce configuration file /usr/bin/find /usr/bin/find: ELF 64-bit LSB shared object, x86-64, <.....> kern.elf64.allow_wx: 0 kern.elf64.aslr.pie_enable: 1 kern.elf64.aslr.enable: 1 # dtrace -n pid92817:::entry dtrace: description 'pid92817:::entry' matched 4380 probes [2] + trace trap (core dumped) exec find / > /dev/null 2>&1 # exec find / > /dev/null 2>&1 & [1] 85293 # dtrace -n pid85293:a.out:: dtrace: description 'pid85293:a.out::' matched 6828 probes [1] + trace trap (core dumped) exec find / > /dev/null 2>&1 CPU ID FUNCTION:NAME 1 89149 find_execute:1f8 looking at find core in gdb (gdb) p $_siginfo $1 = { si_signo = 5, si_errno = 0, si_code = 3, . . . Can someone help me understand why am I seeing core due to SIGTRAP TRAP_DTRACE ? Regards Amit [-- Attachment #2 --] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style> </head> <body dir="ltr"> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Encountered this issue while running <a href="https://github.com/freebsd/freebsd-src/blob/main/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.d" id="LPNoLPOWALinkPreview">https://github.com/freebsd/freebsd-src/blob/main/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.d</a></div> <div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> a somewhat simpler method to reproduce </div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> configuration</div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <span style="margin:0px;font-size:12pt">file <span style="margin:0px;background-color:rgb(255, 255, 255);display:inline !important">/usr/bin/find</span></span><br> <span style="margin:0px;font-size:12pt">/usr/bin/find: ELF 64-bit LSB shared object, x86-64, <.....></span><br> </div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <span style="margin:0px;font-size:12pt"><br> </span></div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> kern.elf64.allow_wx: 0 <div>kern.elf64.aslr.pie_enable: 1<br> </div> <div>kern.elf64.aslr.enable: 1</div> <div><br> </div> </div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> # dtrace -n pid92817:::entry <div>dtrace: description 'pid92817:::entry' matched 4380 probes</div> <span>[2] + trace trap (core dumped) exec find / > /dev/null 2>&1</span><br> </div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <span><br> </span></div> <div style=""><span style="display: inline !important; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"># exec find / > /dev/null 2>&1 &</span><br> <span style="display: inline !important; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">[1] 85293</span><br style="box-sizing: border-box;"> <span style="display: inline !important; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"># dtrace -n pid85293:a.out::</span><br style="box-sizing: border-box;"> <span style="display: inline !important; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">dtrace: description 'pid85293:a.out::' matched 6828 probes</span><br style="box-sizing: border-box;"> <span style="display: inline !important; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">[1] + trace trap (core dumped) exec find / > /dev/null 2>&1</span><br style="box-sizing: border-box;"> <span style="display: inline !important; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">CPU ID FUNCTION:NAME</span><br style="box-sizing: border-box;"> <span style="display: inline !important; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">1 89149 find_execute:1f8</span><br> </div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <span><br> </span></div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <span>looking at find core in gdb</span></div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <span>(gdb) p $_siginfo <div>$1 = {</div> <div> si_signo = 5,</div> <div> si_errno = 0,</div> <div> si_code = 3,</div> <div> .<br> </div> <div> .</div> <div> .</div> </span></div> <div> <div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Can someone help me understand why am I seeing core due to </span><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">SIGTRAP TRAP_DTRACE ?</span></div> <div id="Signature"> <div style=""><br> </div> <div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"> Regards</div> <div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"> Amit</div> </div> </div> </body> </html>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?SJ0PR18MB49326C3D1DF915EB841CC2D8DC339>
