Thread: initdb crash

initdb crash

From
Euler Taveira de Oliveira
Date:
Hi,

I saw a initdb crashes when it is creating the template1 database. I
couldn't figure out what is wrong. I attached the backtrace and some
architecture/compiler info.
If someone needs more info, drop me a line.


=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br





_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
http://br.acesso.yahoo.com/euler@ripley:~/pgsql/cvs/install/bin$gdb initdb 
GNU gdb 5.3
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 "i386-slackware-linux"...
(gdb) r -D /home/euler/cvs/install/data
Starting program: /home/euler/pgsql/cvs/install/bin/initdb -D /home/euler/cvs/install/data
[New Thread 16384 (LWP 593)]
Os arquivos deste sistema de banco de dados pertencer�o ao usu�rio "euler".
Esse usu�rio deve ser o dono do processo do servidor tamb�m.

O agrupamento de banco de dados ser� inicializado com localidade pt_BR.
A codifica��o padr�o do banco de dados foi ajustada para LATIN1.

criando diret�rio /home/euler/cvs/install/data ... ok
criando diret�rio /home/euler/cvs/install/data/global ... ok
criando diret�rio /home/euler/cvs/install/data/pg_xlog ... ok
criando diret�rio /home/euler/cvs/install/data/pg_xlog/archive_status ... ok
criando diret�rio /home/euler/cvs/install/data/pg_clog ... ok
criando diret�rio /home/euler/cvs/install/data/pg_subtrans ... ok
criando diret�rio /home/euler/cvs/install/data/base ... ok
criando diret�rio /home/euler/cvs/install/data/base/1 ... ok
criando diret�rio /home/euler/cvs/install/data/pg_tblspc ... ok
selecionando max_connections padr�o ... 100
selecionando shared_buffers padr�o ... 1000
criando arquivos de configura��o ... ok
criando banco de dados template1 em /home/euler/cvs/install/data/base/1 ... TRAP: FailedAssertion("!(((bool) ((dbNode)
!=((Oid) 0))))", Arquivo: "tablespace.c", Linha: 116) 

Program received signal SIGPIPE, Broken pipe.
[Switching to Thread 16384 (LWP 593)]
0x40304708 in write () from /lib/libc.so.6
(gdb) bt
#0  0x40304708 in write () from /lib/libc.so.6
#1  0x40363d24 in __DTOR_END__ () from /lib/libc.so.6
#2  0x402a0d2e in new_do_write () from /lib/libc.so.6
#3  0x402a0cc6 in _IO_new_do_write () from /lib/libc.so.6
#4  0x402a1969 in _IO_new_file_sync () from /lib/libc.so.6
#5  0x4029618a in fflush () from /lib/libc.so.6
#6  0x0804aa0a in bootstrap_template1 (short_version=0xffffffe0 <Address 0xffffffe0 out of bounds>) at initdb.c:1198
#7  0x0804cd36 in main (argc=134997404, argv=0xbffff8d4) at initdb.c:2466
#8  0x40246d06 in __libc_start_main () from /lib/libc.so.6
(gdb)
The program is running.  Exit anyway? (y or n) y
euler@ripley:~/pgsql/cvs/install/bin$ initdb --version
initdb (PostgreSQL) 8.0.0beta3
euler@ripley:~/pgsql/cvs/install/bin$ uname -a
Linux ripley 2.4.26 #5 SMP Qui Abr 22 11:53:28 BRT 2004 i686 unknown unknown GNU/Linux
euler@ripley:~/pgsql/cvs/install/bin$ cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  287674368 275853312 11821056        0 42905600 184172544
Swap: 213848064  8650752 205197312
MemTotal:       280932 kB
MemFree:         11544 kB
MemShared:           0 kB
Buffers:         41900 kB
Cached:         177500 kB
SwapCached:       2356 kB
Active:         139360 kB
Inactive:       110220 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       280932 kB
LowFree:         11544 kB
SwapTotal:      208836 kB
SwapFree:       200388 kB
euler@ripley:~/pgsql/cvs/install/bin$ gcc --version
gcc (GCC) 3.2.3
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

