From owner-freebsd-dtrace@freebsd.org Tue Nov 7 11:17:02 2017 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2CCAE5592E for ; Tue, 7 Nov 2017 11:17:02 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3710C7AF23; Tue, 7 Nov 2017 11:17:01 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id B0E6413AE; Tue, 7 Nov 2017 12:16:52 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id Vcp7LoU3Ad_A; Tue, 7 Nov 2017 12:16:48 +0100 (CET) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id 90E1C1409; Tue, 7 Nov 2017 12:15:22 +0100 (CET) Received: from bsdlo.incore (bsdlo.incore [192.168.0.84]) by mail.local.incore (Postfix) with ESMTP id 7FC01508DE; Tue, 7 Nov 2017 12:15:22 +0100 (CET) Message-ID: <5A0195CA.2010907@incore.de> Date: Tue, 07 Nov 2017 12:15:22 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Mark Johnston CC: "freebsd-dtrace@freebsd.org" Subject: Re: dtrace pid provider on entry == Trace/BPT trap process References: <59AE834E.1090700@incore.de> <20170905144154.GC65864@wkstn-mjohnston.west.isilon.com> In-Reply-To: <20170905144154.GC65864@wkstn-mjohnston.west.isilon.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2017 11:17:02 -0000 Maybe the following is of interest for DTrace experts: >> I use FreeBSD 10.3-STABLE r317936 with updated /usr/lib/dtrace/ip.c and >> see an issue that in my opinion should have been solved in r269342: > > 10.3 would be missing a number of other fixes for issues that might > cause the symptom you're seeing. Unfortunately, userland DTrace is not > very usable on FreeBSD before 11.0. I have repeated my looptest on a server running FreeBSD 12.0-CURRENT #0 r324306 with GENERIC kernel. I saw the same problem as described before for FreeBSD 10.3-Stable r317936: Nov 7 10:54:09 dssbkp2 kernel: pid 38041 (looptest), uid 1003: exited on signal 5 Further I saw following error message from dtrace: dtrace: failed to grab pid 38622: Device busy. After some minutes playing around the server crashed with panic: PHOLD of exiting process 0xfffff80004c80540 cpuid = 0 time = 1510051083 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0231e22700 vpanic() at vpanic+0x19c/frame 0xfffffe0231e22780 kassert_panic() at kassert_panic+0x126/frame 0xfffffe0231e227f0 uread() at uread+0x173/frame 0xfffffe0231e22830 fasttrap_tracepoint_remove() at fasttrap_tracepoint_remove+0x23/frame 0xfffffe0231e22860 fasttrap_tracepoint_disable() at fasttrap_tracepoint_disable+0x31a/frame 0xfffffe0231e228d0 fasttrap_pid_disable() at fasttrap_pid_disable+0x8e/frame 0xfffffe0231e22910 dtrace_ecb_disable() at dtrace_ecb_disable+0x11c/frame 0xfffffe0231e22940 dtrace_state_destroy() at dtrace_state_destroy+0x169/frame 0xfffffe0231e22980 dtrace_dtr() at dtrace_dtr+0x63/frame 0xfffffe0231e229a0 devfs_destroy_cdevpriv() at devfs_destroy_cdevpriv+0x8b/frame 0xfffffe0231e229c0 devfs_close_f() at devfs_close_f+0x65/frame 0xfffffe0231e229f0 closef() at closef+0x1f5/frame 0xfffffe0231e22a80 closefp() at closefp+0x9f/frame 0xfffffe0231e22ac0 amd64_syscall() at amd64_syscall+0x79b/frame 0xfffffe0231e22bf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0231e22bf0 --- syscall (6, FreeBSD ELF64, sys_close), rip = 0x80128f47a, rsp = 0x7fffffffe878, rbp = 0x7fffffffe890 --- >> I run a simple program looptest, that loops around a sprintf() call and >> want to check this program with >> >> dtrace -n 'pid$target:libc.so.*::entry {@[probefunc] = count();}' -p >> $(pgrep looptest) >> dtrace: description 'pid$target:libc.so.*::entry ' matched 3863 probes >> >> After some seconds I hit CTRL-C and see >> >> __vfprintf 741685 >> localeconv_l 741685 >> memset 741685 >> sprintf 741685 >> vsprintf 741685 >> __sfvwrite 1483369 >> memcpy 2225052 >> >> and at the same time looptest stops with >> Trace/BPT trap (Speicherabzug geschrieben) >> and on the console I see the kernel message >> pid 67550 (looptest), uid 1003: exited on signal 5 (core dumped) >> >> The trap does not occur all the time, but it is no problem to repeat the >> trap. -- Andreas Longwitz From owner-freebsd-dtrace@freebsd.org Thu Nov 9 01:19:13 2017 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15220E60C15 for ; Thu, 9 Nov 2017 01:19:13 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id F37546F88C for ; Thu, 9 Nov 2017 01:19:12 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: by mailman.ysv.freebsd.org (Postfix) id F2D64E60C14; Thu, 9 Nov 2017 01:19:12 +0000 (UTC) Delivered-To: dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F27C4E60C13 for ; Thu, 9 Nov 2017 01:19:12 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5A556F88B for ; Thu, 9 Nov 2017 01:19:09 +0000 (UTC) (envelope-from gnn@neville-neil.com) X-Originating-IP: 50.1.62.131 Received: from [192.168.1.4] (50-1-62-131.dsl.dynamic.fusionbroadband.com [50.1.62.131]) (Authenticated sender: gnn@neville-neil.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 52503172094 for ; Thu, 9 Nov 2017 02:19:01 +0100 (CET) From: "George Neville-Neil" To: dtrace@FreeBSD.org Subject: This week's hangout Date: Wed, 08 Nov 2017 17:18:19 -0800 Message-ID: <79B30D51-9A84-49E0-98D7-3C8FAACC0528@neville-neil.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; markup=markdown X-Mailer: MailMate (1.9.7r5425) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Nov 2017 01:19:13 -0000 Howdy, I won't be able to run the hangout and Mark Johnston is heading to Taipei for BSDTW, the same as I am. If folks do run a hangout please put notes up on the Wiki. Best George From owner-freebsd-dtrace@freebsd.org Sat Nov 11 02:52:22 2017 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7842E5C651 for ; Sat, 11 Nov 2017 02:52:22 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg0-x22f.google.com (mail-pg0-x22f.google.com [IPv6:2607:f8b0:400e:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99AE86F9F1 for ; Sat, 11 Nov 2017 02:52:22 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg0-x22f.google.com with SMTP id g6so8736714pgn.6 for ; Fri, 10 Nov 2017 18:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6P366oasgo1QZzEAHN4ZozgKKB7QKiorAagHJYdLkPo=; b=Mdar0mnPOq/uRgTon9Q2FH/gr22SduPrS/LbuYr7XjLX7RkwMqyZ8ysQBji1wX4J+m 68UXQFYiBZAbPnx+AHiAHEC1WpOE1lXio7QcBa8nPWR6uBo9MpKyZReOb+Xs+peoKiRk VRe70IK9gY797zg+cQUNF0gejN2AHov28sCvTawKOHumswbKrMfVy175h5+v//td5vJ6 e73b60d68zwH6da6QL/6OkxN4qJNQ9VbZ74dl2/9r8IHLgd05httYJaYMCN2h7P6IO9D SWPp2V5iIimq3e5FNnnk/DgJ6uMH2G+tCKFsbgJL2VN1X//AE98FYYqKl/cwEnSBgeTj gcfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=6P366oasgo1QZzEAHN4ZozgKKB7QKiorAagHJYdLkPo=; b=XyIqz/1L+rBMcvmxDssvGwHktzHSwx6JChqLFngzZVlTo83C1iRpATtOVMXUW96NaA tLb5db0l8YBW009vtcrF809032ffgoT3Qj4ar9U0VK7dDdNRcsNW/mrFJzVONXt9KpRp yNM42iD835QTj6Zjco+AQUbL6BJcdUTXY/TFnqmRuY+nuDlSXbZNU6zKLyjxoy5mOICU KpzfCZ4Bs33bBhl0bIonXud81D0HeIPbukVOcK7tUgvvJl/yyk+cXbYs/IpGkLa6GO27 EjcX8ptbo4R3LjjZkRvpT1/pRy6+v1o73sRgQoljWpQhSVhKbNhrRYawqmvBSIsICQ/W Aq1A== X-Gm-Message-State: AJaThX6APtXcB+Z8V20mMNarblye+Uu90uKzJL+J1bBzrq51aejl4onA 4/WpOEHzOH8dEFGDxaVBUuw= X-Google-Smtp-Source: AGs4zMZtBs34CgM9inM4bQWhBt/fwBLrL7xnQVPvcYxE6wIFBmJWwuHTvHmXzcJKahMjJ4jYEPG65A== X-Received: by 10.99.189.18 with SMTP id a18mr2253602pgf.168.1510368741920; Fri, 10 Nov 2017 18:52:21 -0800 (PST) Received: from bish (59-125-183-239.HINET-IP.hinet.net. [59.125.183.239]) by smtp.gmail.com with ESMTPSA id r67sm16062173pfj.59.2017.11.10.18.52.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 18:52:20 -0800 (PST) Sender: Mark Johnston Date: Fri, 10 Nov 2017 22:52:12 -0500 From: Mark Johnston To: Andreas Longwitz Cc: "freebsd-dtrace@freebsd.org" Subject: Re: dtrace pid provider on entry == Trace/BPT trap process Message-ID: <20171111035212.GA1176@bish> References: <59AE834E.1090700@incore.de> <20170905144154.GC65864@wkstn-mjohnston.west.isilon.com> <5A0195CA.2010907@incore.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A0195CA.2010907@incore.de> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Nov 2017 02:52:22 -0000 On Tue, Nov 07, 2017 at 12:15:22PM +0100, Andreas Longwitz wrote: > Maybe the following is of interest for DTrace experts: > > >> I use FreeBSD 10.3-STABLE r317936 with updated /usr/lib/dtrace/ip.c and > >> see an issue that in my opinion should have been solved in r269342: > > > > 10.3 would be missing a number of other fixes for issues that might > > cause the symptom you're seeing. Unfortunately, userland DTrace is not > > very usable on FreeBSD before 11.0. > > I have repeated my looptest on a server running FreeBSD 12.0-CURRENT #0 > r324306 with GENERIC kernel. I saw the same problem as described before > for FreeBSD 10.3-Stable r317936: > > Nov 7 10:54:09 dssbkp2 kernel: pid 38041 (looptest), uid > 1003: exited on signal 5 > > Further I saw following error message from dtrace: > > dtrace: failed to grab pid 38622: Device busy. > > After some minutes playing around the server crashed with > > panic: PHOLD of exiting process 0xfffff80004c80540 Sorry for the delayed reply. I think this assertion is bogus: the process in question is already held at this point, so it can't continue exiting anyway. I think the patch below will address this and the SIGTRAP crashes. Could you give it a try? diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c b/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c index 652fa8928589..63db17199fb4 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c @@ -35,9 +35,7 @@ uread(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) { ssize_t n; - PHOLD(p); n = proc_readmem(curthread, p, uaddr, kaddr, len); - PRELE(p); if (n != len) return (ENOMEM); return (0); @@ -48,9 +46,7 @@ uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) { ssize_t n; - PHOLD(p); n = proc_writemem(curthread, p, uaddr, kaddr, len); - PRELE(p); if (n != len) return (ENOMEM); return (0); diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c index 82353cbb235d..d721270fd425 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -1097,6 +1098,8 @@ fasttrap_tracepoint_disable(proc_t *p, fasttrap_probe_t *probe, uint_t index) p->p_dtrace_count--; } + (void)quiesce_all_cpus("fasttrap", 0); + /* * Remove the probe from the hash table of active tracepoints. */ diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c index d6655a0b3c55..0364aaf55094 100644 --- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c +++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c @@ -1715,11 +1715,7 @@ fasttrap_pid_probe(struct reg *rp) ASSERT(i <= sizeof (scratch)); -#ifdef illumos if (fasttrap_copyout(scratch, (char *)addr, i)) { -#else - if (uwrite(p, scratch, i, addr)) { -#endif fasttrap_sigtrap(p, curthread, pc); new_pc = pc; break; From owner-freebsd-dtrace@freebsd.org Sat Nov 11 20:14:51 2017 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13BFCE72DA4 for ; Sat, 11 Nov 2017 20:14:51 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B66AB6D641; Sat, 11 Nov 2017 20:14:50 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id B6E4315FD; Sat, 11 Nov 2017 21:14:41 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id 3XG31TuE3IDW; Sat, 11 Nov 2017 21:14:40 +0100 (CET) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id 062E21544; Sat, 11 Nov 2017 21:14:40 +0100 (CET) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.local.incore (Postfix) with ESMTP id A718F508A2; Sat, 11 Nov 2017 21:14:39 +0100 (CET) Message-ID: <5A075A2F.1040604@incore.de> Date: Sat, 11 Nov 2017 21:14:39 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Mark Johnston CC: "freebsd-dtrace@freebsd.org" Subject: Re: dtrace pid provider on entry == Trace/BPT trap process References: <59AE834E.1090700@incore.de> <20170905144154.GC65864@wkstn-mjohnston.west.isilon.com> <5A0195CA.2010907@incore.de> <20171111035212.GA1176@bish> In-Reply-To: <20171111035212.GA1176@bish> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Nov 2017 20:14:51 -0000 > Maybe the following is of interest for DTrace experts: >> >>>> I use FreeBSD 10.3-STABLE r317936 with updated /usr/lib/dtrace/ip.c and >>>> see an issue that in my opinion should have been solved in r269342: >>> 10.3 would be missing a number of other fixes for issues that might >>> cause the symptom you're seeing. Unfortunately, userland DTrace is not >>> very usable on FreeBSD before 11.0. >> I have repeated my looptest on a server running FreeBSD 12.0-CURRENT #0 >> r324306 with GENERIC kernel. I saw the same problem as described before >> for FreeBSD 10.3-Stable r317936: >> >> Nov 7 10:54:09 dssbkp2 kernel: pid 38041 (looptest), uid >> 1003: exited on signal 5 >> >> Further I saw following error message from dtrace: >> >> dtrace: failed to grab pid 38622: Device busy. >> >> After some minutes playing around the server crashed with >> >> panic: PHOLD of exiting process 0xfffff80004c80540 > > Sorry for the delayed reply. I think this assertion is bogus: the > process in question is already held at this point, so it can't continue > exiting anyway. I think the patch below will address this and the > SIGTRAP crashes. Could you give it a try? > > diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c b/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c > index 652fa8928589..63db17199fb4 100644 > --- a/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c > +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c > @@ -35,9 +35,7 @@ uread(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) > { > ssize_t n; > > - PHOLD(p); > n = proc_readmem(curthread, p, uaddr, kaddr, len); > - PRELE(p); > if (n != len) > return (ENOMEM); > return (0); > @@ -48,9 +46,7 @@ uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) > { > ssize_t n; > > - PHOLD(p); > n = proc_writemem(curthread, p, uaddr, kaddr, len); > - PRELE(p); > if (n != len) > return (ENOMEM); > return (0); > diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c > index 82353cbb235d..d721270fd425 100644 > --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c > +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c > @@ -64,6 +64,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -1097,6 +1098,8 @@ fasttrap_tracepoint_disable(proc_t *p, fasttrap_probe_t *probe, uint_t index) > p->p_dtrace_count--; > } > > + (void)quiesce_all_cpus("fasttrap", 0); > + > /* > * Remove the probe from the hash table of active tracepoints. > */ > diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c > index d6655a0b3c55..0364aaf55094 100644 > --- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c > +++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c > @@ -1715,11 +1715,7 @@ fasttrap_pid_probe(struct reg *rp) > > ASSERT(i <= sizeof (scratch)); > > -#ifdef illumos > if (fasttrap_copyout(scratch, (char *)addr, i)) { > -#else > - if (uwrite(p, scratch, i, addr)) { > -#endif > fasttrap_sigtrap(p, curthread, pc); > new_pc = pc; > break; I have applied your patch, no crash, no core or error message so far. But dtrace does not exit after CTRL C. After starting looptest I enter the dtrace command and type CTRL C after some seconds: dtrace -n 'pid$target:libc.so.*::entry {@[probefunc] = count();}' -p $(pgrep looptest) dtrace: description 'pid$target:libc.so.*::entry ' matched 4068 probes ^C __vfprintf 226824 localeconv_l 226824 memset 226824 sprintf 226824 vsprintf 226824 __sfvwrite 453647 memcpy 680469 ^C^C^C^C^C^C I could not stop dtrace, it does not exit. procstat gives PID PPID PGID SID TSID THR LOGIN WCHAN EMUL COMM 28183 28031 28183 28025 28025 1 longwitz fasttrap FreeBSD ELF64 dtrace If I stop looptest, then dtrace process stops immediately too. -- Andreas Longwitz