From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 7 08:20:08 2003 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 11F2B37B401 for ; Thu, 7 Aug 2003 08:20:08 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8A7143FAF for ; Thu, 7 Aug 2003 08:20:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h77FK6Up082088 for ; Thu, 7 Aug 2003 08:20:06 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h77FK6YI082087; Thu, 7 Aug 2003 08:20:06 -0700 (PDT) Resent-Date: Thu, 7 Aug 2003 08:20:06 -0700 (PDT) Resent-Message-Id: <200308071520.h77FK6YI082087@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, Eugene Grosbein Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9C3337B401; Thu, 7 Aug 2003 08:14:20 -0700 (PDT) Received: from grosbein.pp.ru (D00015.dialonly.kemerovo.su [213.184.66.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id A566A43F93; Thu, 7 Aug 2003 08:14:13 -0700 (PDT) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (eugen@localhost [127.0.0.1]) by grosbein.pp.ru (8.12.9/8.12.9) with ESMTP id h77FE5Y7034358; Thu, 7 Aug 2003 23:14:05 +0800 (KRAST) (envelope-from eugen@grosbein.pp.ru) Received: (from eugen@localhost) by grosbein.pp.ru (8.12.9/8.12.9/Submit) id h77FE4xC034357; Thu, 7 Aug 2003 23:14:04 +0800 (KRAST) Message-Id: <200308071514.h77FE4xC034357@grosbein.pp.ru> Date: Thu, 7 Aug 2003 23:14:04 +0800 (KRAST) From: Eugene Grosbein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: stable@FreeBSD.org Subject: bin/55346: /bin/sh eats memory and CPU infinitely X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Eugene Grosbein List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2003 15:20:08 -0000 >Number: 55346 >Category: bin >Synopsis: /bin/sh eats memory and CPU infinitely >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 Aug 07 08:20:05 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 4.8-STABLE i386 >Organization: JSC Svyaz-Service >Environment: System: FreeBSD grosbein.pp.ru 4.8-STABLE FreeBSD 4.8-STABLE #3: Wed Aug 6 21:50:36 KRAST 2003 eu@grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV i386 CPUTYPE=i686 and no other optimizations >Description: /bin/sh leaks memory and can eat all CPU cycles when it become very big. >How-To-Repeat: Test script is 15K in size so it comes gzipped and uuencoded. Yes, it is compressed very well. begin 644 test.sh.gz M'XL(`"5H,C\"`^W3P0F#`!``L/]-<2+T*WYUF^*!@FBI%= MR]8=<\0U+VOEYWU6CCGMD3]#]L!-Y$-<$!<0%Q`7Q`7$!<0%<0%Q`7%!7$!< ;0%Q`7!`7^&_<8ZUZ91_3OE5\`=@<)[J\.P`` ` end Run it and watch how /bin/sh slowly increases its SIZE, RES, WCPU and CPU values. This is an exapmle. My real script grows upto 70Mb in size and eats all of idle Pentium-III 866Mhz cycles, it is machine-generated and runs 24x7x365. It's twice smaller than this test case. Now I have to restart it from time to time. >Fix: Unknown for me. Eugene Grosbein >Release-Note: >Audit-Trail: >Unformatted: