Thread: Random hang during commit
After upgrade from postgres 8.0 to 8.1.3, I am running some tests against the new database and got some random problems: Usually all tests are successfully passed, but sometime the test hangs when doing connection.commit(). I have installed same database, jdbc driver, jre and test case on some other computers. However, this problem will be never happened on others. The only big difference between my computer with others is: it has a dual processor. After working on this issue for a week, I think it could be a bug. Regards, Bill
unsubscribe
Lin, B (Bill) wrote: > After upgrade from postgres 8.0 to 8.1.3, I am running some tests > against the new database and got some random problems: > Usually all tests are successfully passed, but sometime the test hangs > when doing connection.commit(). Some more information please. 1. What operating-system? 2. Installed from a package (which) or source? 3. What hangs - the client or the backend (or both)? 4. What do the logs show? -- Richard Huxton Archonet Ltd
Bill - please cc: the bugs list too. Lin, B (Bill) wrote: > Some more information please. > 1. What operating-system? > XP SP2 > 2. Installed from a package (which) or source? >>From package > 3. What hangs - the client or the backend (or both)? > Both. The client is waiting for the backend's commit() to be completed. > 4. What do the logs show? > Usually, the last log shows commit is executed. Hmm - if the log shows the commit happening that suggests the backend is doing its bit. It's not hanging, it's just idle waiting for the next query from the client. That would mean that the problem is either in the client library, jdbc driver or the communication channel itself. In your original message, you say: "I have installed same database, jdbc driver, jre and test case on some other computers. However, this problem will be never happened on others." Does that mean 8.1.3 works fine on other PCs you have, but not this one? If so, that suggests to me that there must be either: 1. A different library on the problem machine. 2. Some process (firewall/antivirus) that is occasionally interfering with communication. Three things suggest themselves to me: 1. Make sure there aren't any known issues with the jdbc driver version you have http://jdbc.postgresql.org/ 2. Check if there is anything unusual about the problem machine 3. Try running the client on the problem machine and the database on another, then the other way around. Does this change anything? -- Richard Huxton Archonet Ltd
>Does that mean 8.1.3 works fine on other PCs you have, but not this one? Yes, it is works fine with other PCs which do not have dual processor. (I can not find another machine has dual processor here) >If so, that suggests to me that there must be either: >1. A different library on the problem machine. No, same library are used. >2. Some process (firewall/antivirus) that is occasionally interfering with communication. No firewall/antivirus was running >Three things suggest themselves to me: >1. Make sure there aren't any known issues with the jdbc driver version you have http://jdbc.postgresql.org/ Seems not, but not sure about this one: http://jdbc.postgresql.org/todo.html#Known+Bugs [bugs] Deallocating large numbers of server side statements can break the connection by filling network buffers. This is a very, very low probability bug, but it is still possible. Actually, if using jdbc driver version 7.4 against database 8.1.3, this problem will not happen. It seems it is a bug relate with jdbc driver for a dual processor. >2. Check if there is anything unusual about the problem machine Nothing unusual >3. Try running the client on the problem machine and the database on another, then the other way around. Does this change anything? I tried both way and this problem seems never happen. -----Original Message----- From: Richard Huxton [mailto:dev@archonet.com] Sent: 14 March 2006 09:22 To: Lin, B (Bill) Cc: pgsql-bugs@postgresql.org Subject: Re: [BUGS] Random hang during commit Bill - please cc: the bugs list too. Lin, B (Bill) wrote: > Some more information please. > 1. What operating-system? > XP SP2 > 2. Installed from a package (which) or source? >>From package > 3. What hangs - the client or the backend (or both)? > Both. The client is waiting for the backend's commit() to be completed. > 4. What do the logs show? > Usually, the last log shows commit is executed. >Hmm - if the log shows the commit happening that suggests the backend is doing its bit. It's not hanging, it's just idle waiting for the next query from >the client. That would mean that the problem is either in the client library, jdbc driver or the communication channel itself. >In your original message, you say: "I have installed same database, jdbc driver, jre and test case on some other computers. However, this problem will be >never happened on others." >Does that mean 8.1.3 works fine on other PCs you have, but not this one? >If so, that suggests to me that there must be either: >1. A different library on the problem machine. >2. Some process (firewall/antivirus) that is occasionally interfering with communication. >Three things suggest themselves to me: >1. Make sure there aren't any known issues with the jdbc driver version you have http://jdbc.postgresql.org/ >2. Check if there is anything unusual about the problem machine >3. Try running the client on the problem machine and the database on another, then the other way around. Does this change anything? -- Richard Huxton Archonet Ltd
Lin, B (Bill) wrote: > >Does that mean 8.1.3 works fine on other PCs you have, but not this > one? > Yes, it is works fine with other PCs which do not have dual processor. > (I can not find another machine has dual processor here) Ah, does your problem match what is being discussed here? http://archives.postgresql.org/pgsql-performance/2006-03/msg00032.php >> If so, that suggests to me that there must be either: >> 1. A different library on the problem machine. > No, same library are used. >> 2. Some process (firewall/antivirus) that is occasionally interfering > with communication. > No firewall/antivirus was running > >> Three things suggest themselves to me: >> 1. Make sure there aren't any known issues with the jdbc driver version > you have http://jdbc.postgresql.org/ > Seems not, but not sure about this one: > http://jdbc.postgresql.org/todo.html#Known+Bugs > [bugs] Deallocating large numbers of server side statements can break > the connection by filling network buffers. This is a very, very low > probability bug, but it is still possible. Hmm - doesn't sound like that's it. > Actually, if using jdbc driver version 7.4 against database 8.1.3, this > problem will not happen. > It seems it is a bug relate with jdbc driver for a dual processor. Or possibly lower down even. >> 2. Check if there is anything unusual about the problem machine > Nothing unusual >> 3. Try running the client on the problem machine and the database on > another, then the other way around. Does this change anything? > I tried both way and this problem seems never happen. Hmm - I'd have expected it to fail in one direction but not the other. -- Richard Huxton Archonet Ltd
Yes, It looks exactly same as http://archives.postgresql.org/pgsql-performance/2006-03/msg00032.php Only different is: in my case it happens in every 2 mins :) (I just found it is not only happen during commit, it could be during other sql call randomly) Thank you very much, at least I know what is the problem now. Bill -----Original Message----- From: Richard Huxton [mailto:dev@archonet.com] Sent: 15 March 2006 11:27 To: Lin, B (Bill) Cc: pgsql-bugs@postgresql.org Subject: Re: [BUGS] Random hang during commit Lin, B (Bill) wrote: > >Does that mean 8.1.3 works fine on other PCs you have, but not this > one? > Yes, it is works fine with other PCs which do not have dual processor. > (I can not find another machine has dual processor here) Ah, does your problem match what is being discussed here? http://archives.postgresql.org/pgsql-performance/2006-03/msg00032.php >> If so, that suggests to me that there must be either: >> 1. A different library on the problem machine. > No, same library are used. >> 2. Some process (firewall/antivirus) that is occasionally interfering > with communication. > No firewall/antivirus was running > >> Three things suggest themselves to me: >> 1. Make sure there aren't any known issues with the jdbc driver >> version > you have http://jdbc.postgresql.org/ > Seems not, but not sure about this one: > http://jdbc.postgresql.org/todo.html#Known+Bugs > [bugs] Deallocating large numbers of server side statements can break > the connection by filling network buffers. This is a very, very low > probability bug, but it is still possible. Hmm - doesn't sound like that's it. > Actually, if using jdbc driver version 7.4 against database 8.1.3, > this problem will not happen. > It seems it is a bug relate with jdbc driver for a dual processor. Or possibly lower down even. >> 2. Check if there is anything unusual about the problem machine > Nothing unusual >> 3. Try running the client on the problem machine and the database on > another, then the other way around. Does this change anything? > I tried both way and this problem seems never happen. Hmm - I'd have expected it to fail in one direction but not the other. -- Richard Huxton Archonet Ltd