Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2011 00:54:13 -0400
From:      Jason Hellenthal <jhell@DataIX.net>
To:        Ronald Klop <ronald-freebsd8@klop.yi.org>
Cc:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Re: /usr/bin/script eating 100% cpu with portupgrade and xargs
Message-ID:  <20110918045413.GA63773@DataIX.net>
In-Reply-To: <op.v1y8gdtf8527sy@pinky>
References:  <op.v1y8gdtf8527sy@pinky>

next in thread | previous in thread | raw e-mail | index | archive | help

--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable



On Sun, Sep 18, 2011 at 01:49:15AM +0200, Ronald Klop wrote:
> Hi,
>=20
> I'm running portupgrade in screen to update all the ports for =20
> 9-BETA2/9-CURRENT on amd64. While doing this script eats 100% cpu.
> Because portupgrade -fa crashed I'm running this command to update the =
=20
> remaining non-updates ports.
> find /var/db/pkg -name +DESC -mtime +2 |cut -d / -f 5 | xargs time nice -=
n =20
> 20 portupgrade -f
>=20
> The output of truss -p `pgrep script` is this:
> clock_gettime(13,{1316301104.000000000 })        =3D 0 (0x0)
> select(5,{0 4},0x0,0x0,{30.000000 })             =3D 1 (0x1)
> read(0,0x7fffffffcdf0,1024)                      =3D 0 (0x0)
> write(4,0x7fffffffcdf0,0)                        =3D 0 (0x0)
> clock_gettime(13,{1316301104.000000000 })        =3D 0 (0x0)
> select(5,{0 4},0x0,0x0,{30.000000 })             =3D 1 (0x1)
> read(0,0x7fffffffcdf0,1024)                      =3D 0 (0x0)
> write(4,0x7fffffffcdf0,0)                        =3D 0 (0x0)
> clock_gettime(13,{1316301104.000000000 })        =3D 0 (0x0)
> select(5,{0 4},0x0,0x0,{30.000000 })             =3D 1 (0x1)
> read(0,0x7fffffffcdf0,1024)                      =3D 0 (0x0)
> write(4,0x7fffffffcdf0,0)                        =3D 0 (0x0)
> clock_gettime(13,{1316301104.000000000 })        =3D 0 (0x0)
> select(5,{0 4},0x0,0x0,{30.000000 })             =3D 1 (0x1)
> read(0,0x7fffffffcdf0,1024)                      =3D 0 (0x0)
> write(4,0x7fffffffcdf0,0)                        =3D 0 (0x0)
>=20
> So it is really fast in reading and writing 0 bytes most of the time.
>=20
> I also found http://web.archiveorange.com/archive/v/6ETvLvjo60Gj9geAUAb6 =
=20
> and I think I am better of by rewriting my command so stdin/stdout is =20
> still the terminal. Although the link is a couple of years old.
>=20
> Is this known? Can somebody explain me why my xargs command is not workin=
g =20
> well?
>=20

Are you absolutely sure that its script(1) causing this ? 100% CPU usage
has been a known side effect of screen(1) for quite some time. Rebuild
it and try again.

--mP3DRpeJDSE+ciuQ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
Comment: http://bit.ly/0x89D8547E

iQEcBAEBAgAGBQJOdXl1AAoJEJBXh4mJ2FR+LXEH/iLvSTTK2b0c8UwmhvR2R4mM
TAJZX68xEBCLCS5hjy6vqrXRxiRuJ1Cj2chYA5ThVrzji5QnaPrpvGXaKWQtmhd8
6E/b2bbyiHNZCPMoHIlM/JjRKGky5u4aTBLiKPMYQ2QmJiZTDO1mEn0t7i+YIi9+
98N+s6TA4qQX2TP34IAtp/A3q8v4fC7YUoPA0BOSiioAMpXtUsT6Bhnb2cq85k4J
+WaGZyOTjR932eSP9c0q1xJGAsuFbF+qQAhJb88MzclPWivkykZ5RV9dCNKsegHs
1K1iEAtDYSdwnJZ1QmqAZU4LVeoFuXAjtuRPWlkJBGHKd6BPG5DhH0dFh4fH+uU=
=vCrP
-----END PGP SIGNATURE-----

--mP3DRpeJDSE+ciuQ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110918045413.GA63773>