Обсуждение: Problems with initdb on Cygwin

Поиск
Список
Период
Сортировка

Problems with initdb on Cygwin

От
"Javier Vilarroig"
Дата:
Hi all.

     I'm not sure if this is the good place to talk about Postgresql on
Cygwin, but...

     I'm triying to run Prostgresql on Cygwin, only for development
purposes. I installed Postgresql on my brand new Cygwin installation.

     When I try to run initdb it gets hanged, after 4 hours it didn't
ended.

     Here is the initdb output:
----------------------------------------------
 $ initdb -D /usr/local/pg_data
This database system will be initialized with username "vilarroig".
This user will own all the data files and must also own the server proce

Fixing permissions on existing directory /usr/local/pg_data
Creating directory /usr/local/pg_data/base
Creating directory /usr/local/pg_data/global
Creating directory /usr/local/pg_data/pg_xlog
Creating template1 database in /usr/local/pg_data/base/1
Signal 11
Caught signal.

initdb failed.
Removing temp file /tmp/initdb.266.
------------------------------------------

The signal was sent by me using kill.

Looking at the program manager I can see postgres.exe takin al the CPU
time.

Please can you help me?

Thanks in advance.




------------
This e-mail and any attachments are confidential.  If you are not the intended recipient, please notify us immediately
byreply e-mail and then delete this message from your system. Do not copy this e-mail or any attachments, use the
contentsfor any purpose, or disclose the contents to any other person: to do so could be a breach of confidence. 

Re: Problems with initdb on Cygwin

От
Justin Clift
Дата:
Hi Javier,

Just because you don't mention it :

- Which OS version of Windows, and which service pack applied?
- Which version of cygwin, and therefore which version of PostgreSQL?

:-)

Regards and best wishes,

Justin Clift


Javier Vilarroig wrote:
>
> Hi all.
>
>      I'm not sure if this is the good place to talk about Postgresql on
> Cygwin, but...
>
>      I'm triying to run Prostgresql on Cygwin, only for development
> purposes. I installed Postgresql on my brand new Cygwin installation.
>
>      When I try to run initdb it gets hanged, after 4 hours it didn't
> ended.
>
>      Here is the initdb output:
> ----------------------------------------------
>  $ initdb -D /usr/local/pg_data
> This database system will be initialized with username "vilarroig".
> This user will own all the data files and must also own the server proce
>
> Fixing permissions on existing directory /usr/local/pg_data
> Creating directory /usr/local/pg_data/base
> Creating directory /usr/local/pg_data/global
> Creating directory /usr/local/pg_data/pg_xlog
> Creating template1 database in /usr/local/pg_data/base/1
> Signal 11
> Caught signal.
>
> initdb failed.
> Removing temp file /tmp/initdb.266.
> ------------------------------------------
>
> The signal was sent by me using kill.
>
> Looking at the program manager I can see postgres.exe takin al the CPU
> time.
>
> Please can you help me?
>
> Thanks in advance.
>
> ------------
> This e-mail and any attachments are confidential.  If you are not the intended recipient, please notify us
immediatelyby reply e-mail and then delete this message from your system. Do not copy this e-mail or any attachments,
usethe contents for any purpose, or disclose the contents to any other person: to do so could be a breach of
confidence.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
   - Indira Gandhi

Re: Problems with initdb on Cygwin

От
"Javier Vilarroig"
Дата:
OK, sorry for the incovenience.

The base OS is Windows NT4.0 + SP6a.
Cygwin is 2.125.2.10
Postgres is 7.1.3-1

Thanks in advance





Justin Clift <justin@postgresql.org> on 24/01/2002 15.31.59

To:   Javier Vilarroig <Javier.Vilarroig@marconi.com>
cc:   pgsql-general@postgresql.org

Subject:  Re: [GENERAL] Problems with initdb on Cygwin


Hi Javier,

Just because you don't mention it :

- Which OS version of Windows, and which service pack applied?
- Which version of cygwin, and therefore which version of PostgreSQL?

:-)

Regards and best wishes,

Justin Clift


