Thread: postgresql-7.4RC1 - Memory fault(coredump) on HP-UX

postgresql-7.4RC1 - Memory fault(coredump) on HP-UX

From
"Verbus Counts"
Date:
Greetings,

PostgreSQL built with:

export CC=cc
./configure --without-readline --without-zlib

The build and install went OK.

{/opt/postgres/postgresql-7.4RC1}$ initdb -D /usr/local/pgsql/data

The files belonging to this database system will be owned by user
"postgres". This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating directory /usr/local/pgsql/data/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema... ok
vacuuming database template1... ok
copying template1 to template0... ok

Success. You can now start the database server using:
   /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
or   /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start

{/opt/postgres/postgresql-7.4RC1}$ postmaster -D /usr/local/pgsql/data
Memory fault(coredump)

{/opt/postgres/postgresql-7.4RC1}$ uname -a
HP-UX systemname B.11.11 U 9000/782 2010014256 unlimited-user license

{/opt/postgres/postgresql-7.4RC1}$ id
uid=101(postgres) gid=101(postgres)

{/opt/postgres/postgresql-7.4RC1}$ ll core
-rw-------   1 postgres   postgres    726684 Nov  6 10:55 core


-- 
Reagrds,
Verbus


Re: postgresql-7.4RC1 - Memory fault(coredump) on HP-UX

From
Gaetano Mendola
Date:
Verbus Counts wrote:

> {/opt/postgres/postgresql-7.4RC1}$ ll core
> -rw-------   1 postgres   postgres    726684 Nov  6 10:55 core


Can you show us the stack trace ?

Regards
Gaetano Mendola






Re: postgresql-7.4RC1 - Memory fault(coredump) on HP-UX

From
"Verbus Counts"
Date:
> Verbus Counts wrote:
>
>> {/opt/postgres/postgresql-7.4RC1}$ ll core
>> -rw-------   1 postgres   postgres    726684 Nov  6 10:55 core
>
>
> Can you show us the stack trace ?
>
> Regards
> Gaetano Mendola

Here is:

(gdb) backtrace
#0  0xc0198e40 in free+0x130 () from /usr/lib/libc.2
#1  0xc00cca4c in close+0x2e8 () from /usr/lib/libnss_dns.1
#2  0xc00cae60 in _nss_dns_getipnodebyname+0x74()from /usr/lib/libnss_dns.1
#3  0xc01eb878 in nss_search+0x188 () from /usr/lib/libc.2
#4  0xc0161d24 in __getipnodebyname_r+0xa84 () from /usr/lib/libc.2
#5  0xc01611fc in getipnodebyname+0x94 () from /usr/lib/libc.2
#6  0xc01602a0 in getaddrinfo+0x288 () from /usr/lib/libc.2
#7  0x10cd0c in getaddrinfo_all+0x2c ()
#8  0x149e3c in pgstat_init+0xf4 ()
#9  0x146818 in PostmasterMain+0x6bc ()
#10 0x110f2c in main+0x238 ()

-- 
Reagrds,
Verbus


Re: postgresql-7.4RC1 - Memory fault(coredump) on HP-UX

From
Tom Lane
Date:
"Verbus Counts" <verbus@sonicisp.net> writes:
>> Can you show us the stack trace ?

> Here is:

Hm, getaddrinfo() is crashing?

Does HPUX 11 have more fields in "struct addrinfo" than are initialized in
lines 189-196 of src/backend/postmaster/pgstat.c, viz
hints.ai_flags = AI_PASSIVE;hints.ai_family = PF_UNSPEC;hints.ai_socktype = SOCK_DGRAM;hints.ai_protocol =
0;hints.ai_addrlen= 0;hints.ai_addr = NULL;hints.ai_canonname = NULL;hints.ai_next = NULL;
 

If so, perhaps adding "memset(&hints, 0, sizeof(hints));" right before
these lines would improve matters.

Otherwise I think this is probably an HPUX bug.  You might need to get a
more recent version of libc.
        regards, tom lane