Subject: Re: Strange segmentation fault trying to run postgresql on
To: =?ISO-8859-1?Q?R=E9mi_Zara?= <remi.zara@free.fr>
From: Alex Pelts <alexp@broadcom.com>
List: port-cobalt
Date: 04/26/2007 14:12:00
It is not the mapping that is the problem but alignment. It is trying to=20
store word (32 bits) at the address that is aligned on 1 byte (cf).
I don't know much about how netbsd translates mips exceptions to signals=20
but I think from your register dump the problem is alignment.

Regards,
Alex


R=E9mi Zara wrote:
> Hi,
>=20
> Still trying to figure why postgresql is crashing. (I've not yet tried=20
> pkgsrc or another version than "current" postgresql).
>=20
> I've rebuilt with CFLAGS=3D-O0, and it still crash early in main, but n=
ot=20
> exactly at the same place (a little earlier).
>=20
> Here are some relevant info:
>=20
> Program received signal SIGSEGV, Segmentation fault.
> 0x006bb26c in main (argc=3D1, argv=3D0x7fffdccc) at main.c:61
>=20
> here is the instruction:
>=20
> 0x006bb26c <main+92>:   sw      v1,0(v0)
>=20
> registers:
>=20
> (gdb) info registers
>           zero       at       v0       v1       a0       a1      =20
> a2       a3
> R0   00000000 00000000 00af83cf 00b3f030 00b3f039 7fffddf5 00000000=20
> 7fffddec
>             t0       t1       t2       t3       t4       t5      =20
> t6       t7
> R8   7fffddf4 00000000 00000008 00000000 8000001f ffffffe0 7fffdd30=20
> 009d6340
>             s0       s1       s2       s3       s4       s5      =20
> s6       s7
> R16  7fffdd78 7fffdcc8 00000001 7fffdccc 00af8358 7fffeff0 7dfb2f90=20
> 7dfa3000
>             t8       t9       k0       k1       gp       sp      =20
> s8       ra
> R24  0000083d 7d9d4528 00000000 00000000 00afb160 7fffdc68 7fffdc68=20
> 006bb25c
>             sr       lo       hi      bad    cause       pc
>       0000ff13 0009f79c 000000b4 006bb268 00000024 006bb26c
>            fsr      fir
>       007e92c0 00000000
>=20
> So if I understand correctly, it tries to store 00b3f030 at address=20
> 00af83cf
>=20
> So SIGSEGV would me that that address is not mapped or accessible ? but
> pmap gives:
>=20
> (...)
> 00af8000-00af8fff       4k 00000000 rw-p- (rwx) 1/0/0 00:00       0 -  =
=20
> [ anon ]
> (...)
>=20
> So this address seems to be mapped and writable ?
>=20
> What am I missing.
>=20
> What should I try to debug this ?
>=20
> Regards,
>=20
> R=E9mi Zara