Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 2014 15:22:25 -0800
From:      Lacey Powers <lacey.leanne@gmail.com>
To:        freebsd-dtrace@freebsd.org
Subject:   elf_begin failed on postgresql 9.4 with dtrace enabled
Message-ID:  <54975631.3040106@gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54975631.3040106>