euler@ripley:~/pgsql/cvs/install/bin$ bison --version
bison (GNU bison) 1.875
Escrito por Robert Corbett e Richard Stallman.

Copyright � 2002 Free Software Foundation, Inc.
Este � um software livre; veja o c�digo fonte para condi��es de copyright. N�o
existe NENHUMA garantia; nem mesmo a garantia impl�cita de COMERCIABILIDADE ou
ADEQUA��O � QUALQUER FINALIDADE PARTICULAR.

Re: initdb crash

From
Gavin Sherry
Date:
On Wed, 6 Oct 2004, Euler Taveira de Oliveira wrote:

> Hi,
>
> I saw a initdb crashes when it is creating the template1 database. I
> couldn't figure out what is wrong. I attached the backtrace and some
> architecture/compiler info.
> If someone needs more info, drop me a line.

Can you run initdb with the -d flag?

Also, the directory paths you included suggest that there might be some
old code sitting around. Did you do a make distclean?

Gavin


Re: initdb crash

From
Euler Taveira de Oliveira
Date:
Hi Gavin,

> >
> > I saw a initdb crashes when it is creating the template1 database.
> I
> > couldn't figure out what is wrong. I attached the backtrace and
> some
> > architecture/compiler info.
> > If someone needs more info, drop me a line.
>
> Can you run initdb with the -d flag?
>
The log is attached.

> Also, the directory paths you included suggest that there might be
> some
> old code sitting around. Did you do a make distclean?
>
Yes. It's not an old code. That's because i don't like to mix fresh cvs
data with debug data.


=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Attachment

Re: initdb crash

From
Gavin Sherry
Date:
On Thu, 7 Oct 2004, Euler Taveira de Oliveira wrote:

> Hi Gavin,
>
> > >
> > > I saw a initdb crashes when it is creating the template1 database.
> > I
> > > couldn't figure out what is wrong. I attached the backtrace and
> > some
> > > architecture/compiler info.
> > > If someone needs more info, drop me a line.
> >
> > Can you run initdb with the -d flag?
> >
> The log is attached.

Sorry, I meant to ask before: can we get a backtrace from the backend? Ie,
not initdb but from the generated core.

Gavin


Re: initdb crash

From
Euler Taveira de Oliveira
Date:
Hi Gavin,


> > > > I saw a initdb crashes when it is creating the template1
> database.
> > > I
> > > > couldn't figure out what is wrong. I attached the backtrace and
> > > some
> > > > architecture/compiler info.
> > > > If someone needs more info, drop me a line.
> > >
> > > Can you run initdb with the -d flag?
> > >
> > The log is attached.
>
> Sorry, I meant to ask before: can we get a backtrace from the
> backend? Ie,
> not initdb but from the generated core.
>

Sorry for the delay (I have some trouble with my modem). Attached is
the initdb and backend bootstrap backtrace. Seems to be something in
the smgr, I couldn't figure out.


=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br





_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/
Attachment

Re: initdb crash

From
Tom Lane
Date:
Euler Taveira de Oliveira <eulerto@yahoo.com.br> writes:
> Sorry for the delay (I have some trouble with my modem). Attached is
> the initdb and backend bootstrap backtrace. Seems to be something in
> the smgr, I couldn't figure out.

Whatever this is, it's local to your build, because no one else is
seeing the same; we would all be unable to initdb if that path of
control were getting followed in general.

It's hard to tell which of the values in the backtrace to believe and
which not, but the impression I get is that there's some confusion over
whether pg_proc is a shared relation ... which of course it is not, but
passing database = 0 to TablespaceCreateDbspace would only happen if
someone thought it was.

Is it possible your copy of bootparse.c escaped getting updated after
bootparse.y last changed?  The values shown for its arguments seem
closer to what would have been passed in the old code than what should
be there today.
        regards, tom lane