From owner-freebsd-current@FreeBSD.ORG Sun Jan 1 12:17:33 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2CA106564A for ; Sun, 1 Jan 2012 12:17:33 +0000 (UTC) (envelope-from olevole@olevole.ru) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id F00668FC0C for ; Sun, 1 Jan 2012 12:17:32 +0000 (UTC) Received: by eekc50 with SMTP id c50so17613174eek.13 for ; Sun, 01 Jan 2012 04:17:31 -0800 (PST) Received: by 10.14.50.204 with SMTP id z52mr18308902eeb.92.1325420251612; Sun, 01 Jan 2012 04:17:31 -0800 (PST) Received: from gizmo.my.domain (nat140-249-205-109.tvoe.tv. [109.205.249.140]) by mx.google.com with ESMTPS id t1sm176223655eeb.3.2012.01.01.04.17.29 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jan 2012 04:17:30 -0800 (PST) From: Oleg Ginzburg To: freebsd-current@freebsd.org Date: Sun, 1 Jan 2012 16:18:07 +0400 User-Agent: KMail/1.13.7 (FreeBSD/9.0-PRERELEASE; KDE/4.7.3; amd64; ; ) References: <201112292137.33189.olevole@olevole.ru> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201201011618.08008.olevole@olevole.ru> Cc: Ryan Stone Subject: Re: segfault from php/freebsd/dtrace X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2012 12:17:33 -0000 On Saturday 31 December 2011 23:25:51 Ryan Stone wrote: > On Thu, Dec 29, 2011 at 12:37 PM, Oleg Ginzburg wrote: > > Hi maillist, > > > > I try to use dtrace + php/dtrace on the freebsd. In certain cases ive get > > Segmentation fault and don't understand what of subsystem has a problem. > > Yes, Userland DTrace is unfortunately still very experimental at this > point. I've got a list of at least 10 outstanding bugs that I hope to > start addressing early in the new year. > > In your case, dtrace(1) and/or libproc does not clean up after itself > properly in the case of an error. I can assume that it is: --//Cut of /usr/src/gnu/usr.bin/gdb/libgdb/fbsd-threads.c//-- if (fbsd_thread_active) { gdb_assert (proc_handle.pid == 0); << Here is 484 string mentioned by backtrace << fbsd_thread_active = 0; } --- related with the first process php which I start for providing php dtrace probes. Thanks to this process other code passes through php/dtrace and this process doesn't stop. Last action by backtrace is: #0 0x00000008021c6a37 in strlen () from /lib/libc.so.7 Unfortunately at the expense of DEBUG symbols, process have a bit more memory, so this problem isn't present and i couldn't see value of variables in this place and whence it is caused. > I'm not entirely sure what is > causing the segfault in php, though. Which version are you running? > The output of uname -a would be helpful. At the moment of test (on December, 23th) it there was last version 9- RELENG/amd64 from SVN %uname -a: FreeBSD fbsd-strace.my.domain 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #0: Fri Dec 23 16:56:09 MSK 2011 root@t.my.domain:/usr/obj/usr/src/sys/G-DTRACE amd64 Kernel config: %cat /sys/amd64/conf/G-DTRACE include GENERIC ident G-DTRACE options KDTRACE_HOOKS # all architectures - enable general DTrace hooks options DDB_CTF # all architectures - kernel ELF linker loads CTF data options KDTRACE_FRAME # amd64 - ensure frames are compiled in makeoptions WITH_CTF=1 #nomakeoptions DEBUG #nooptions COMPAT_FREEBSD4 # Compatible with FreeBSD4 #nooptions COMPAT_FREEBSD5 # Compatible with FreeBSD5 #nooptions COMPAT_FREEBSD6 # Compatible with FreeBSD6 #nooptions COMPAT_FREEBSD7 # Compatible with FreeBSD7 %cat /etc/make.conf WITH_CTF=1 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"