synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera (JIRA)" <>
Subject [jira] Resolved: (SYNAPSE-540) A race condition between Axis2HttpRequest and ClientHandler nhttp transport classes causes unreliable message delivery
Date Mon, 04 May 2009 12:11:30 GMT


Asankha C. Perera resolved SYNAPSE-540.

       Resolution: Fixed
    Fix Version/s: 1.3

Thanks Jarosław for the patch. I've slightly updated it since the codebase has changed since
you've done the modifications, please check and let me know if the tests pass, as I do not
have a .net environment around to test the common 100 continue.

PS: There will be a nightly build (build # > 643) at
soon, along with this fix if you require

> A race condition between Axis2HttpRequest and ClientHandler nhttp transport classes causes
unreliable message delivery
> ----------------------------------------------------------------------------------------------------------------------
>                 Key: SYNAPSE-540
>                 URL:
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 1.2, NIGHTLY
>         Environment: Seen on: Windows XP, Windows Vista, Sun Java 5 update 18, Sun Java
6 update 13, .NET framework 3.5, Tomcat 6.0.18
>            Reporter: Jarosław Bałut
>            Assignee: Asankha C. Perera
>             Fix For: 1.3
>         Attachments:, patch-662321.txt, patch-761507.txt, revision-662321.log,
revision-708800.log, synapse.xml
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> Environment
> 1. Service "Version" from the axis2.war taken from the 1.4.1 release deployed in Tomcat
> 2. Proxy service configured in the Synapse 1.2 release.
> 3. Client implemented using .NET 3.5 WCF.
> Symptoms
> From time to time the client invoking a method of the "Version" service hangs until the
timeout occurs.
> Analysis
> When a request arriving at the proxy service in Synapse is transmitted over the nhttp
transport a race condition occurs between a thread executing the Axis2HttpRequest.streamMessageContents
method and a thread executing the ClientHandler.responseReceived method. After HTTP headers
are transmitted to Tomcat the server replies with the "100 Continue" message. This response
is handled by the ClientHandler.responseReceived method, which (regardless of the status code)
sets the "completed" flag of the handled request to "true". If this happens before the Axis2HttpRequest.streamMessageContents
method in the sending thread
> actually sends the request, the server never gets it. It waits until a timeout occurs
and sends the "500 Internal Server Error" message. This causes the proxy in Synapse to wait
until the keep-alive connection is closed and reply with a fault.
> I provide the .NET based client for testing purposes (calling the proxy service from
an Axis2 based client causes the problem to appear much less frequently).
> I attach the trace log from Synapse 1.2 (built from the 662321 revision of the
and from WSO2 ESB 2.0.2 (which is based on a build of Synapse including the slightly modified
708800 revision of the
> I also suggest patches for the 662321 revision and for the so far latest revision in
the trunk - 761507.
> This problem applies to the 1.2 release and to the trunk version.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message