Bug 152502 - databases/postgresql90-server core dumps when built with dtrace support
Summary: databases/postgresql90-server core dumps when built with dtrace support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Chris Rees
Depends on:
Reported: 2010-11-23 01:10 UTC by Sevan Janiyan
Modified: 2011-11-30 18:50 UTC (History)
0 users

See Also:

patch.txt (729 bytes, text/plain)
2010-11-26 02:53 UTC, Sevan Janiyan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sevan Janiyan 2010-11-23 01:10:11 UTC
dtrace & debug options are set in the postgresql server port, no compiler flags set in make.conf or in the port options (userland was rebuilt with flags set).
Trying to fire up postgres results in a core dump. I've made the pgsql user a member of the wheel group but no joy, below is the output from gdb

Core was generated by `postgres'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libelf.so.1...done.
Loaded symbols for /usr/lib/libelf.so.1
Reading symbols from /usr/local/lib/libintl.so.9...done.
Loaded symbols for /usr/local/lib/libintl.so.9
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /usr/lib/libssl.so.6...done.
Loaded symbols for /usr/lib/libssl.so.6
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/lib/libgssapi.so.10...done.
Loaded symbols for /usr/lib/libgssapi.so.10
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libz.so.5...done.
Loaded symbols for /lib/libz.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x083d8941 in dtrace_dof_init ()
(gdb) bt
#0  0x083d8941 in dtrace_dof_init ()
#1  0x083dc315 in __do_global_ctors_aux ()
#2  0x08086b99 in _init ()
#3  0x00000000 in ?? ()
#4  0x00000000 in ?? ()
#5  0xbfbfec4c in ?? ()
#6  0x08087f4d in _start1 ()
#7  0x08087ed5 in _start ()
#8  0x28522f50 in dlclose () from /libexec/ld-elf.so.1
#9  0x00000001 in ?? ()
(gdb) info reg
eax            0xbfbfffa7    -1077936217
ecx            0x2854e22f    676651567
edx            0xbfbfffb0    -1077936208
ebx            0x2855b0d4    676704468
esp            0xbfbfeb84    0xbfbfeb84
ebp            0xbfbfec0c    0xbfbfec0c
esi            0xbfbfff98    -1077936232
edi            0xbfbfec70    -1077941136
eip            0x83d8941    0x83d8941
eflags         0x10282    66178
cs             0x33    51
ss             0x3b    59
ds             0x3b    59
es             0x3b    59
fs             0x3b    59
gs             0x3b    59
(gdb) disass
Dump of assembler code for function dtrace_dof_init:
0x083d88b0 <dtrace_dof_init+0>:    push   %ebp
0x083d88b1 <dtrace_dof_init+1>:    mov    %esp,%ebp
0x083d88b3 <dtrace_dof_init+3>:    sub    $0x88,%esp
0x083d88b9 <dtrace_dof_init+9>:    mov    0x8523a58,%eax
0x083d88be <dtrace_dof_init+14>:    mov    %eax,0xfffffff0(%ebp)
0x083d88c1 <dtrace_dof_init+17>:    xor    %eax,%eax
0x083d88c3 <dtrace_dof_init+19>:    mov    %ebx,0xfffffff4(%ebp)
0x083d88c6 <dtrace_dof_init+22>:    mov    %esi,0xfffffff8(%ebp)
0x083d88c9 <dtrace_dof_init+25>:    mov    %edi,0xfffffffc(%ebp)
0x083d88cc <dtrace_dof_init+28>:    movl   $0x851be19,(%esp)
0x083d88d3 <dtrace_dof_init+35>:    call   0x8086d90 <_init+516>
0x083d88d8 <dtrace_dof_init+40>:    test   %eax,%eax
0x083d88da <dtrace_dof_init+42>:    je     0x83d88f6 <dtrace_dof_init+70>
0x083d88dc <dtrace_dof_init+44>:    mov    0xfffffff0(%ebp),%eax
0x083d88df <dtrace_dof_init+47>:    xor    0x8523a58,%eax
0x083d88e5 <dtrace_dof_init+53>:    jne    0x83d8a73 <dtrace_dof_init+451>
0x083d88eb <dtrace_dof_init+59>:    mov    0xfffffff4(%ebp),%ebx
0x083d88ee <dtrace_dof_init+62>:    mov    0xfffffff8(%ebp),%esi
0x083d88f1 <dtrace_dof_init+65>:    mov    0xfffffffc(%ebp),%edi
0x083d88f4 <dtrace_dof_init+68>:    leave
0x083d88f5 <dtrace_dof_init+69>:    ret
0x083d88f6 <dtrace_dof_init+70>:    lea    0xffffff9c(%ebp),%eax
0x083d88f9 <dtrace_dof_init+73>:    movl   $0x2,0x4(%esp)
0x083d8901 <dtrace_dof_init+81>:    movl   $0xfffffffd,(%esp)
0x083d8908 <dtrace_dof_init+88>:    mov    %eax,0x8(%esp)
0x083d890c <dtrace_dof_init+92>:    call   0x8087df0 <memcpy+752>
0x083d8911 <dtrace_dof_init+97>:    inc    %eax
0x083d8912 <dtrace_dof_init+98>:    je     0x83d8966 <dtrace_dof_init+182>
0x083d8914 <dtrace_dof_init+100>:    mov    0xffffff9c(%ebp),%ebx
0x083d8917 <dtrace_dof_init+103>:    test   %ebx,%ebx
0x083d8919 <dtrace_dof_init+105>:    je     0x83d8966 <dtrace_dof_init+182>
0x083d891b <dtrace_dof_init+107>:    mov    0x4(%ebx),%esi
0x083d891e <dtrace_dof_init+110>:    movl   $0x2f,0x4(%esp)
0x083d8926 <dtrace_dof_init+118>:    mov    %esi,(%esp)
0x083d8929 <dtrace_dof_init+121>:    call   0x80874e0 <memcmp+1856>
0x083d892e <dtrace_dof_init+126>:    test   %eax,%eax
0x083d8930 <dtrace_dof_init+128>:    mov    %eax,0x8566880
0x083d8935 <dtrace_dof_init+133>:    je     0x83d8a41 <dtrace_dof_init+401>
0x083d893b <dtrace_dof_init+139>:    inc    %eax
0x083d893c <dtrace_dof_init+140>:    mov    %eax,0x8566880
0x083d8941 <dtrace_dof_init+145>:    cmpl   $0x464f447f,0x0
0x083d894b <dtrace_dof_init+155>:    je     0x83d897f <dtrace_dof_init+207>
0x083d894d <dtrace_dof_init+157>:    movl   $0x851be31,0x4(%esp)
0x083d8955 <dtrace_dof_init+165>:    movl   $0x0,(%esp)
0x083d895c <dtrace_dof_init+172>:    call   0x83d8720 <dprintf>
0x083d8961 <dtrace_dof_init+177>:    jmp    0x83d88dc <dtrace_dof_init+44>
0x083d8966 <dtrace_dof_init+182>:    movl   $0x851bee4,0x4(%esp)
0x083d896e <dtrace_dof_init+190>:    movl   $0x1,(%esp)
0x083d8975 <dtrace_dof_init+197>:    call   0x83d8720 <dprintf>
0x083d897a <dtrace_dof_init+202>:    jmp    0x83d88dc <dtrace_dof_init+44>
0x083d897f <dtrace_dof_init+207>:    mov    (%ebx),%edx
0x083d8981 <dtrace_dof_init+209>:    mov    $0x0,%eax
0x083d8986 <dtrace_dof_init+214>:    movl   $0x0,0xffffffec(%ebp)
0x083d898d <dtrace_dof_init+221>:    mov    %eax,0xffffffe8(%ebp)
0x083d8990 <dtrace_dof_init+224>:    xor    %esi,%esi
0x083d8992 <dtrace_dof_init+226>:    xor    %edi,%edi
0x083d8994 <dtrace_dof_init+228>:    cmpw   $0x3,0x10(%edx)
0x083d8999 <dtrace_dof_init+233>:    je     0x83d8a4c <dtrace_dof_init+412>
0x083d899f <dtrace_dof_init+239>:    mov    0x8566880,%eax
0x083d89a4 <dtrace_dof_init+244>:    mov    %edi,0xffffffe4(%ebp)
0x083d89a7 <dtrace_dof_init+247>:    lea    0xffffffa0(%ebp),%edi
0x083d89aa <dtrace_dof_init+250>:    mov    %esi,0xffffffe0(%ebp)
0x083d89ad <dtrace_dof_init+253>:    movl   $0x851be4c,0x8(%esp)
0x083d89b5 <dtrace_dof_init+261>:    movl   $0x40,0x4(%esp)
0x083d89bd <dtrace_dof_init+269>:    mov    %edi,(%esp)
0x083d89c0 <dtrace_dof_init+272>:    mov    %eax,0xc(%esp)
0x083d89c4 <dtrace_dof_init+276>:    call   0x80877a0 <memcmp+2560>
0x083d89c9 <dtrace_dof_init+281>:    movl   $0x851be4f,(%esp)
0x083d89d0 <dtrace_dof_init+288>:    call   0x8086d90 <_init+516>
0x083d89d5 <dtrace_dof_init+293>:    test   %eax,%eax
0x083d89d7 <dtrace_dof_init+295>:    mov    %eax,%ebx
0x083d89d9 <dtrace_dof_init+297>:    mov    0x852337c,%eax
0x083d89de <dtrace_dof_init+302>:    movl   $0x2,0x4(%esp)
0x083d89e6 <dtrace_dof_init+310>:    cmovne %ebx,%eax
0x083d89e9 <dtrace_dof_init+313>:    mov    %eax,0x852337c
0x083d89ee <dtrace_dof_init+318>:    mov    %eax,(%esp)
0x083d89f1 <dtrace_dof_init+321>:    call   0x8087980 <memcmp+3040>
0x083d89f6 <dtrace_dof_init+326>:    test   %eax,%eax
0x083d89f8 <dtrace_dof_init+328>:    mov    %eax,%esi
0x083d89fa <dtrace_dof_init+330>:    js     0x83d8a78 <dtrace_dof_init+456>
0x083d89fc <dtrace_dof_init+332>:    mov    %edi,0x8(%esp)
0x083d8a00 <dtrace_dof_init+336>:    movl   $0x64746803,0x4(%esp)
0x083d8a08 <dtrace_dof_init+344>:    mov    %esi,(%esp)
0x083d8a0b <dtrace_dof_init+347>:    call   0x8087100 <memcmp+864>
0x083d8a10 <dtrace_dof_init+352>:    mov    %eax,0x8566884
0x083d8a15 <dtrace_dof_init+357>:    inc    %eax
0x083d8a16 <dtrace_dof_init+358>:    je     0x83d8a55 <dtrace_dof_init+421>
0x083d8a18 <dtrace_dof_init+360>:    movl   $0x0,0x8(%esp)
0x083d8a20 <dtrace_dof_init+368>:    movl   $0x851bf34,0x4(%esp)
0x083d8a28 <dtrace_dof_init+376>:    movl   $0x1,(%esp)
0x083d8a2f <dtrace_dof_init+383>:    call   0x83d8720 <dprintf>
0x083d8a34 <dtrace_dof_init+388>:    mov    %esi,(%esp)
0x083d8a37 <dtrace_dof_init+391>:    call   0x8087790 <memcmp+2544>
0x083d8a3c <dtrace_dof_init+396>:    jmp    0x83d88dc <dtrace_dof_init+44>
0x083d8a41 <dtrace_dof_init+401>:    mov    %esi,0x8566880
0x083d8a47 <dtrace_dof_init+407>:    jmp    0x83d8941 <dtrace_dof_init+145>
0x083d8a4c <dtrace_dof_init+412>:    mov    (%ebx),%esi
0x083d8a4e <dtrace_dof_init+414>:    xor    %edi,%edi
0x083d8a50 <dtrace_dof_init+416>:    jmp    0x83d899f <dtrace_dof_init+239>
0x083d8a55 <dtrace_dof_init+421>:    movl   $0x0,0x8(%esp)
0x083d8a5d <dtrace_dof_init+429>:    movl   $0x851bf10,0x4(%esp)
0x083d8a65 <dtrace_dof_init+437>:    movl   $0x1,(%esp)
0x083d8a6c <dtrace_dof_init+444>:    call   0x83d8720 <dprintf>
0x083d8a71 <dtrace_dof_init+449>:    jmp    0x83d8a34 <dtrace_dof_init+388>
0x083d8a73 <dtrace_dof_init+451>:    call   0x8087c30 <memcpy+304>
0x083d8a78 <dtrace_dof_init+456>:    mov    0x852337c,%eax
0x083d8a7d <dtrace_dof_init+461>:    movl   $0x851be7c,0x4(%esp)
0x083d8a85 <dtrace_dof_init+469>:    movl   $0x1,(%esp)
0x083d8a8c <dtrace_dof_init+476>:    mov    %eax,0x8(%esp)
0x083d8a90 <dtrace_dof_init+480>:    call   0x83d8720 <dprintf>
0x083d8a95 <dtrace_dof_init+485>:    test   %ebx,%ebx
0x083d8a97 <dtrace_dof_init+487>:    jne    0x83d88dc <dtrace_dof_init+44>
0x083d8a9d <dtrace_dof_init+493>:    mov    0x851bddc,%eax
0x083d8aa2 <dtrace_dof_init+498>:    movl   $0x2,0x4(%esp)
0x083d8aaa <dtrace_dof_init+506>:    mov    %eax,0x852337c
0x083d8aaf <dtrace_dof_init+511>:    mov    %eax,(%esp)
0x083d8ab2 <dtrace_dof_init+514>:    call   0x8087980 <memcmp+3040>
0x083d8ab7 <dtrace_dof_init+519>:    test   %eax,%eax
0x083d8ab9 <dtrace_dof_init+521>:    mov    %eax,%esi
0x083d8abb <dtrace_dof_init+523>:    jns    0x83d89fc <dtrace_dof_init+332>
0x083d8ac1 <dtrace_dof_init+529>:    mov    0x852337c,%eax
0x083d8ac6 <dtrace_dof_init+534>:    movl   $0x851be7c,0x4(%esp)
0x083d8ace <dtrace_dof_init+542>:    movl   $0x1,(%esp)
0x083d8ad5 <dtrace_dof_init+549>:    mov    %eax,0x8(%esp)
0x083d8ad9 <dtrace_dof_init+553>:    call   0x83d8720 <dprintf>
0x083d8ade <dtrace_dof_init+558>:    jmp    0x83d88dc <dtrace_dof_init+44>
0x083d8ae3 <dtrace_dof_init+563>:    nop
0x083d8ae4 <dtrace_dof_init+564>:    nop
0x083d8ae5 <dtrace_dof_init+565>:    nop
0x083d8ae6 <dtrace_dof_init+566>:    nop
0x083d8ae7 <dtrace_dof_init+567>:    nop
0x083d8ae8 <dtrace_dof_init+568>:    nop
0x083d8ae9 <dtrace_dof_init+569>:    nop
0x083d8aea <dtrace_dof_init+570>:    nop
0x083d8aeb <dtrace_dof_init+571>:    nop
0x083d8aec <dtrace_dof_init+572>:    nop
0x083d8aed <dtrace_dof_init+573>:    nop
0x083d8aee <dtrace_dof_init+574>:    nop
0x083d8aef <dtrace_dof_init+575>:    nop
End of assembler dump.
Comment 1 pav freebsd_committer 2010-11-23 11:08:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->feedback

What port is this related to?
Comment 2 pav freebsd_committer 2010-11-23 11:13:40 UTC
State Changed
From-To: open->feedback

What port is this related to? 

Comment 3 pav freebsd_committer 2010-11-23 11:13:40 UTC
Responsible Changed
From-To: feedback->pav

What port is this related to?
Comment 4 Sevan Janiyan 2010-11-23 12:25:06 UTC
Sorry Pav, it's for databases/postgresql90-server
Comment 5 pav freebsd_committer 2010-11-23 13:50:13 UTC
State Changed
From-To: feedback->open

Assign to maintainer for evaluation 

Comment 6 pav freebsd_committer 2010-11-23 13:50:13 UTC
Responsible Changed
From-To: pav->girgen

Assign to maintainer for evaluation
Comment 7 Sevan Janiyan 2010-11-26 02:53:29 UTC
Though Postgresql 9 will compile on pre FreeBSD 9.0 systems, it needs 
userland dtrace support, attached diff marks the port as broken on 
systems pre 900021 attempting to build with dtrace support enabled.
Comment 8 Philip M. Gollucci freebsd_committer 2010-11-27 00:46:16 UTC
Responsible Changed
From-To: grigen->girgen
Comment 9 Sevan Janiyan 2011-06-17 17:31:30 UTC
Comment 10 Chris Rees freebsd_committer 2011-11-30 18:07:49 UTC
Responsible Changed
From-To: girgen->crees

Comment 11 dfilter freebsd_committer 2011-11-30 18:49:41 UTC
crees       2011-11-30 18:49:31 UTC

  FreeBSD ports repository

  Modified files:
    databases/postgresql84-server Makefile 
    databases/postgresql90-server Makefile 
    databases/postgresql91-server Makefile 
  Add DTRACE option for postgresql84-server
  PR:             ports/150431
  Submitted by:   rpaulo
  Fix compilation with GSSAPI
  PR:             ports/161786
  Submitted by:   rea
  Reviewed by:    mandree, John Marshall <john.marshall@riverwillow.com.au>
  Mark IGNORE if DTRACE enabled for FreeBSD < 900021 without userland dtrace
  PR:             ports/152502
  Submitted by:   Sevan Janiyan <venture37@geeklan.co.uk>
  Approved by:    maintainer timeout (girgen, at least 2 months)
  Feature safe:   yes
  Revision  Changes    Path
  1.238     +13 -2     ports/databases/postgresql84-server/Makefile
  1.231     +6 -1      ports/databases/postgresql90-server/Makefile
  1.233     +6 -1      ports/databases/postgresql91-server/Makefile
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 12 Chris Rees freebsd_committer 2011-11-30 18:50:29 UTC
State Changed
From-To: open->closed

Committed. Thanks!