You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Date: 2013-02-05 12:21:40 +0100
From: Pete Hollobon <>
To: clients devs <>
Version: 11.15.1 (Feb2013)
CC: pete
Last updated: 2013-03-07 12:41:21 +0100
Comment 18454
Date: 2013-02-05 12:21:40 +0100
From: Pete Hollobon <>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.30 (KHTML, like Gecko) Chrome/26.0.1403.0 Safari/537.30
Build Identifier:
At present, the MonetDB Python client sleeps for one second and loops waiting for data if the length of the result from the socket communicating with the server is 0. However, a zero-length result from socket.recv means the server has closed the connection [1]. This means the client will hang if the server closes the socket for any reason.
In particular this happens when using VirtualBox and port-forwarding to run an OS running MonetDB, where MonetDB is not started. The connection is accepted by VirtualBox before it attempts to connect to the server process inside the VM. It's closed if there is no listening socket to connect to, causing the Python client to sit in this loop without timing out.
Here are patches for the Python 2 and 3 modules, which cause an exception to be thrown instead, which I think is the appropriate behaviour.
--- a/clients/python3/monetdb/mapi.py Thu Jan 31 15:05:41 2013 +0100
+++ b/clients/python3/monetdb/mapi.py Tue Feb 05 11:11:17 2013 +0000
@@ -237,7 +237,7 @@
while count > 0:
recv = self.socket.recv(count)
if len(recv) == 0:
Date: 2013-02-05 12:21:40 +0100
From: Pete Hollobon <>
To: clients devs <>
Version: 11.15.1 (Feb2013)
CC: pete
Last updated: 2013-03-07 12:41:21 +0100
Comment 18454
Date: 2013-02-05 12:21:40 +0100
From: Pete Hollobon <>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.30 (KHTML, like Gecko) Chrome/26.0.1403.0 Safari/537.30
Build Identifier:
At present, the MonetDB Python client sleeps for one second and loops waiting for data if the length of the result from the socket communicating with the server is 0. However, a zero-length result from socket.recv means the server has closed the connection [1]. This means the client will hang if the server closes the socket for any reason.
In particular this happens when using VirtualBox and port-forwarding to run an OS running MonetDB, where MonetDB is not started. The connection is accepted by VirtualBox before it attempts to connect to the server process inside the VM. It's closed if there is no listening socket to connect to, causing the Python client to sit in this loop without timing out.
Here are patches for the Python 2 and 3 modules, which cause an exception to be thrown instead, which I think is the appropriate behaviour.
--- a/clients/python3/monetdb/mapi.py Thu Jan 31 15:05:41 2013 +0100
+++ b/clients/python3/monetdb/mapi.py Tue Feb 05 11:11:17 2013 +0000
@@ -237,7 +237,7 @@
while count > 0:
recv = self.socket.recv(count)
if len(recv) == 0:
--- a/clients/python2/monetdb/mapi.py Tue Feb 05 11:11:17 2013 +0000
+++ b/clients/python2/monetdb/mapi.py Tue Feb 05 11:19:46 2013 +0000
@@ -235,7 +235,7 @@
try:
recv = self.socket.recv(count)
if len(recv) == 0:
[1] man recv
RETURN VALUE
... The return value will be 0 when the peer has performed an orderly shutdown.
Reproducible: Always
Comment 18570
Date: 2013-02-26 14:36:49 +0100
From: @sjoerdmullender
Changeset c22d45d3ea7e made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c22d45d3ea7e
Changeset description:
Comment 18571
Date: 2013-02-26 14:41:20 +0100
From: @sjoerdmullender
I'm not sure how to test this, so no test provided.
Comment 18588
Date: 2013-03-07 12:41:21 +0100
From: @sjoerdmullender
Feb2013-SP1 has been released.
The text was updated successfully, but these errors were encountered: