You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Rainer Jung <ra...@kippdata.de> on 2011/07/10 15:53:05 UTC

Missing thread name in requestProcessor when handling Async

Using an AccessLogValve during the unit tests reveals, that the thread
name in the request processor is often not set when handliung async
requests.

To reproduce run TestAsyncContextImpl for trunk with test.accesslog=true
and have a look at the access log in output/build/logs. The only
requests logged wit a thread name are

127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
1332 http-bio-8030-exec-1 8
127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
1332 http-nio-8030-exec-1 9
127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
1332 http-apr-8030-exec-2 8

All other requests have "null" as the thread name.

The following patch fixes most of the cases, but I'm not sure that it is
the right place to fix it:

http://people.apache.org/~rjung/patches/tomcat-async-threadname.patch

The only entries which still have a null thread name are then:

127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /async HTTP/1.1" 500 53
null 0
127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /async HTTP/1.1" 500 53
null 0
127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /async HTTP/1.1" 500 53
null 0

Regards,

Rainer




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Missing thread name in requestProcessor when handling Async

Posted by Rainer Jung <ra...@kippdata.de>.
On 10.07.2011 16:07, Mark Thomas wrote:
> On 10/07/2011 14:53, Rainer Jung wrote:
>> Using an AccessLogValve during the unit tests reveals, that the thread
>> name in the request processor is often not set when handliung async
>> requests.
>>
>> To reproduce run TestAsyncContextImpl for trunk with test.accesslog=true
>> and have a look at the access log in output/build/logs. The only
>> requests logged wit a thread name are
>>
>> 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
>> 1332 http-bio-8030-exec-1 8
>> 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
>> 1332 http-nio-8030-exec-1 9
>> 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
>> 1332 http-apr-8030-exec-2 8
>>
>> All other requests have "null" as the thread name.
>>
>> The following patch fixes most of the cases, but I'm not sure that it is
>> the right place to fix it:
>>
>> http://people.apache.org/~rjung/patches/tomcat-async-threadname.patch
> 
> Looks good to me.

Committed in r1144865.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Missing thread name in requestProcessor when handling Async

Posted by Mark Thomas <ma...@apache.org>.
On 10/07/2011 14:53, Rainer Jung wrote:
> Using an AccessLogValve during the unit tests reveals, that the thread
> name in the request processor is often not set when handliung async
> requests.
> 
> To reproduce run TestAsyncContextImpl for trunk with test.accesslog=true
> and have a look at the access log in output/build/logs. The only
> requests logged wit a thread name are
> 
> 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
> 1332 http-bio-8030-exec-1 8
> 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
> 1332 http-nio-8030-exec-1 9
> 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] "GET /error HTTP/1.1" 500
> 1332 http-apr-8030-exec-2 8
> 
> All other requests have "null" as the thread name.
> 
> The following patch fixes most of the cases, but I'm not sure that it is
> the right place to fix it:
> 
> http://people.apache.org/~rjung/patches/tomcat-async-threadname.patch

Looks good to me.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org