Thread: psql dumps core

psql dumps core

From
Walter Haidinger
Date:
Hi!

My psql frontend immediately dumps core when run while
the backend runs fine on the same machine.

Please note the following before I provide the details:
I _doubt_ that it is a bug in PostgreSQL. Rather, I think
that my machine setup (e.g. wrong/multiple shared libs versions?)
is screwed because everything works at a different machine having
same hardware and OS.
However, I've no idea where to post else (any hints are appreciated!)
and perhaps you can still help me. Therefore my apologies for this false
"bug" report in advance...

Now for the details. If you're reading this, you haven't quit yet.
Thank you!

Architecture: Sun/Sparq (sun4u SUNW,Ultra-4)
          OS: Solaris 2.6
  PostgreSQL: 7.3.3 (I have the problem with 7.3.2 too)
    Compiler: gcc 2.95.3

After installing I recompiled with debug info and tried the following:

.../postgresql-7.3.3# ./src/bin/psql/psql -V
Segmentation fault (core dumped)
.../postgresql-7.3.3# gdb ./src/bin/psql/psql core
GNU gdb 4.17
...
This GDB was configured as "sparc-sun-solaris2.6"...
Core was generated by `./src/bin/psql/psql -V'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/local/pgsql/lib/libpq.so.3...done.
Reading symbols from /usr/local/ssl/lib/libssl.so.0.9.6...done.
Reading symbols from /usr/local/ssl/lib/libcrypto.so.0.9.6...done.
Reading symbols from /usr/local/lib/libz.so...done.
Reading symbols from /usr/local/lib/libreadline.so.4...done.
Reading symbols from /usr/lib/libposix4.so.1...done.
Reading symbols from /usr/lib/libresolv.so.2...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libaio.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1...done.
#0  0xef7436bc in __register_frame_info (begin=0xef770000, ob=0xef770000)
at /var/tmp/gcc-2.95.2/gcc/frame.c:627
/var/tmp/gcc-2.95.2/gcc/frame.c:627: No such file or directory.
(gdb) bt
#0  0xef7436bc in __register_frame_info (begin=0xef770000, ob=0xef770000)
at /var/tmp/gcc-2.95.2/gcc/frame.c:627
#1  0xef774d7c in frame_dummy ()
#2  0xef774c60 in _init ()
#3  0xef7ca88c in ?? ()
#4  0xef7ca6c8 in ?? ()
#5  0xef7d34ac in ?? ()
#6  0xef7c29bc in ?? ()
(gdb) quit

Please note the reference to /var/tmp/gcc-2.95.2 !
Despite that directory doesn't exist, there is no gcc-2.95.2 installed
anymore.

I'm lost. Any ideas where to look further?
Thanks again!

Regards, Walter

Re: psql dumps core

From
Tom Lane
Date:
See apparently-related thread on pgsql-admin ...

            regards, tom lane

------- Forwarded Message

Date:    Tue, 17 Jun 2003 09:24:12 -0400
From:    Greg Spiegelberg <gspiegelberg@cranel.com>
To:      pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Starting postgres on Solaris

Brent,

Sounds like you don't have the runtime linker (ld.so) configured
correctly or don't have your environment setup.

Solaris 8 & 9 has a command, crle, which is similar to the Linux
ldconfig command.  I typically add all lib paths to it so I don't have
to worry about setting environment variables for all the different
shells.  As a best practice I have a bootup script which runs this on
every boot in case libraries are added, removed or patched.

As root or in a startup script...

# crle -c /var/ld/ld.config -l \
   /usr/lib:/usr/local/lib:/usr/local/ssl/lib:/apps/pgsql/lib \
   -i /usr/lib -i /usr/local/lib -i /usr/local/ssl/lib -i /apps/pgsql/lib

See crle(1) man page for all the options.

Greg


Brent Howard wrote:
> Hi,
>
> I am trying to start postgres from the command line on Solaris 8.  I rebooted my server and now all i get when i try
tostart postgres is an error.  I listed the error below. 
>
> Is there a way to get postgres to read/reference the libraries correctly?  How do i fix this problem, without
rebuildingpostgres?   
>
> $> su - postgres
>
> bash-2.03$ cd /usr/local/pgsql/bin
>
> bash-2.03$ ./postmaster
>     ld.so.1: ./postmaster: fatal: relocation error: file /usr/local/ssl/lib/libcrypto.so.0.9.6: symbol
__register_frame_info:referenced symbol not found 
>     Killed
>
> bash-2.03$
>
>
> ----
> Any help would be appreciated.
>
>
> B~
>
> ps.  If i must rebuild postgres, can i rebuild easily without losing my data?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


--
Greg Spiegelberg
  Sr. Product Development Engineer
  Cranel, Incorporated.
  Phone: 614.318.4314
  Fax:   614.431.8388
  Email: gspiegelberg@Cranel.com
Cranel. Technology. Integrity. Focus.



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

------- End of Forwarded Message