From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26866 invoked by alias); 17 Jun 2011 21:09:33 -0000 Received: (qmail 26859 invoked by uid 22791); 17 Jun 2011 21:09:32 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Jun 2011 21:09:04 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5HL94XH031444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 Jun 2011 17:09:04 -0400 Received: from [10.3.113.60] (ovpn-113-60.phx2.redhat.com [10.3.113.60]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5HL94ep003672; Fri, 17 Jun 2011 17:09:04 -0400 Message-ID: <4DFBC26F.9030109@redhat.com> Date: Fri, 17 Jun 2011 21:09:00 -0000 From: Josh Stone User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: "Richard W.M. Jones" CC: systemtap@sourceware.org Subject: Re: staprun -c deadlocks often References: <20110617154320.GC18438@amd.home.annexia.org> In-Reply-To: <20110617154320.GC18438@amd.home.annexia.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q2/txt/msg00306.txt.bz2 On 06/17/2011 08:43 AM, Richard W.M. Jones wrote: > When it hangs, a process listing shows: > > 13073 pts/4 Ss 0:00 \_ bash > 17930 pts/4 S+ 0:00 | \_ sudo staprun -o /tmp/stap -c /bin/ls /home/rjones/.systemtap/cache/44/stap_44fe38ee6f62656645948ce5d275d678_260427.ko > 17931 pts/4 Sl+ 0:00 | \_ /usr/libexec/systemtap/stapio -o /tmp/stap -c /bin/ls /home/rjones/.systemtap/cache/44/stap_44fe38ee6f62656645948ce5d275d678_260427.ko > 17932 pts/4 S+ 0:00 | \_ /usr/libexec/systemtap/stapio -o /tmp/stap -c /bin/ls /home/rjones/.systemtap/cache/44/stap_44fe38ee6f62656645948ce5d275d678_260427.ko > > Note that there is no staprun process, nor any /bin/ls, but two stapio > processes have been left around. It's not surprising that staprun is gone -- once it has loaded the module, it execs stapio to drop privileges while the script runs. It doesn't make any difference here since you're running with sudo, but if you add yourself to stapusr & stapdev groups and let the setuid staprun do its thing, then stapio and the -c child will run as your own uid. Having two stapios supports Frank that this is likely PR10189. We first fork stapio so we can report the child's pid to the module, then wait for the module's STP_START message before the actual child exec. If there's no message, we make no progress... Josh