Bug 4157 - http-timeout does not work on http protocol
: http-timeout does not work on http protocol
Status: VERIFIED FIXED
: XIO
Globus XIO
: 4.0.1
: All All
: P3 normal
: ---
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2006-01-16 01:25 by
Modified: 2006-02-02 00:54 (History)


Attachments
xio-http-timeout.diff (10.65 KB, patch)
2006-01-26 14:50, Joe Bester
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2006-01-16 01:25:51
globusrun-ws -T option does not work for http protocol.

I created the server program, which accepts the connection,
but responses nothing, just wait the data. (sserver.py)

I invoked sserver.py on port 5544.
And I invoked globusrun-ws to port 5544.
If the protocol was https, the globusrun-ws returned by error safely.
But, the protocol was http, globusrun-ws did not return, freezed.

The case of https protocol:
$ time globusrun-ws -submit -F \
    https://myhost:5544/wsrf/services/ManagedJobFactoryService \
    -T 10000 -c /bin/touch touched_it
Submitting job...Failed.
globusrun-ws: Error submitting job
globus_soap_message_module: Failed sending request
ManagedJobFactoryPortType_createManagedJob.
globus_xio: Operation was canceled
globus_xio: Operation timed out  

real    0m20.192s
user    0m0.179s
sys     0m0.017s

The timeout was occurred.
(finish time was too long (2 times long), than I specified though.)
   
The case of http protocol:
$ time globusrun-ws -submit -F \
    http://myhost:5544/wsrf/services/ManagedJobFactoryService \
    -T 10000 -c /bin/touch touched_it
Submitting job...
(freezed)

The timeout was not occurred.

Below script is the python script sserver.py that accepts the connection.
# Echo server program
import sys  
import socket

HOST = ''
PORT = int(sys.argv[1])
print ' listen on port ', PORT
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connected by', addr
while 1:
    data = conn.recv(1024)
    if not data: break
    print data
conn.close()
------- Comment #1 From 2006-01-18 16:28:59 -------
The HTTP driver in XIO doesn't handle timeouts properly.
------- Comment #2 From 2006-01-26 14:50:33 -------
Created an attachment (id=830) [details]
xio-http-timeout.diff

Attaching a patch to the globus_xio package to implement timeouts in the http
driver. I'm working on a test case for this to add to the XIO test suite before
I commit this.
------- Comment #3 From 2006-01-27 00:31:17 -------
Thanks.
The patch worked for me.


$ time globusrun-ws -submit -F
http://localhost:5544/wsrf/services/ManagedJobFactoryService -T 10000 -c
/bin/touch touched_it
Submitting job...Failed.
globusrun-ws: Error submitting job
globus_soap_message_module: Failed receiving response
ManagedJobFactoryPortType_createManagedJob.
globus_soap_message_module: SOAP Message transport failed: Error in HTTP response
globus_xio: Operation was canceled

real    0m30.234s
user    0m0.200s
sys     0m0.000s
------- Comment #4 From 2006-02-01 14:27:46 -------
A different version of this patch (eliminating a minor leak) has been committed
to CVS.

joe
------- Comment #5 From 2006-02-02 00:54:39 -------
I checked the CVS.
The bug was not occurred in current CVS of Globus Toolkit.
Problem was fixed on CVS.


$ time globusrun-ws -submit -F
http://localhost:5544/wsrf/services/ManagedJobFactoryService -T 10000 -c
/bin/touch touched_it
Submitting job...Failed.
globusrun-ws: Error submitting job
globus_soap_message_module: Failed receiving response
ManagedJobFactoryPortType_createManagedJob.
globus_soap_message_module: SOAP Message transport failed: Error in HTTP response
globus_xio: Operation was canceled

real    0m30.233s
user    0m0.210s
sys     0m0.000s