From owner-freebsd-dtrace@FreeBSD.ORG Sun Dec 21 23:22:29 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD453DD0 for ; Sun, 21 Dec 2014 23:22:29 +0000 (UTC) Received: from mail-pd0-x22a.google.com (mail-pd0-x22a.google.com [IPv6:2607:f8b0:400e:c02::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA8BA2E19 for ; Sun, 21 Dec 2014 23:22:29 +0000 (UTC) Received: by mail-pd0-f170.google.com with SMTP id v10so4697143pde.29 for ; Sun, 21 Dec 2014 15:22:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=2Iz7bl0HY47RCC5RNTyVtcgCvHl+qdxx39Ius9bTemE=; b=b99zUAbjRu6zZRf+lLq4mdPqD/b9qqrfEiSOEf5Hr3SU5Fi8z5cNiotV+grQp6HCCD NjwEiKR69gd7cVzi+l57oVOHpCYLypYAO86pLHtyAafoJy5N1trwcNQBkMkJx3gFllRn LOAYAe/itka3HLR35XO0wsmWbGrA7s0P9PQY+2kNP0c2TEdhIqEWTfc1SWdaTDkQSOLF e0QrHxFJKp0hGuoMbc++QwlIEnshZbXdXKXF4RZyomKUvFR2jcMhEL3H6tYcuXvxblr+ Hq6ReS8rXCG1f2VFNKyBuKOinWTnePCeidhdNCTKK4t81HoVDIrlgxe2RnoWOtVkuGl+ KFYQ== X-Received: by 10.68.134.134 with SMTP id pk6mr30849110pbb.146.1419204149275; Sun, 21 Dec 2014 15:22:29 -0800 (PST) Received: from [192.168.1.6] (c-71-237-219-238.hsd1.or.comcast.net. [71.237.219.238]) by mx.google.com with ESMTPSA id f12sm15537224pat.43.2014.12.21.15.22.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Dec 2014 15:22:27 -0800 (PST) Message-ID: <54975631.3040106@gmail.com> Date: Sun, 21 Dec 2014 15:22:25 -0800 From: Lacey Powers User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-dtrace@freebsd.org Subject: elf_begin failed on postgresql 9.4 with dtrace enabled Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sun, 21 Dec 2014 23:22:30 -0000 Hello Everyone, I was attempting to build and use PostgreSQL with dtrace on FreeBSD 10.1 on my home workstation. It builds, and the binary works, but fails to register any probes. After double checking that I had the dtraceall kernel module loaded, changing permissions on /dev/dtrace/helper (0666), verifying that devel/libelf was loaded, and digging around source code and Google for debug flags, I'm at a loss for what else to do. Here is the error: [pgsql@talizorah ~]$ DTRACE_DOF_INIT_DEBUG=1 /usr/local/bin/postgres -D /usr/local/pgsql/9.4/data dtrace DOF postgres: elf_begin failed LOG: ending log output to stderr HINT: Future log output will go to log destination "syslog". dtrace DOF postgres: DTrace ioctl failed to remove DOF (-1) dtrace DOF postgres: DTrace ioctl failed to remove DOF (-1) dtrace DOF postgres: DTrace ioctl failed to remove DOF (-1) ^Cdtrace DOF postgres: dtrace DOF postgres: DTrace ioctl failed to remove DOF (-1) DTrace ioctl failed to remove DOF (-1) dtrace DOF postgres: DTrace ioctl failed to remove DOF (-1) dtrace DOF postgres: DTrace ioctl failed to remove DOF (-1) dtrace DOF postgres: DTrace ioctl failed to remove DOF (-1) dtrace DOF postgres: DTrace ioctl failed to remove DOF (-1) [pgsql@talizorah ~]$ And here is the output of pg_config, showing the enabled options. [0]lacey@talizorah:~$ pg_config BINDIR = /usr/local/bin DOCDIR = /usr/local/share/doc/postgresql HTMLDIR = /usr/local/share/doc/postgresql INCLUDEDIR = /usr/local/include PKGINCLUDEDIR = /usr/local/include/postgresql INCLUDEDIR-SERVER = /usr/local/include/postgresql/server LIBDIR = /usr/local/lib PKGLIBDIR = /usr/local/lib/postgresql LOCALEDIR = /usr/local/share/locale MANDIR = /usr/local/man SHAREDIR = /usr/local/share/postgresql SYSCONFDIR = /usr/local/etc/postgresql PGXS = /usr/local/lib/postgresql/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--with-libraries=/usr/local/lib' '--with-includes=/usr/local/include' '--enable-thread-safety' '--with-openssl' '--enable-dtrace' '--with-pam' '--with-libxml' '--enable-nls' '--without-gssapi' '--with-krb5' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd10.1' 'build_alias=amd64-portbld-freebsd10.1' 'CC=cc' 'CFLAGS=-O2 -pipe -march=native -O3 -funroll-loops -fstack-protector -fno-strict-aliasing' 'LDFLAGS= -L/usr/local/lib -pthread -lelf -Wl,-rpath,/usr/lib:/usr/local/lib -fstack-protector' 'LIBS=' 'CPPFLAGS=' 'CPP=cpp' 'LDFLAGS_SL=' CC = cc CPPFLAGS = -I/usr/local/include/libxml2 -I/usr/include -I/usr/local/include -I/usr/local/include CFLAGS = -O2 -pipe -march=native -O3 -funroll-loops -fstack-protector -fno-strict-aliasing -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv CFLAGS_SL = -fPIC -DPIC LDFLAGS = -L../../../src/common -L/usr/local/lib -pthread -lelf -Wl,-rpath,/usr/lib:/usr/local/lib -fstack-protector -L/usr/local/lib -L/usr/lib -L/usr/local/lib -Wl,--as-needed -Wl,-R'/usr/local/lib' LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lintl -lxml2 -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lm VERSION = PostgreSQL 9.4.0 [0]lacey@talizorah:~$ Are there suggestions for how to fix this? I would be happy to provide further details if needed. Thank you for your time and assistance, Lacey