Javier Vilarroig wrote:
>
> Hi all.
>
>      I'm not sure if this is the good place to talk about Postgresql on
> Cygwin, but...
>
>      I'm triying to run Prostgresql on Cygwin, only for development
> purposes. I installed Postgresql on my brand new Cygwin installation.
>
>      When I try to run initdb it gets hanged, after 4 hours it didn't
> ended.
>
>      Here is the initdb output:
> ----------------------------------------------
>  $ initdb -D /usr/local/pg_data
> This database system will be initialized with username "vilarroig".
> This user will own all the data files and must also own the server proce
>
> Fixing permissions on existing directory /usr/local/pg_data
> Creating directory /usr/local/pg_data/base
> Creating directory /usr/local/pg_data/global
> Creating directory /usr/local/pg_data/pg_xlog
> Creating template1 database in /usr/local/pg_data/base/1
> Signal 11
> Caught signal.
>
> initdb failed.
> Removing temp file /tmp/initdb.266.
> ------------------------------------------
>
> The signal was sent by me using kill.
>
> Looking at the program manager I can see postgres.exe takin al the CPU
> time.
>
> Please can you help me?
>
> Thanks in advance.
>
> ------------
> This e-mail and any attachments are confidential.  If you are not the
intended recipient, please notify us immediately by reply e-mail and then
delete this message from your system. Do not copy this e-mail or any
attachments, use the contents for any purpose, or disclose the contents to
any other person: to do so could be a breach of confidence.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
   - Indira Gandhi






------------
This e-mail and any attachments are confidential.  If you are not the intended recipient, please notify us immediately
byreply e-mail and then delete this message from your system. Do not copy this e-mail or any attachments, use the
contentsfor any purpose, or disclose the contents to any other person: to do so could be a breach of confidence. 

Re: Problems with initdb on Cygwin

От
Frank Joerdens
Дата:
On Thu, Jan 24, 2002 at 04:22:44PM +0000, Javier Vilarroig wrote:
>
> OK, sorry for the incovenience.
>
> The base OS is Windows NT4.0 + SP6a.
> Cygwin is 2.125.2.10
> Postgres is 7.1.3-1

[ . . . ]
> >      I'm triying to run Prostgresql on Cygwin, only for development
> > purposes. I installed Postgresql on my brand new Cygwin installation.
> >
> >      When I try to run initdb it gets hanged, after 4 hours it didn't
> > ended.

Got the same problem here. Windows version is 2000 Professional, Service
Pack 2, Cygwin version is pretty recent (can't check it now, the box is
at home), so is Cygipc - both were downloaded within the past 3 weeks. The
machine is reasonably new and fast - Athlon 1200, 256 MB RAM, so that
shouldn't be an issue. Postgres version is 7.1.3.

Regards, Frank

Re: Problems with initdb on Cygwin

От
Tom Lane
Дата:
Frank Joerdens <frank@joerdens.de> writes:
>> When I try to run initdb it gets hanged, after 4 hours it didn't
>> ended.

> Got the same problem here.

Could you let the initdb run for a few minutes, and then attach to the
process with gdb and see where it's looping?  (Actually, I dunno if
gdb works under cygwin...)

            regards, tom lane

Re: Problems with initdb on Cygwin

От
Jan Wieck
Дата:
Tom Lane wrote:
> Frank Joerdens <frank@joerdens.de> writes:
> >> When I try to run initdb it gets hanged, after 4 hours it didn't
> >> ended.
>
> > Got the same problem here.
>
> Could you let the initdb run for a few minutes, and then attach to the
> process with gdb and see where it's looping?  (Actually, I dunno if
> gdb works under cygwin...)

    It does, you need to know the windows specific process id and
    it even works with the GUI  (Gates  Unpredictable  Interface)
    version of gdb.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: Problems with initdb on Cygwin

