Fix (APAR): PK46366 Status: Fix Release: 6.0.2.19,6.0.2.17,6.0.2.15,6.0.2.13,6.0.2.11 Operating System: AIX,HP-UX,i5/OS,Linux,OS/400,Solaris,Windows Supersedes Fixes: CMVC Defect: xxxxxx Byte size of APAR: 10490 Date: 2007-06-12 Abstract: Memory leak of direct byte buffers occurs when the webcontainer receives an exception from the tcp channel when writing out response data. Description/symptom of problem: PK46366 resolves the following problem: ERROR DESCRIPTION: A direct byte buffer memory leak can happen after setting the webcontainer custom propertycom.ibm.ws.webcontainer.channelwritetype to sync. This property was introduced by PK31745. The leak occurs after a channel write error occurs: java.net.SocketException com.ibm.ws.webcontainer.channel.WCChannelLink 148 Platform: distributed/Windows Level 6.0.2.17 LOCAL FIX: PROBLEM SUMMARY USERS AFFECTED: All WebSphere Application Server version 6 users are affected although the affect is more severe for users of synchronous response writing compared to users of asynchronous response writing (default). For details of synchronous/asynchronous response writing see PK31745. PROBLEM DESCRIPTION: Memory leak of direct byte buffers occurs when the webcontainer receives an exception from the tcp channel when writing out response data. RECOMMENDATION: None Memory leak of direct byte buffers occurs when the webcontainer receives an exception from the tcp channel when writing out response data. Such an exception results in an ffdc log with a key: key = com.ibm.ws. webcontainer.channel.WCChannelLink 148 Such an exception is possible when asynchronous response writing is in use but is far more likely to occur when synchronous response writing is in use (see PK31745). Further when synchronous response writing is in use this may result in an Out Of Memory Error characterized by high Direct Byte Buffer usage in a busy and/or long running application server. The webcontainer does not handle an exception from the tcp channel correctly when writing out response data. As a result it does not release the memory in which the response data is loaded. Further any subsequent attempt to write outresponse dataas part of the same request will likely fail with the same exception resulting in further memory leaks. For example, a relevent ffdc log may include: [5/31/07 19:35:51:562 BST] , key = java.net.SocketException com.ibm.ws.webcontainer.channel. WCChannelLink 148 Exception = java.net.SocketException Source = com.ibm.ws.webcontainer.channel.WCChannelLink probeid = 148 Stack Dump = java.net.SocketException: Software caused connection abort: Vector write failed at sun.nio.ch.SocketDispatcher.writev0(Native Method) at sun.nio.ch.SocketDispatcher.writev (SocketDispatcher.java(Compiled Code)) at sun.nio.ch.IOUtil.write(IOUtil.java(Compiled Code)) at sun.nio.ch.SocketChannelImpl.write0 (SocketChannelImpl.java(Compiled Code)) at sun.nio.ch.SocketChannelImpl.write (SocketChannelImpl.java(Compiled Code)) at java.nio.channels.SocketChannel.write (SocketChannel.java(Inlined Compiled Code)) at com.ibm.ws.tcp.channel.impl.SocketIOChannel.write (SocketIOChannel.java(Inlined Compiled Code)) etc. PROBLEM CONCLUSION: The webcontainer has been updated to release memory in which response data is loaded following receipt of an exception from the tcp channel when writing response data. Further, a subsequent request to write out response data for the same request will be blocked and an exception returned to the associated servlet. The fix for this APAR is currently targeted for inclusion in fixpacks 6.0.2.21 and 6.1.0.11. Please refer to the recommended updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980 Directions to apply fix: NOTE: Choose the: 1) Release the fix applies to 2) The Editions that apply 3) Delete the Editions & Methods that do not apply and this Note Fix applies to Editions: Release 6.0 __ Application Server (Express or BASE) __ Network Deployment (ND) __ WebSphere Business Integration Server Foundation (WBISF) __ Edge Components __ Developer __ Extended Deployment (XD) Install Fix to: Method: __ Application Server Nodes __ Deployment Manager Nodes __ Both NOTE: The user must: * Have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * Logged in with the same authority level when unpacking a fix, fix pack or refresh pack. * Be at V6.0.2.2 or newer of the Update Installer. This can be checked by reviewing the level of the Update Installer in file /updateinstaller/version.txt. The Update Installer can be downloaded from the following link: http://www.ibm.com/support/docview.wss?rs=180&uid=swg21205991 For detailed instructions to Extract the Update Installer see the following Technote: http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21205400 1) Copy PKxxxxx.pak file directly to the maintenance directory 2) Shutdown WebSphere Manually execute setupCmdLine.bat in Windows or . ./setupCmdLine.sh in Unix from the WebSphere instance that maintenance is being applied to. 3) Launch Update Installer 4) Enter the installation location of the WebSphere product you want to update. 5) Select the "Install maintenance package" operation. 6) Enter the file name of the maintenance package to install (PKxxxxx.pak file which was copied in the maintenance directory). 7) Install the maintenance package. 8) Restart WebSphere Directions to remove fix: NOTE: * The user must have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * FIXES MUST BE REMOVED IN THE ORDER THEY WERE APPLIED * DO NOT REMOVE A FIX UNLESS ALL FIXES APPLIED AFTER IT HAVE FIRST BEEN REMOVED * YOU MAY REAPPLY ANY REMOVED FIX Example: If your system has fix1, fix2, and fix3 applied in that order and fix2 is to be removed, fix3 must be removed first, fix2 removed, and fix3 re-applied. 1) Shutdown WebSphere Manually execute setupCmdLine.bat in Windows or . ./setupCmdLine.sh in Unix from the WebSphere instance that uninstall is being run against. 2) Start Update Installer 3) Enter the installation location of the WebSphere product you want to remove the fix. 4) Select "Uninstall maintenance package" operation. 5) Enter the file name of the maintenance package to uninstall (PKxxxxx.pak). 6) UnInstall maintenance package. 7) Restart WebSphere Directions to re-apply fix: 1) Shutdown WebSphere. 2) Follow the Fix instructions to apply the fix. 3) Restart WebSphere. Additional Information: This fix pre-reqs PK41446.