Re: CVS HEAD busted on Windows?

Поиск
Список
Период
Сортировка
От Yoshiyuki Asaba
Тема Re: CVS HEAD busted on Windows?
Дата
Msg-id 20060622.024143.74735394.y-asaba@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: CVS HEAD busted on Windows?  ("Dave Page" <dpage@vale-housing.co.uk>)
Ответы Re: CVS HEAD busted on Windows?
Список pgsql-hackers
Hi,

From: "Dave Page" <dpage@vale-housing.co.uk>
Subject: Re: [HACKERS] CVS HEAD busted on Windows? 
Date: Wed, 21 Jun 2006 15:39:34 +0100

>  
> 
> > -----Original Message-----
> > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
> > Sent: 21 June 2006 14:30
> > To: Dave Page
> > Cc: Peter Eisentraut; pgsql-hackers@postgresql.org
> > Subject: Re: [HACKERS] CVS HEAD busted on Windows? 
> > 
> > "Dave Page" <dpage@vale-housing.co.uk> writes:
> > > killed it this morning (after 6+ hours of runtime) and it reported:
> > > pg_regress: could not set database default locales
> > 
> > That would be here:
> > 
> > "$bindir/psql" -q -X $psql_options -c "\
> > alter database \"$dbname\" set lc_messages to 'C';
> > alter database \"$dbname\" set lc_monetary to 'C';
> > alter database \"$dbname\" set lc_numeric to 'C';
> > alter database \"$dbname\" set lc_time to 'C';" "$dbname"
> > if [ $? -ne 0 ]; then
> >     echo "$me: could not set database default locales"
> >     (exit 2); exit
> > fi
> > 
> > Could you gdb the attached backend and see what it's doing?  Is it
> > actually consuming CPU, or just stuck?
> 
> Hmmm, running it more interactively I see what was probably the hang
> when run from the scheduler:
> 
> ---------------------------
> psql.exe - Application Error
> ---------------------------
> The instruction at "0x7c8396d0" referenced memory at "0x00000014". The
> memory could not be "read". 
> Click on OK to terminate the program
> Click on CANCEL to debug the program
> ---------------------------
> OK   Cancel   
> ---------------------------
> 
> (if that got fired off under the scheduler it would appear to hang as
> there would be no display to display it on, and no way to hit OK or
> Cancel).
> 
> Unfortunately gdb is giving a somewhat useless backtrace (yes, this is a
> debug build):

I got a backtrace.

Program received signal SIGSEGV, Segmentation fault.
0x7c958fea in _libwsock32_a_iname ()
(gdb) bt
#0 0x7c958fea in _libwsock32_a_iname ()
#1 0x7c951538 in _libwsock32_a_iname ()
#2 0x7c94104b in _libwsock32_a_iname ()
#3 0x00404e68 in SendQuery (query=0x3d2669 "select 1") at common.c:815
#4 0x0040951a in main (argc=9, argv=0x3d27c8) at startup.c:306

cancelConnLock is not initialized (InitializeCriticalSection()) at
startup.c when psql execute with '-c' option.

Is the following patch right? 

Index: startup.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/startup.c,v
retrieving revision 1.133
diff -c -r1.133 startup.c
*** startup.c    14 Jun 2006 16:49:02 -0000    1.133
--- startup.c    21 Jun 2006 17:36:26 -0000
***************
*** 303,308 ****
--- 303,313 ----         if (VariableEquals(pset.vars, "ECHO", "all"))             puts(options.action_string); 
+ #ifdef WIN32
+         /* establish control-C handling for interactive operation */
+         setup_cancel_handler();
+ #endif
+          successResult = SendQuery(options.action_string)             ? EXIT_SUCCESS : EXIT_FAILURE;     }

--
Yoshiyuki Asaba
y-asaba@sraoss.co.jp


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Mark Woodward"
Дата:
Сообщение: vacuum, performance, and MVCC
Следующее
От: Tom Lane
Дата:
Сообщение: Re: UPDATE crash in HEAD and 8.1