От
"Javier Vilarroig"
Дата:
I tried to attach gdb to the running postgress but it gives me an error
"unable to attach to process". I don't know if it's possible to do that on
Cygwin :(

Any idea?



Tom Lane <tgl@sss.pgh.pa.us>@postgresql.org on 24/01/2002 17.18.15

Sent by:  pgsql-general-owner@postgresql.org


To:   Frank Joerdens <frank@joerdens.de>
cc:   pgsql-general <pgsql-general@postgresql.org>

Subject:  Re: [GENERAL] Problems with initdb on Cygwin


Frank Joerdens <frank@joerdens.de> writes:
>> When I try to run initdb it gets hanged, after 4 hours it didn't
>> ended.

> Got the same problem here.

Could you let the initdb run for a few minutes, and then attach to the
process with gdb and see where it's looping?  (Actually, I dunno if
gdb works under cygwin...)

               regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)





------------
This e-mail and any attachments are confidential.  If you are not the intended recipient, please notify us immediately
byreply e-mail and then delete this message from your system. Do not copy this e-mail or any attachments, use the
contentsfor any purpose, or disclose the contents to any other person: to do so could be a breach of confidence. 

Re: Problems with initdb on Cygwin

От
Tom Lane
Дата:
Frank Joerdens <frank@joerdens.de> writes:
> Actually, it's always the same address where the program
> stops; running the above steps severaly times seems to confirm this
> (which might indicate that the address is of use for you?!).

The address is unhelpful, but a backtrace (try typing "bt") might be
very interesting indeed.

            regards, tom lane

Re: Problems with initdb on Cygwin

От
Frank Joerdens
Дата:
On Thu, Jan 24, 2002 at 01:06:07PM -0500, Jan Wieck wrote:
> Tom Lane wrote:
> > Frank Joerdens <frank@joerdens.de> writes:
> > >> When I try to run initdb it gets hanged, after 4 hours it didn't
> > >> ended.
> >
> > > Got the same problem here.
> >
> > Could you let the initdb run for a few minutes, and then attach to the
> > process with gdb and see where it's looping?  (Actually, I dunno if
> > gdb works under cygwin...)
>
>     It does, you need to know the windows specific process id and
>     it even works with the GUI  (Gates  Unpredictable  Interface)
>     version of gdb.

