Subject: Strange segmentation fault trying to run postgresql on current
To: None <port-cobalt@netbsd.org>
From: =?ISO-8859-1?Q?R=E9mi_Zara?= <remi_zara@mac.com>
List: port-cobalt
Date: 04/14/2007 23:11:27
--Apple-Mail-2-709392546
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
delsp=yes;
format=flowed
Hi,
I run a (relatively) current system on my new Cobalt Qube 2 (NetBSD =20
xxx.xxx.org 4.99.16 NetBSD 4.99.16 (GENERIC) #0: Wed Mar 28 14:14:11 =20
PDT 2007 builds@wb36:/home/builds/ab/HEAD/cobalt/200703280002Z-obj/=20
home/builds/ab/HEAD/src/sys/arch/cobalt/compile/GENERIC cobalt)
I want to run PostgreSQL (current) on it, and I encounter a problem =20
that might be more MIPS related than specificaly Cobalt related, but =20
here it is:
the "postgres" exe seg faults early in main when jumping to a =20
subroutine. Here are some relevant info from a gdb session:
(gdb)
79 argv =3D save_ps_display_args(argc, argv);
(gdb) stepi
0x005ae3b0 79 argv =3D save_ps_display_args(argc, =
argv);
(gdb)
0x005ae3b4 79 argv =3D save_ps_display_args(argc, =
argv);
(gdb)
79 argv =3D save_ps_display_args(argc, argv);
(gdb)
Program received signal SIGSEGV, Segmentation fault.
main (argc=3D1, argv=3D0x7fffdcc4) at main.c:79
79 argv =3D save_ps_display_args(argc, argv);
Here is a disassembly of the concerned code:
0x005ae3a8 <main+72>: lw gp,16(sp)
0x005ae3ac <main+76>: move a1,s0
0x005ae3b0 <main+80>: lw t9,-20988(gp)
0x005ae3b4 <main+84>: move a0,s3
0x005ae3b8 <main+88>: jalr t9
Could some one help me with this ?
gp starts at 00882de0 when entering main, and t9 ends up with 007578b0
Here is what I find in a disassembly of the postgres exe:
007578b0 <save_ps_display_args>:
7578b0: 3c1c0013 lui gp,0x13
7578b4: 279cb530 addiu gp,gp,-19152
7578b8: 0399e021 addu gp,gp,t9
7578bc: 8f838110 lw v1,-32496(gp)
7578c0: 00a01021 move v0,a1
I built some packages on the machine without problems (but did not =20
test extensively), like perl, bash, screen, tcl, python and more. So =20
the toolchain is not completely busted.
this is gcc (GCC) 4.1.2 20070110 prerelease (NetBSD nb1 20070110)
and GNU ld version 2.16.1
Regards,
R=E9mi Zara
--Apple-Mail-2-709392546
Content-Transfer-Encoding: base64
Content-Type: application/pkcs7-signature;
name=smime.p7s
Content-Disposition: attachment;
filename=smime.p7s
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGIzCCAtww
ggJFoAMCAQICEHMgTvnLfRjFeDbmRuvi7pkwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ
ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MTIxMjA3MzEzOFoXDTA3MTIxMjA3MzEz
OFowQzEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEgMB4GCSqGSIb3DQEJARYRcmVt
aV96YXJhQG1hYy5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpfH95P9YUKXI/
36W+Rpyf8vXIV5aBUk9YS/WR+jHqWkK1E4HjXuMSVtbTwoTdLxRNIwtwbSPiWR+yShPeYEp/I+gG
fdD52OIUWGsUGNt3b66Uom3zsRbeWnH4ogB6Y/Ity3FloNLZ560kGkmi4Y/m+KyZWsYjal/dS9jr
D9yaE5FDYtF4LHetUz3+54ST+Gt9tGq8zvp9cmy1ublKLZ1i0xsh5e1VIGC5m62XvdB8fXjRSD6t
a2kyW4tjvnDeLhmPN/hTXPF9qwH54wbH4XiV1UrWbCDm5E8UWW3A6w3GCk99BS6qTwUwhMz4Q9gF
a1VxHsxkHq4Os4yECE1STUzHAgMBAAGjLjAsMBwGA1UdEQQVMBOBEXJlbWlfemFyYUBtYWMuY29t
M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