From owner-freebsd-stable@freebsd.org Thu Aug 27 16:26:07 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63C169C4199 for ; Thu, 27 Aug 2015 16:26:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC0EC9 for ; Thu, 27 Aug 2015 16:26:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t7RGQ2Y6081335 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 27 Aug 2015 19:26:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t7RGQ2Y6081335 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t7RGQ2NF081334; Thu, 27 Aug 2015 19:26:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 27 Aug 2015 19:26:02 +0300 From: Konstantin Belousov To: Mark Martinec Cc: freebsd-stable@freebsd.org Subject: Re: Latest stable (r287104) bash leaves zombies on exit Message-ID: <20150827162602.GJ2072@kib.kiev.ua> References: <63a84f64baf8768a551fc6464e8e9526@mailbox.ijs.si> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63a84f64baf8768a551fc6464e8e9526@mailbox.ijs.si> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2015 16:26:07 -0000 On Thu, Aug 27, 2015 at 02:04:05PM +0200, Mark Martinec wrote: > Pete French wrote: > > > I updated to stable yesterday, plus updated all my porst to > > the latest pecompiled packages, but I am now seeing odd problems > > with bash on exit. Sometimes it quits, but leaves a zombie > > process... e.g > > > > PID TT STAT TIME COMMAND > > 44308 v0 IW 0:00.00 -bash (bash) > > 44312 v0 IW+ 0:00.00 /bin/sh /usr/local/bin/startx -listen_tcp > > 44325 v0 IW+ 0:00.00 xinit xterm -listen_tcp -- /usr/local/bin/X :0 > > -auth /ho > > 44328 v0 IW 0:00.00 /usr/local/bin/wmaker > > 44340 v0 S 0:03.35 /usr/local/bin/wmaker --for-real > > 49101 0- Z+ 0:02.73 > > 49314 1- Z+ 0:00.17 > > 56068 2 Ss 0:00.01 bash > > 56498 2 R+ 0:00.00 ps > > 56074 3 Is 0:00.01 bash > > 56076 3 S+ 0:00.00 mail freebsd-stable@freebsd.org > > 56308 4 Is+ 0:00.01 bash > > > > Thats the current 'ps' on this machine. The bash processes are running > > inside an xterm, so am not sure if the issue is with bash or the > > terminal. Kind of puzzled! > > I can reproduce this easily, although not every time. > > Running 10.2 under KDE, with bash as a default shell: > start xterm from a KDE 'konsole', then move to within the xterm > and try closing it (^D or exit). More often than not the xterm > will block and stay open, the bash process within goes . > > A normal kill of xterm has no effect, although a kill -9 to the > xterm blows away the xterm and the init process then clears > the bash zombie leftover. Seems like running a simple command > like 'date' in xterm before trying to close it does increase > the likelihood that xterm will block on exit. > > > > Currently I have to reboot the machine periodicly once I have > > accumulated > > enough zombies to be annoying. Its not really a long term solution > > though. > > There is no need to reboot, just kill -9 the hanging xterm processes > and the init will clear the zombies. Try to obtain the backtrace from the hung xterm. Ideally, you would rebuild xterm and the system libraries (rtld+libc+libthr) with debug symbols and get the backtraces after that.