dbTalk Databases Forums  

[BUGS] Win32 deadlock detection not working for Postgres8beta1

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Win32 deadlock detection not working for Postgres8beta1 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve McWilliams
 
Posts: n/a

Default [BUGS] Win32 deadlock detection not working for Postgres8beta1 - 09-02-2004 , 10:27 AM






Hello,

I am just starting to test out Postgres8 beta1 and notice that the
deadlock detection mechanism is not working (under windows XP pro with
service pack 1). I am using the version of Postgres built by the
PGFoundry project, and have it installed as a service.

To produce the bug I simply launch 2 separate psql windows, begin a
transaction in each, then do staggered 'SELECT ... FOR UPDATE' calls on 2
different rows in each of the psql windows, in reverse order. The two
processes will hang indefinitely.

The deadlock detection for 8beta1 seems to work fine under linux btw. I
have not tried this using a version of 8beta1 built using cygwin, but I
have run versin 7.4 under cygwin before without this problem.

I tried uncommenting the deadlock.tx.timeout=1000 value in
postgresql.conf, just in case this wasn't already the default value, but
it didn't seem to help.

Steve McWilliams
Software Engineer
Emprisa Networks
703-691-0433x21
smcwilliams (AT) emprisanetworks (DOT) com

The information contained in this communication is intended only for the
use of the recipient named above, and may be legally privileged,
confidential and exempt from disclosure under applicable law. If the
reader of this communication is not the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication, or any of its contents, is strictly prohibited. If you have
received this communication in error, please resend this communication to
the sender and delete the original communication and any copy of it from
your computer system. Thank you.



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

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Win32 deadlock detection not working for Postgres8beta1 - 09-02-2004 , 10:56 AM






"Steve McWilliams" <smcwilliams (AT) EmprisaNetworks (DOT) com> writes:
Quote:
I am just starting to test out Postgres8 beta1 and notice that the
deadlock detection mechanism is not working (under windows XP pro with
service pack 1). I am using the version of Postgres built by the
PGFoundry project, and have it installed as a service.

To produce the bug I simply launch 2 separate psql windows, begin a
transaction in each, then do staggered 'SELECT ... FOR UPDATE' calls on 2
different rows in each of the psql windows, in reverse order. The two
processes will hang indefinitely.

The deadlock detection for 8beta1 seems to work fine under linux btw. I
have not tried this using a version of 8beta1 built using cygwin, but I
have run versin 7.4 under cygwin before without this problem.
A reasonable theory about this would be that the timer interrupt isn't
firing. Does "statement_timeout" work either?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #3  
Old   
Steve McWilliams
 
Posts: n/a

Default Re: [BUGS] Win32 deadlock detection not working for Postgres8beta1 - 09-02-2004 , 11:12 AM




Quote:
"Steve McWilliams" <smcwilliams (AT) EmprisaNetworks (DOT) com> writes:
I am just starting to test out Postgres8 beta1 and notice that the
deadlock detection mechanism is not working (under windows XP pro with
service pack 1). I am using the version of Postgres built by the
PGFoundry project, and have it installed as a service.

To produce the bug I simply launch 2 separate psql windows, begin a
transaction in each, then do staggered 'SELECT ... FOR UPDATE' calls
on 2 different rows in each of the psql windows, in reverse order.
The two processes will hang indefinitely.

The deadlock detection for 8beta1 seems to work fine under linux btw.
I have not tried this using a version of 8beta1 built using cygwin,
but I have run versin 7.4 under cygwin before without this problem.

A reasonable theory about this would be that the timer interrupt isn't
firing. Does "statement_timeout" work either?

regards, tom lane
Ok, I tried just now setting 'statement_timeout = 1000' in
postgresql.conf, then restarting the service, however it did not prevent
the deadlock from hangining both processes indefinitely, as before.

Btw, I noticed a related thread back in february, I think, from the
postgresql-hackers-win32 list, which discussed a patch to timer.c to fix a
problem with the deadlock detection mechanism. I assume since it was
several months ago however that the fix mentioned should already be
present in the beta1 release.

Steve McWilliams
Software Engineer
Emprisa Networks
703-691-0433x21
smcwilliams (AT) emprisanetworks (DOT) com

The information contained in this communication is intended only for the
use of the recipient named above, and may be legally privileged,
confidential and exempt from disclosure under applicable law. If the
reader of this communication is not the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication, or any of its contents, is strictly prohibited. If you have
received this communication in error, please resend this communication to
the sender and delete the original communication and any copy of it from
your computer system. Thank you.



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.