IBM Support

PK31745; 6.0.2.17: Deadlock in utf-8 servlet response

Download


Abstract

An out of memory error or server hang condition may occur.

Download Description

PK31745 resolves the following problem:

ERROR DESCRIPTION:
Writing data to a HttpServletResponse OutputStream causes a deadlock in:
com.ibm.ws.webcontainer.channel.WCChannelLink.writeBuffer().

LOCAL FIX:
none

PROBLEM SUMMARY

USERS AFFECTED:
Customers with servers which may process more simultaneous requests than configured webcontainer threads and/or request with large responses.

PROBLEM DESCRIPTION:
An out of memory error or server hang condition may occur

RECOMMENDATION:
None

Version 6.0.2.9 and earlier V6.0 levels: An out of memory condition may occur when downloading a large file or several large files.

When processing a request the webcontainer writes out chunks of response data asynchronously and, when waiting for an asynchronous write to complete, continues to buffer response data into memory. For example, with large responses this can lead to a large memory usage and an out of memory error.

Versions 6.0.2.11 to 6.0.2.17: An IBM® WebSphere® Application Server hang may occur when a server is simultaneously processing more requests than webcontainer defined threads.

When processing a request the webcontainer writes out the response to the request asynchronously and, when waiting for an asynchronous write to complete, continues to buffer up to 10 chunks of response data into memory. When 10 chunks have been buffered the processing thread waits for the asynchronous write to complete.

As a result, in a busy server which is simultaneously processing more requests (which require at least 10 chunks of response data) than the number of configured webcontainer threads, a hang may occur as a result of all threads having 10 buffered chunks of response data and waiting for an asynchronous response to complete, leaving no threads to perform an asynchronous write.

Note: By default the chunk size is 32k but this can be changed using the webcontainer custom property
'responsebuffersize'.

PROBLEM CONCLUSION:

The webcontainer has been changed to write responses either synchronously or asynchronously based on a new webcontainer custom property 'com.ibm.ws.webcontainer.channelwritetype'. If this property is set to 'sync', synchronous writing is used, otherwise asynchronous writing is used (default). Asynchronous writing is the same behavior as V6.0.2.9 and earlier V6.0 levels. Synchronous writing is the same behavior as Version 5.0 and 4. 0.

For details of how to set a webcontainer custom property please see:

http://www-1.ibm.com/support/docview.wss?rss=180&uid=swg21284395

Behavior notes:

com.ibm.ws.webcontainer.channelwritetype=async

The webcontainer will use asynchronous writes to write chunks of response data. As a result the
maximum amount of response data which may be held in memory is:

the size of the response data of every active request in the webcontainer,

(in theory this is unlimited because a request can complete leaving buffered response data waiting
to be written).

Further there is no restriction on the maximum number of active requests which can be simultaneously
processed by the webcontainer.

Note: When the webcontainer does an asynchronous write of a chunk of response data, in a less busy system the write is actually performed synchronously. However, the webcontainer only adds response data into memory when waiting for an asynchronous write of a chunk of response data to complete. The likelihood of an asynchronous write of a chunk of response data actually being performed synchronously may be affected by the chunk size.

com.ibm.ws.webcontainer.channelwritetype=sync

All writes of chunks of response data will be performed synchronously and no chunks of response data will be buffered into memory. As a result the approximate maximum amount of response data which will be held in memory is:

responsebuffersize * number of webcontainer threads.

And further the maximum number of requests which may be processed simultaneously by the webcontainer is limited by the number of webcontainer threads (additional requests will be queued waiting for a request in process to complete).

Note: this permits a larger chunk sizes to be used, the larger the chink size the fewer writes required to write out a complete response. The chunk size can be set using the webcontainer custom property responsebuffersize which is 32k by default.

Please note that a fix for PK31745, for IBM WebSphere Application Server versions 6.1.0 to 6.1.0.5, is included in the published fix for PK41446. As a result, to obtain PK31745 on these versions please install PK41446 which is available at:


http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg24015854

Prerequisites

Please download the UpdateInstaller below to install this fix.

[{"PRLabel":"UpdateInstaller","PRLang":"US English","PRSize":"7250000","PRPlat":{"label":"AIX","code":"PF002"},"PRURL":"http://www.ibm.com/support/docview.wss?rs=180&uid=swg21205991"}]

Installation Instructions

Please review the readme.txt for detailed installation instructions.

[{"INLabel":"Readme","INLang":"US English","INSize":"6810","INURL":"ftp://public.dhe.ibm.com/software/websphere/appserv/support/fixes/PK31745/readme.txt"}]
Off
[{"DNLabel":"6.0.2.11-WS-WAS-IFPK31745","DNDate":"12-13-2006","DNLang":"US English","DNSize":"13280","DNPlat":{"label":"AIX","code":"PF002"},"DNURL":"ftp://public.dhe.ibm.com/software/websphere/appserv/support/fixes/PK31745/6.0.2.11-WS-WAS-IFPK31745.pak","DNURL_FTP":null,"DDURL":"http://public.dhe.ibm.com:7618;sw_websphere;appserv/support/fixes/PK31745/6.0.2.11-WS-WAS-IFPK31745.pak"}]

Technical Support

Contact IBM Support using SR (http://www-306.ibm.com/software/support/probsub.html), visit the WebSphere Application Server Support Web site (http://www.ibm.com/software/webservers/appserv/was/support/), or contact 1-800-IBM-SERV(U.S. only).

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Servlet Engine\/Web Container","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.0.2.11;6.0.2.13;6.0.2.15;6.0.2.17","Edition":"Base;Express;Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Java SDK","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg24014355