From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B3611138206 for ; Mon, 25 Apr 2016 00:37:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B38E121C004; Mon, 25 Apr 2016 00:37:04 +0000 (UTC) Received: from resqmta-ch2-09v.sys.comcast.net (resqmta-ch2-09v.sys.comcast.net [69.252.207.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2DA12E07FE for ; Mon, 25 Apr 2016 00:37:04 +0000 (UTC) Received: from resomta-ch2-11v.sys.comcast.net ([69.252.207.107]) by comcast with SMTP id uUWJa0hJnO4QFuUWNar0Ne; Mon, 25 Apr 2016 00:37:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1461544623; bh=3ZSpgizkwYbPgBXaDPUQPeqMWLvULk2liIGxt2m8u/s=; h=Received:Received:Subject:To:From:Message-ID:Date:MIME-Version: Content-Type; b=lQ3SFa2vggb4ru7vrSx5JaCH5/mc4OvnuHDzhWY4fd+gHocPQPe4Wq78C3VgOb4WH fo3bPAbf4IGiwAJsnL2BtSTzh8+1W2qPJEaFifOV1LUdex1kwWAaVWdMEzJv6uHYOx m/IQMW/Q56jvgQjtXzp2xcoQn2rB4YU8RJJJjSODvEITDzzS1lc89HJreQPnCCS+Pf 0A5PTCOqLR2oau3ldlCs7a+W76MtHI7iMERqblggSvdaswAoKIKJ6rCJF/uP4yBRg2 PA0SbBPFtSNIDaUZtMY5ljbZmv2GTc9I/rtzMYuZ3xfwFdHayvKNSwYmHdmJjGPrQy P1roPx3E4QYpQ== Received: from [192.168.1.13] ([76.106.83.43]) by resomta-ch2-11v.sys.comcast.net with comcast id mQd21s00N0w5D3801Qd3dy; Mon, 25 Apr 2016 00:37:03 +0000 Subject: Re: [gentoo-portage-dev] dead emerge processes and/or lockfiles To: gentoo-portage-dev@lists.gentoo.org References: <20160117090635.6b77890d.dolsen@gentoo.org> <569BF303.3060408@gentoo.org> <569CDC87.9000902@gentoo.org> <571D5BCE.6070304@gentoo.org> <571D604C.9020704@gentoo.org> <571D6304.1080004@gentoo.org> From: Joshua Kinard Message-ID: <571D66A9.6070407@gentoo.org> Date: Sun, 24 Apr 2016 20:36:57 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Thunderbird/44.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <571D6304.1080004@gentoo.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Archives-Salt: c8141315-943e-4ed9-a3b8-3c7389860354 X-Archives-Hash: 00c3e2f8cadad25467e321cd13543750 On 04/24/2016 20:21, Joshua Kinard wrote: > On 04/24/2016 20:09, Zac Medico wrote: >> On 04/24/2016 04:50 PM, Joshua Kinard wrote: >>> On 01/18/2016 07:37, Joshua Kinard wrote: >>>> On 01/17/2016 15:01, Zac Medico wrote: >>>>> On 01/17/2016 09:06 AM, Brian Dolbec wrote: >>>>>> >>>>>> I've read in several forum posts lately about emerge not running and >>>>>> the problem comes down to dead emerge processes and remaining lockfiles. >>>>>> >>>>>> Perhaps we should make an emaint module to search for and fix these. >>>>>> It should be easy enough. >>>>> >>>>> It would be nicer if we fixed whatever issue(s) cause the emerge >>>>> processes to hang up. How would the emaint module distinguish a "good" >>>>> emerge process from a "bad" one? I suppose you could strace it to see if >>>>> it has any activity. >>>>> >>>> >>>> I've been playing around with Gentoo/FreeBSD and have been noticing that emerge >>>> is leaving orphaned processes behind on that platform. Seems to be >>>> ecompressdir getting hung up. emerge itself just moves on, but after I >>>> accumulated ~5 of those stuck ecompressdir processes in a single run, I kill >>>> -9'ed them all. Didn't see side-effects similar to what's described in the >>>> original post, but the way to detect this issue might be to look for orphaned >>>> children processes lacking a parent PID, then reap them. >>> >>> >>> Updating my FreeBSD VM again, I captured one of the error messages that's >>> leading to these orphaned ecompressdir processes: >>> >>> /usr/lib/portage/python3.5/ebuild-helpers/ecompressdir: cannot make pipe for >>> process substitution: File exists >>> /usr/lib/portage/python3.5/ebuild-helpers/ecompressdir: line 72: >>> /ramfs/portage/sys-freebsd/boot0-10.3/temp/sh-np-1865519000: ambiguous redirect >>> ecompressdir: bzip2 -9 /usr/share/man >>> * The ebuild phase 'install' with pid 32075 appears to have left an orphan >>> * process running in the background. >>> >>> >>> And a second one: >>> /ramfs/portage/._portage_reinstall_.pesqhjhn/bin/ebuild-helpers/ecompressdir: >>> cannot make pipe for process substitution: File exists >>> /ramfs/portage/._portage_reinstall_.pesqhjhn/bin/ebuild-helpers/ecompressdir: >>> line 72: /ramfs/portage/sys-apps/grep-2.25/temp/sh-np-474708936: ambiguous redirect >>> ecompressdir: bzip2 -9 /usr/share/man >>> ecompressdir: bzip2 -9 /usr/share/info >>> ecompressdir: bzip2 -9 /usr/share/doc >>> * The ebuild phase 'install' with pid 60185 appears to have left an orphan >>> * process running in the background. >>> >>> Not sure the exact cause. Any additional info I can provide? >>> >>> --J >> >> Looks like a problem with bash. Make sure your bash has the fix for this >> issue: >> >> https://bugs.gentoo.org/show_bug.cgi?id=447810 >> >> What version of bash is it? Maybe try some other versions. > > Latest version in ~arch, bash-4.3_p42-r2. > > Doesn't appear to be completely tied to FreeBSD, either, as there's this > unanswered topic on the forums from Nov 2015: > https://forums-lb.gentoo.org/viewtopic-t-1032574.html?sid=5d7566d09a49ba06124032598d3ad362 > > Just looks like FreeBSD trips it up far more often, as I've only seen it there. > > --J Took some more digging, but here's our bug for it. Does appear to be mostly FreeBSD-related: https://bugs.gentoo.org/show_bug.cgi?id=574426 Doesn't answer the question of how it happened in that one Linux case, but w/o additional information, sounds like it's a remote corner case on Linux and hard to reproduce. --J