You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2019/02/20 20:12:09 UTC
[Bug 63193] New: Http condition hangs on reading
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
Bug ID: 63193
Summary: Http condition hangs on reading
Product: Ant
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Core
Assignee: notifications@ant.apache.org
Reporter: eugene.adell@gmail.com
Target Milestone: ---
Whenever a server will be extremely slow and accept the request without sending
any answer, the Http condition will hang for ever.
By the same time, using waitfor doesn't solve this.
This is due to the lack of read timeout on the socket.
A patch is being prepared.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] [PATCH] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
--- Comment #7 from Eugène Adell <eu...@gmail.com> ---
I did ant -f patch.xml which is given in Approach 1 of this doc
https://ant.apache.org/ant_task_guidelines.html
This produces a .txt and a .gz files, I uploaded the .gz one
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] [PATCH] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #36447|text/plain |application/octet-stream
mime type| |
Attachment #36447|1 |0
is patch| |
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] [PATCH] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
--- Comment #5 from Jaikiran Pai <ja...@apache.org> ---
Hi Eugène,
How was the patch created? It doesn't seem to show up in any text editor
correctly.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
--- Comment #3 from Eugène Adell <eu...@gmail.com> ---
Tested the patch succesfully against an URL which will never send any response
( Thread.sleep(100000) in Java for example)
<target name="waitURL">
<waitfor maxwait="70" maxwaitunit="second" timeoutproperty="server.timeout" >
<http url="http://localhost:8281/isalive.jsp" readTimeout="35000" />
</waitfor>
<fail if="server.timeout" message="Server url don't answer inside 30 sec" />
<echo message="Server url alive" />
</target>
Instead of hanging it stops after calling twice the Http condition (35s each),
and the waiting of 70 is OK
$ time ant -f ant/project.xml waitURL
Apache Ant(TM) version 1.10.5 compiled on February 20 2019
Buildfile: *****/ant/project.xml
real 1m12.372s
user 0m2.483s
sys 0m0.347s
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] [PATCH] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
Jaikiran Pai <ja...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |1.10.6
Status|NEW |RESOLVED
--- Comment #9 from Jaikiran Pai <ja...@apache.org> ---
Eugène, thanks for the patch. I have committed this (with minor modifications,
mainly to documentation) upstream and the enhancement will be available in our
next release of 1.10.x series.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] [PATCH] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
--- Comment #8 from Jaikiran Pai <ja...@apache.org> ---
Thanks Stefan.
I had a quick look at the patch and it looks fine to me. One minor
suggestion/question - this patch introduces the setReadTimeout method on this
task and silently ignores values that are negative. Do you think, it's better
to throw an error or at least maybe make a note in the documentation of this
task, that negative values will be silently ignored?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
Eugène Adell <eu...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #36446|0 |1
is obsolete| |
--- Comment #2 from Eugène Adell <eu...@gmail.com> ---
Created attachment 36447
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36447&action=edit
patch (without the debug output)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] [PATCH] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
Eugène Adell <eu...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Http condition hangs on |[PATCH] Http condition
|reading |hangs on reading
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] [PATCH] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
--- Comment #6 from Stefan Bodewig <bo...@apache.org> ---
I've changed the MIME-Type from text/plain to appliaction/octet-stream and
removed Bugzilla's "patch" marker. The patch is gzip compressed but "patch" in
Bugzilla expects things to be plain text.
You should be able to download and inflate the attachment now.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
--- Comment #1 from Eugène Adell <eu...@gmail.com> ---
Created attachment 36446
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36446&action=edit
patch
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
Eugène Adell <eu...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eugene.adell@gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 63193] Http condition hangs on reading
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63193
--- Comment #4 from Eugène Adell <eu...@gmail.com> ---
When not using the new attribute (readTimeout), or using the value 0, it will
behave as before, with an infinite blocking read.
--
You are receiving this mail because:
You are the assignee for the bug.