From owner-freebsd-bugs@FreeBSD.ORG Thu May 6 03:40:18 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 397DC16A4D0 for ; Thu, 6 May 2004 03:40:18 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBBD043D2F for ; Thu, 6 May 2004 03:40:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i46AeHoD097163 for ; Thu, 6 May 2004 03:40:17 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i46AeH0O097162; Thu, 6 May 2004 03:40:17 -0700 (PDT) (envelope-from gnats) Resent-Date: Thu, 6 May 2004 03:40:17 -0700 (PDT) Resent-Message-Id: <200405061040.i46AeH0O097162@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, andre post Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D707E16A4CF for ; Thu, 6 May 2004 03:31:38 -0700 (PDT) Received: from web60306.mail.yahoo.com (web60306.mail.yahoo.com [216.109.118.117]) by mx1.FreeBSD.org (Postfix) with SMTP id 43FF943D62 for ; Thu, 6 May 2004 03:31:38 -0700 (PDT) (envelope-from apostbackup@yahoo.com) Received: from [80.61.177.100] by web60306.mail.yahoo.com via HTTP; Thu, 06 May 2004 03:31:37 PDT Message-Id: <20040506103137.42262.qmail@web60306.mail.yahoo.com> Date: Thu, 6 May 2004 03:31:37 -0700 (PDT) From: andre post To: FreeBSD-gnats-submit@FreeBSD.org cc: Andre Post Subject: kern/66324: usb driver memory leak grows wired memory until panic/reboot X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2004 10:40:18 -0000 >Number: 66324 >Category: kern >Synopsis: usb driver memory leak grows wired >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 06 03:40:17 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Andre Post >Release: FreeBSD 5.1-RELEASE i386 >Organization: >Environment: kern.ostype: FreeBSD kern.osrelease: 5.1-RELEASE kern.osrevision: 199506 kern.version: FreeBSD 5.1-RELEASE #7: Wed Dec 10 10:56:43 CET 2003 user@hostname:/usr/obj/usr/src/sys/MYKERNEL ucom and uftdi drivers compiled into the kernel to facilitate usb communication with an LCD display >Description: Observed problems: - Machine locks up, panics, reboots periodically - Wired memory slowly grows, the machine starts using swap until all memory is taken and the machine dies - top and ps show that there is no process that accounts for the occupied wired memory Analysis: Browsing the mailing lists showed there were few people having the same problems. I found only 1 response that was of use and pointed me in the direction of the usb drivers. On our machines we use the ucom and uftdi drivers to communicate with an LCD display. We use lcdproc to display system stats on the display. ps and top showed that all userland processes including lcdproc did not account for the wired memory leak. Killing the userland lcd applications did not free the wired memory...only a reboot frees it. When not feeding data to the lcd screen, the wired memory levels remain constant and behave normally. There was a fix for something similar that was supposedly patched in 4.9 but apparently never wound up in the 5.x branch: http://www.freebsd.org/cgi/query-pr.cgi?pr=31659 The useful post that pointed me in the right direction: http://lists.freebsd.org/pipermail/freebsd-current/2003-July/007545.html I don't know if this is of any additional value but the output of 'pstat -t' includes the usb connection with an extremely large value in the 'COL' field. >How-To-Repeat: For our situation: compile a new kernel with 'device ucom' and 'device uftdi' and connect an lcd display that makes use of those drivers. Userland apps can send data to the lcd display by using '/dev/ucom0'. Make sure to send a lot of data to the display and do so constantly. Over time (depending on the amount of data per time unit), you'll see the used wired memory grow. >Fix: Temporary workaround: Reduce the amount of traffic that goes over the usb connection. __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover >Release-Note: >Audit-Trail: >Unformatted: X-send-pr-version: 3.113 X-GNATS-Notify: memory until panic/reboot