From owner-freebsd-questions@FreeBSD.ORG Mon Dec 3 16:30:50 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37066670 for ; Mon, 3 Dec 2012 16:30:50 +0000 (UTC) (envelope-from jerry@seibercom.net) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C160F8FC17 for ; Mon, 3 Dec 2012 16:30:49 +0000 (UTC) Received: by mail-gg0-f182.google.com with SMTP id e5so454284ggh.13 for ; Mon, 03 Dec 2012 08:30:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seibercom.net; s=google; h=date:from:to:subject:message-id:in-reply-to:references:reply-to :organization:x-mailer:face:mime-version:content-type :content-transfer-encoding; bh=v+PGw+XXzd6nLIMjRi7UAZbTpd2da25ItiQgAZfryIc=; b=he35Bb3AvPFqFzj9tiKwfSLif4hRV6DcjBcZrZBFUc6WMRuCIiSsCL9pghkLkF7obN V32iEFSZV5SBaJeZUroJr23791vtT2nLHKn2m79nDvg6Qo/Jr2Fxr5eJaqEFRMUewUnP /N2I0U9nyuU868AEJLMDV839+XV44iJsMZ4Xs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:reply-to :organization:x-mailer:face:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=v+PGw+XXzd6nLIMjRi7UAZbTpd2da25ItiQgAZfryIc=; b=WKL7ETVng9zkIbPJDppndKVQrtIQYBK27j8pfqtzOUi9+CwcBnEtG0okP6j/77sDUx 7eutk8LQ1kuc4y2+SK+eixleQfVHdEWbhXMzAWveAoBN/6nTUJNBzFqmYQcTZT7YeimP V2SIj86OChDMDGJQZkGQSdandXhGmGPFEXO/Q8fIAhsfLr8kqx9Fiw19qaaRn4GjeKUH vmvHTjK8he6lYfLYQjBBXqFOkZlveh56PhFtC+KSK2aOvcUfNJttby63p7TcOF6rpurE Br9gPLHxjNIGKmaHz8E8DY2d7ZVspljJkDpKRQIa7Vu8HgXFKIt0NpD8g1Z1s6LtduWb AfbQ== Received: by 10.236.74.198 with SMTP id x46mr11294856yhd.72.1354552248789; Mon, 03 Dec 2012 08:30:48 -0800 (PST) Received: from scorpio.seibercom.net (cpe-076-182-104-150.nc.res.rr.com. [76.182.104.150]) by mx.google.com with ESMTPS id u49sm13455747yhd.18.2012.12.03.08.30.46 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 08:30:47 -0800 (PST) Received: from scorpio (localhost [127.0.0.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jerry@scorpio.seibercom.net) by scorpio.seibercom.net (Postfix) with ESMTPSA id 3YFWsd5kBmz2CG4D for ; Mon, 3 Dec 2012 11:30:45 -0500 (EST) Date: Mon, 3 Dec 2012 11:30:45 -0500 From: Jerry To: FreeBSD Subject: Re: bash pipe redirection gets stuck Message-ID: <20121203113045.02972ed0@scorpio> In-Reply-To: <23353.144.36.114.84.1354545315.squirrel@mail.rule.lv> References: <23353.144.36.114.84.1354545315.squirrel@mail.rule.lv> Organization: seibercom.net X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd8.3) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUAAABYRlwJCw4FAgAIBwKprDkBAQFQLR0BAgCir7VRttp8AAACAUlEQVQ4jZWUTYvbMBCGTVl8V2hX6Gg5G5FbWQdBj0lEfE7BhN4cyzi5Wt1E5L70roWy6N92xok/skkP+5IYrMcz78xIduDWpNM3vFzuA/jX5EY1AI6KHFwW/CzFuQAwqUBbV12p+CzIh6Awq7sg33pn5D64SQXAexffeuQlA/L35RrkaB551OjGfP/cAO8mCNaDcgvfky5ijoD0pAXlCQCnljiAjsJD9Ax05Ko5sZxbnLQcmM+dZg5IjREfZrWIHK0JuwU68pAGwHvfRxBundRzTxxz3r9dNUikPsEihjz2Dc4kjp1hKsJGuot4EDxaxzMoC7XqhxhOSfZrTS6gSX1JVdjp+o1PvWfekXgw3WL0g70nDEwA0H0HQsEZc8sTmFMTkWUfYWC/vdR1zQy3xLQgLwzu90QnlnFLjeiGWBjwhb4Sa42IqOg2qqS4O1/zhKokFUb1Q8Rj4Eb69WVflXEehJ35DgChVTE5n50eaGyMLOfH8AOodoSM4PVYAQgQdBulOa+knklYks3vAuQ+uX492lTl+A+e8qBV2AKoXalVKFfyuUp0pUp1ARaUHh82lv9MN+Ig7CZtgE6FNYvjlywT2VP2dMgOG46gTIWcqdfvuwyXNz0oMJNd/N5lh1YNiJt19ADTUo3VuFSNeQwVqRSrGjSCp53fk2g+Mvfk/gfoPxHeUS8MH9vRAAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQlTAK6Rh4d3UlJf8S/ssBSB5EIxUIIqO9klivKusD2VMs2y7qD5rVwPU7DorF0Gs0bpk8pW X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: FreeBSD List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2012 16:30:50 -0000 On Mon, 3 Dec 2012 16:35:15 +0200 (EET) long@rule.lv articulated: > Dear all, > I stumbled upon a problem where multiple pipe redirection > occasionally get stuck when trying to get sha256 sum of a stream. > > You can try to reproduce the problem if you > have /usr/ports/shells/bash installed (output redirection used in > this command is possible only in bash). > Create temporary test file with command: "dd if=/dev/urandom > of=/tmp/file1 bs=1k count=10" > And the command I'm using is: > /usr/local/bin/bash -c 'cat /tmp/file1 | tee >(/sbin/sha256 > > /tmp/file1.sha256) > /tmp/file1.copy' ; echo $status > > Command gets stuck about once in 20 executions. > top output when command gets stuck (irrelevant processes removed): > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU > COMMAND 84073 HappyUser 1 52 0 17612K 2268K wait 0 > 0:00 0.00% bash 84154 HappyUser 1 52 0 10084K 844K fifoow > 1 0:00 0.00% tee > > And more strangely, I can reproduce this problem on 9.0-RELEASE and > 7.4-RELEASE-p6, but couldn't reproduce on 8.2-RELEASE-p4. > > Thanks for any pointers/explanations, > Normunds For starters, what version of Bash? FreeBSD is still a few patches behind the current patch level, so that is also a possibility. I would suggest you visit: , subscribe to the list and then ask your question . -- Jerry ♔ Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __________________________________________________________________ Communicate! It can't make things any worse.