From owner-freebsd-current@FreeBSD.ORG Sat Jul 28 18:16:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C08D106564A; Sat, 28 Jul 2012 18:16:45 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1666F8FC0C; Sat, 28 Jul 2012 18:16:45 +0000 (UTC) Received: by obbun3 with SMTP id un3so7987783obb.13 for ; Sat, 28 Jul 2012 11:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3OkQooc7un/FLsZP94YbJ4Ls8TqKswbqAAFZv0GlhoI=; b=Yc+4G80FPYXWHsbqvGAE39DoH3hirK4j+k8Ra8Ya5rQB2rqzeq8J1gKP0KwXIfY4Pv fDXnArzNlQHDdFQ5+iLyeZhIU0COAIFs6VFrx0It3OdG7Bx2BM15XYqh8pae7I3mUvf1 /MnAZ3RfRXgIa+wSGMfIIECASkCcWUkc5D+cKV5kwnGsOyEYE/jkstEoHFIs6azogtl5 e1pfx6LyK3+9yjSW1lCfdcnNtba5OP9dtZx9IwEfr/igDFdkTiBMVUlXt+SjZjBKni1+ r2Fdm9BqVbHO1cjQowCnltoaak3GgGeouEnbZ+Hxmjy6CmRj2rvFR7wWBXz0Ilb5T73j zWyg== MIME-Version: 1.0 Received: by 10.182.88.9 with SMTP id bc9mr9610070obb.4.1343499404715; Sat, 28 Jul 2012 11:16:44 -0700 (PDT) Received: by 10.76.84.7 with HTTP; Sat, 28 Jul 2012 11:16:44 -0700 (PDT) In-Reply-To: <50141F96.5070808@zedat.fu-berlin.de> References: <50141F96.5070808@zedat.fu-berlin.de> Date: Sat, 28 Jul 2012 11:16:44 -0700 Message-ID: From: Garrett Cooper To: "O. Hartmann" Content-Type: text/plain; charset=ISO-8859-1 Cc: Tim Kientzle , "freeb >> Current FreeBSD" , Martin Matuska Subject: Re: r238860: bsdtar: eating up 100% CPU, hanging X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2012 18:16:45 -0000 On Sat, Jul 28, 2012 at 10:21 AM, O. Hartmann wrote: > When updating ports (like databases/sqlite3 or graphics/png via portmaster > graphics/png), the installation process comes to a point where a backup of > the old port is created with bsdtar. The process hangs then: > > ===>>> Starting build for graphics/png <<<=== > > ===>>> All dependencies are up to date > > > ===>>> Creating a backup package for old version png-1.5.12 > load: 1.38 cmd: bsdtar 99286 [running] 1301.04r 1296.34u 0.00s 100% 5656k > > > And a look on top: > > last pid: 3365; load averages: 1.49, 1.44, 1.41 > up 0+04:39:08 19:17:44 > 65 processes: 2 running, 63 sleeping > CPU: 50.4% user, 0.0% nice, 1.0% system, 0.0% interrupt, 48.6% idle > Mem: 521M Active, 3599M Inact, 3424M Wired, 32M Cache, 826M Buf, 323M Free > ARC: 1970M Total, 672M MRU, 1224M MFU, 48K Anon, 46M Header, 28M Other > Swap: 32G Total, 32G Free > > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU > COMMAND > 99286 root 1 103 0 71724K 5672K CPU1 1 24:10 100.00% > bsdtar > 1339 root 1 21 0 3221M 38008K select 1 3:02 1.71% Xorg > 3364 ohartmann 28 20 0 634M 301M uwait 1 0:06 0.63% > thunderbird > 737 root 1 20 0 16520K 1492K select 0 0:42 0.00% > moused > 3286 ohartmann 22 20 0 681M 368M uwait 1 0:14 0.00% > firefox > 1469 ohartmann 1 20 0 72364K 10612K select 1 0:05 0.00% > xterm > > > I can circumvent by doing a make reinstall in the port's directory, but this > doesn't work for ports which copy files around using tar - like www/firefox > and mail/thunderbird (which also get stuck when bsdtar is involved). > > My operating system is > FreeBSD 10.0-CURRENT #0 r238860: Sat Jul 28 11:28:38 CEST 2012 > > buildworld and kernel from today's sources, ports seem to be up to date, I > updated everything successfully before installing the new world which seems > to be faulty. > > I also recompiled usr.bin/tar separately and installed it, but without > success. > > What to do? Debugging with FreeBSD 101: 1. Build application and library with DEBUG_FLAGS=-g . 2. Install application and libraries. 3. Trigger issue again. 4. gcore 5. gdb `which tar` 6. Type in bt and hit enter. Other things that are always needed for developers when tracking down issues: - Simple reproductions: I do X, Y happens (exact commands are a must). - Provide your environment: Quantifying `environment` can be tricky (it can extend to grabbing shell environment info, machine info, etc), but in this case grabbing your /etc/make.conf and /etc/src.conf and providing a date when you synced from ports *should* suffice. Send the backtrace in 6., the reproduction, and your environment, to the upstream/local maintainer (in this case kientzle@/mm@) so the issue can be resolved locally then pulled back in at a later date from upstream. Thanks! -Garrett PS If your situation is reproducible, I might hit this in a bit when I upgrade my VMs and have to do ports upgrades. This is always another helpful datapoint.