Hm. Just tried that but I don't seem to be able to get any kind of
output from gdb. Mind you, that may well be because I have hardly any
idea as to how to use gdb (I'm not a C programmer). Attaching to the
process *seems* to be working though. What I did:

---------------- snip (console #1) ----------------
frank@LUCY /usr/local/pgsql/data
$ pwd
/usr/local/pgsql/data

frank@LUCY /usr/local/pgsql/data
$ initdb -D data
This database system will be initialized with username "frank".
This user will own all the data files and must also own the server
process.

Creating directory data
Creating directory data/base
Creating directory data/global
Creating directory data/pg_xlog
Creating template1 database in data/base/1
---------------- snap (console #1) ----------------

This is where initdb doesn't get any further whilst consuming close to
100% of one of the 2 processors on the machine (this is my box at work,
an old dual PPro 200 running Windows 2000). On the 2nd console I do

---------------- snip (console #2) ----------------
frank@LUCY ~
$ gdb.exe program 1324
---------------- snap (console #2) ----------------

which opens a Gates Unpredictable Interface window that says it's a gdb
source window and that program execution has stopped at 0x77a018d (is
that address any use for you?). If I press C for continue, I have gdb
and postgres consuming next to 100% of either processor, but still no
further output. Actually, it's always the same address where the program
stops; running the above steps severaly times seems to confirm this
(which might indicate that the address is of use for you?!).

Regards, Frank

Re: Problems with initdb on Cygwin

От
Tom Lane
Дата:
Frank Joerdens <frank@joerdens.de> writes:
>> The address is unhelpful, but a backtrace (try typing "bt") might be
>> very interesting indeed.

> Well, it doesn't *look* very interesting:

> (gdb) bt
> #0    0x778a018d in ?? ()
> #1    0x77e7758a in ?? ()

Nope, you're right :-(.  Can you rebuild PG with debug symbols?
(Add --enable-debug to configure, or manually add -g to CFLAGS
in src/Makefile.global; then "make clean" and remake.)

            regards, tom lane

Re: Problems with initdb on Cygwin

От
Frank Joerdens
Дата:
On Fri, Jan 25, 2002 at 12:55:03PM -0500, Tom Lane wrote:
> Frank Joerdens <frank@joerdens.de> writes:
> > Actually, it's always the same address where the program
> > stops; running the above steps severaly times seems to confirm this
> > (which might indicate that the address is of use for you?!).
>
> The address is unhelpful, but a backtrace (try typing "bt") might be
> very interesting indeed.

Well, it doesn't *look* very interesting:

(gdb) bt
#0    0x778a018d in ?? ()
#1    0x77e7758a in ?? ()


Regards, Frank

Re: Problems with initdb on Cygwin

От
Joerg Hessdoerfer
Дата:
At 12:55 25.01.2002 -0500, you wrote:
>Frank Joerdens <frank@joerdens.de> writes:
> > Actually, it's always the same address where the program
> > stops; running the above steps severaly times seems to confirm this
> > (which might indicate that the address is of use for you?!).
>
>The address is unhelpful, but a backtrace (try typing "bt") might be
>very interesting indeed.
>
>                         regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster

Just my 2ct - but could it be you did not start ipc-daemon? It's not in the
standard
cygwin distrib (one should bang the heads of these guys - to distribute a
program
and not even mentioning (e.g in the postinstall scripts) that you need to
get cygipc
from somewhere else!).

Just search for cygipc on the net - I use 1.11 (I think), and it works
fine. Without
ipc-daemon running in the bg, you get exactly the reported behaviour!

Greetings,
         Joerg


Re: Problems with initdb on Cygwin

От
Frank Joerdens
Дата:
On Sat, Jan 26, 2002 at 04:49:42PM +0100, Joerg Hessdoerfer wrote:
> At 12:55 25.01.2002 -0500, you wrote:
> >Frank Joerdens <frank@joerdens.de> writes:
> > > Actually, it's always the same address where the program
> > > stops; running the above steps severaly times seems to confirm this
> > > (which might indicate that the address is of use for you?!).
> >
> >The address is unhelpful, but a backtrace (try typing "bt") might be
> >very interesting indeed.
> >
> >                         regards, tom lane
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 4: Don't 'kill -9' the postmaster
>
> Just my 2ct - but could it be you did not start ipc-daemon? It's not in the
> standard
> cygwin distrib (one should bang the heads of these guys - to distribute a
> program
> and not even mentioning (e.g in the postinstall scripts) that you need to
> get cygipc
> from somewhere else!).
>
> Just search for cygipc on the net - I use 1.11 (I think), and it works
> fine. Without
> ipc-daemon running in the bg, you get exactly the reported behaviour!

You're absolutely right. That was the problem! (This is explained
*somewhere* . . . I seem to recall that I had the problem once, solved
it that way, and forgot about it.)

Regards, Frank

Re: Problems with initdb on Cygwin

От
Tom Lane
Дата:
Frank Joerdens <frank@joerdens.de> writes:
> On Sat, Jan 26, 2002 at 04:49:42PM +0100, Joerg Hessdoerfer wrote:
>> Just my 2ct - but could it be you did not start ipc-daemon?

> You're absolutely right. That was the problem! (This is explained
> *somewhere* . . . I seem to recall that I had the problem once, solved
> it that way, and forgot about it.)

Arrgh!  Clearly, this needs to be documented much more prominently than
it is now.  Any suggestions about an appropriate place to mention it?

            regards, tom lane

Re: Problems with initdb on Cygwin

От
Justin Clift
Дата:
Tom Lane wrote:
>
> Frank Joerdens <frank@joerdens.de> writes:
> > On Sat, Jan 26, 2002 at 04:49:42PM +0100, Joerg Hessdoerfer wrote:
> >> Just my 2ct - but could it be you did not start ipc-daemon?
>
> > You're absolutely right. That was the problem! (This is explained
> > *somewhere* . . . I seem to recall that I had the problem once, solved
> > it that way, and forgot about it.)
>
> Arrgh!  Clearly, this needs to be documented much more prominently than
> it is now.  Any suggestions about an appropriate place to mention it?

How about a FAQ.cygwin?

:-)

Regards and best wishes,

Justin Clift

>
>                         regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
   - Indira Gandhi

Re: Problems with initdb on Cygwin

От
Frank Joerdens
Дата:
On Sun, Jan 27, 2002 at 05:42:08AM +1100, Justin Clift wrote:
> Tom Lane wrote:
> >
> > Frank Joerdens <frank@joerdens.de> writes:
> > > On Sat, Jan 26, 2002 at 04:49:42PM +0100, Joerg Hessdoerfer wrote:
> > >> Just my 2ct - but could it be you did not start ipc-daemon?
> >
> > > You're absolutely right. That was the problem! (This is explained
> > > *somewhere* . . . I seem to recall that I had the problem once, solved
> > > it that way, and forgot about it.)
> >
> > Arrgh!  Clearly, this needs to be documented much more prominently than
> > it is now.  Any suggestions about an appropriate place to mention it?
>
> How about a FAQ.cygwin?

It's there in the source tree under docs/FAQ_MSWIN and mentioned in the
INSTALL file. You only really get tripped if you don't compile from
source.

Regards, Frank

Re: Problems with initdb on Cygwin

От
Frank Joerdens
Дата:
On Sat, Jan 26, 2002 at 01:09:00PM -0500, Tom Lane wrote:
> Frank Joerdens <frank@joerdens.de> writes:
> > On Sat, Jan 26, 2002 at 04:49:42PM +0100, Joerg Hessdoerfer wrote:
> >> Just my 2ct - but could it be you did not start ipc-daemon?
>
> > You're absolutely right. That was the problem! (This is explained
> > *somewhere* . . . I seem to recall that I had the problem once, solved
> > it that way, and forgot about it.)
>
> Arrgh!  Clearly, this needs to be documented much more prominently than
> it is now.  Any suggestions about an appropriate place to mention it?

The problem was that I didn't compile Postgres from source (the last
time I installed Pg on Cygwin I probably did that, since I didn't fall
into this trap), seeing that the package that ships with Cygwin now is
up to date. I think the documentation in the INSTALL file that comes
with the Pg source is adequate. The fault should be considered to rest
with the Cygwin installer, because it follows the 'Windoze Paradigm' in
that it has an installation menu which suggests that it resolves
dependencies automatically. The maintainer of the Cygwin Installer
should either fix this (which is probably difficult because they'd not
only need to include cygipc with the package, but make sure that it gets
started somehow automagically) or remove Pg from the menu, I think.

Regards, Frank

Re: Problems with initdb on Cygwin

От
"Javier Vilarroig"
Дата:
Yeah... It works.....

Thank you very much for your help!



Joerg Hessdoerfer <Joerg.Hessdoerfer@sea-gmbh.com>@postgresql.org on
26/01/2002 15.49.42

Sent by:  pgsql-general-owner@postgresql.org


To:   pgsql-general@postgresql.org
cc:

Subject:  Re: [GENERAL] Problems with initdb on Cygwin


At 12:55 25.01.2002 -0500, you wrote:
>Frank Joerdens <frank@joerdens.de> writes:
> > Actually, it's always the same address where the program
> > stops; running the above steps severaly times seems to confirm this
> > (which might indicate that the address is of use for you?!).
>
>The address is unhelpful, but a backtrace (try typing "bt") might be
>very interesting indeed.
>
>                         regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster

Just my 2ct - but could it be you did not start ipc-daemon? It's not in the
standard
cygwin distrib (one should bang the heads of these guys - to distribute a
program
and not even mentioning (e.g in the postinstall scripts) that you need to
get cygipc
from somewhere else!).

Just search for cygipc on the net - I use 1.11 (I think), and it works
fine. Without
ipc-daemon running in the bg, you get exactly the reported behaviour!

Greetings,
         Joerg


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster





------------
This e-mail and any attachments are confidential.  If you are not the intended recipient, please notify us immediately
byreply e-mail and then delete this message from your system. Do not copy this e-mail or any attachments, use the
contentsfor any purpose, or disclose the contents to any other person: to do so could be a breach of confidence.