List Info

Thread: postgres 8.2.5 core dumps on 4.0 RC2 mipsel




postgres 8.2.5 core dumps on 4.0 RC2 mipsel
user name
2007-10-17 16:44:04
Sorry if I copied too many lists.

I just built postgresql82 from pkgsrc, which builds 8.2.5
now. I used
CFLAGS -mips2, but I think this problem happens no matter if
I do that
or not. The system is a Cobalt Qube2 which previously ran
postgresql
8.2.4 OK.

Here's what I see. I'm not a good debugger, so if someone
wants to
help me go through gdb I can get whatever is needed:

/etc/rc.d # ./pgsql start

Starting pgsql.
[1]   Segmentation fault      "/usr/pkg/bin/po...
fgets failure: No such file or directory
The program "postgres" is needed by pg_ctl but was
not found in the
same directory as "/usr/pkg/bin/pg_ctl".
Check your installation.
/etc/rc.d # gdb /usr/pkg/bin/postgres postgres.core

GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "mipsel--netbsd"...(no
debugging symbols found)...
Core was generated by `postgres'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libintl.so.0...(no debugging
symbols found)...
done.
Loaded symbols for /usr/lib/libintl.so.0
Reading symbols from /usr/lib/libssl.so.4...(no debugging
symbols found)...
done.
Loaded symbols for /usr/lib/libssl.so.4
Reading symbols from /usr/lib/libcrypt.so.0...(no debugging
symbols found)...
done.
Loaded symbols for /usr/lib/libcrypt.so.0
Reading symbols from /usr/lib/libcrypto.so.3...(no debugging
symbols found)...
done.
Loaded symbols for /usr/lib/libcrypto.so.3
Reading symbols from /usr/lib/libm.so.0...(no debugging
symbols found)...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libc.so.12...(no debugging
symbols found)...done.
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/libexec/ld.elf_so...(no debugging
symbols found)...
done.
Loaded symbols for /usr/libexec/ld.elf_so
#0  0x005e961c in main ()
(gdb) bt
#0  0x005e961c in main ()
#1  0x0042fb98 in _start ()
(gdb) quit

I'm not 100% sure that my machine is sane as far as
libraries, but
other stuff is working and has been for a while now.

Andy

Re: postgres 8.2.5 core dumps on 4.0 RC2 mipsel
user name
2007-10-18 11:38:26
On 10/18/07, Markus W Kilbinger <mkkilbi.de> wrote:
> As menitioned in the thread reference you can
circumvent this problem
> by adding '-d' to the linkers 'ld -r' actions. I did
this (in
> pkgsrc/databases/postgresqlNN-server) by
>
>   make cleandir
>   make configure
>
> Then edit the Makefile.global in the extracted postgres
source, search
> for the '-r' option for the linker and extend it to '-r
-d'. Then do
>
>   make
>
> ... as usual. The resulting postgres binary should run
fine.

Thanks, I'll try that.

Do you know if the -mips2 CFLAGS setting is still needed as
per this?:

http://mail-index.netbsd.org/port-cobalt/2002/06/05
/0000.html

I'll set it anyway, but I'll also do what you say. Setting
it before
seemed to fix problems.

Andy

Re: postgres 8.2.5 core dumps on 4.0 RC2 mipsel
country flaguser name
France
2007-10-18 13:05:17
Le 18 oct. 07 à 09:05, Markus W Kilbinger a écrit :

>>>>>> Anyway, it seems to be a linker
alignment problem on cobalt/ 
>>>>>> mipsel
> (see thread around
>
>   http://mail-index.netbsd.org/port-cobalt/2007/05/01
/0002.html
>
> ). During postgresqlNN-server builds several SUBSYS.o
are linked via
> 'ld -r' which are re-linked finally to the postgres
server binary. At
> least for one object the correct alignment is 'lost'
leading to your
> mentioned Segmentation fault.
>

Have you sent-pr about this ? In the mail referenced, you
said you  
had a simple test case.

Regards,

Rémi Zara
Re: postgres 8.2.5 core dumps on 4.0 RC2 mipsel
user name
2007-10-18 16:22:15
On 10/18/07, Markus W Kilbinger <mkkilbi.de> wrote:
> Then edit the Makefile.global in the extracted postgres
source, search
> for the '-r' option for the linker and extend it to '-r
-d'. Then do

That was the fix. Thanks.

By the way, I did add mips2 to the CFLAGS. I'm not sure if
it's
necessary, but it works.

Andy

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )