pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Rubio <drubior@tinet.org>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-bugs@postgreSQL.org
Subject: Re: [ADMIN] Can't connect to my postgresql
Date: Mon, 31 Mar 2003 16:43:44 -0500
Message-ID: <25447.1049147024@sss.pgh.pa.us> (raw)
In-Reply-To: <3E815B7B.5000401@tinet.org>
References: <3E8061A0.5010805@tinet.org>
	<28425.1048603338@sss.pgh.pa.us>
	<3E815B7B.5000401@tinet.org>

Daniel Rubio <drubior@tinet.org> writes:
> Yes, there's a core in the data directory, here is the stack trace:
> bash-2.03# pstack /apps/pgsql-7.3.2/data/core
> core '/apps/pgsql-7.3.2/data/core' of 6308: 
> /apps/pgsql-7.3.2/bin/postmaster -D /apps/pgsql-7.3.2/da
>   00123e24 user_group_bsearch_cmp (33d689, 0, ffffffff, 0, 0, 0) + 10
>   fef36048 bsearch  (8, fffffffc, 0, 4, 0, 123e14) + 4c
>   00123ecc get_user_line (33d689, a, 1, 2, 0, 8000) + 30
>   00122ccc md5_crypt_verify (33d558, 33d689, 32a188, 318249, 2b4198, 
> 2d0ea3) + 2c

After staring at the code for awhile, the only scenario I can construct
goes like this:

1. You had a $PGDATA/global/pg_pwd file when you started the postmaster.
2. For some reason, the file disappeared or became unreadable.
3. At the next SIGHUP, load_user() would delete user_lines and then
   exit, leaving user_sorted pointing at pfree'd memory.
4. The above crash is then exactly what one would expect.

load_user and load_group are clearly buggy in that they don't take care
to keep the data structures in sync after an open failure --- but I'm
having a hard time concocting a reason why pg_pwd would disappear like
that.  Ideas anyone?

			regards, tom lane




view thread (5+ messages)

Message-ID: <25447.1049147024@sss.pgh.pa.us>
Permalink:  ../25447.1049147024@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25447.1049147024@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, drubior@tinet.org, pgman@candle.pha.pa.us, pgsql-bugs@postgreSQL.org
  Subject: Re: [ADMIN] Can't connect to my postgresql
  In-Reply-To: <25447.1049147024@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox