From owner-freebsd-current@FreeBSD.ORG Tue Feb 21 18:04:46 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6662516A425; Tue, 21 Feb 2006 18:04:46 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F25F43D4C; Tue, 21 Feb 2006 18:04:44 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from virusscan.mail (amavis2.rz.uni-wuerzburg.de [132.187.3.47]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 0AC9E146B12; Tue, 21 Feb 2006 19:04:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id E573E2C40; Tue, 21 Feb 2006 19:04:41 +0100 (CET) Received: from frodo.galgenberg.net (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 9C46E14676D; Tue, 21 Feb 2006 19:04:41 +0100 (CET) Received: from coyote.q.local (gb-21-237.galgenberg.net [172.16.21.237]) by frodo.galgenberg.net (8.13.1/8.13.1) with ESMTP id k1LI4fIX099167; Tue, 21 Feb 2006 19:04:41 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.13.4/8.13.4) with ESMTP id k1LI4fX9066286; Tue, 21 Feb 2006 19:04:41 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.4/8.13.4) with ESMTP id k1LI4ea5007247; Tue, 21 Feb 2006 19:04:40 +0100 (CET) (envelope-from q@galgenberg.net) Received: (from q@localhost) by roadrunner.q.local (8.13.4/8.13.4/Submit) id k1LI4ehG007246; Tue, 21 Feb 2006 19:04:40 +0100 (CET) (envelope-from q@galgenberg.net) Date: Tue, 21 Feb 2006 19:04:40 +0100 From: Ulrich Spoerlein To: Doug Barton Message-ID: <20060221180440.GB2996@galgenberg.net> Mail-Followup-To: Doug Barton , Divacky Roman , freebsd-current@freebsd.org References: <1140187193.731.47.camel@spirit> <20060217181842.GA21033@odin.ac.hmc.edu> <43F65A70.7080608@FreeBSD.org> <20060217234118.GA22643@odin.ac.hmc.edu> <43F67121.5080809@FreeBSD.org> <43F682F2.1020804@FreeBSD.org> <43F68611.7080602@FreeBSD.org> <20060219110732.GA12550@stud.fit.vutbr.cz> <43F8ABC8.30005@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: <43F8ABC8.30005@FreeBSD.org> X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Cc: Divacky Roman , freebsd-current@freebsd.org Subject: Re: Bad code in rcorder(8) (Was: Re: New RCorder: abi loaded too late) 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: Tue, 21 Feb 2006 18:04:46 -0000 --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Doug Barton wrote: > Divacky Roman wrote: > > I tried running rcorder under valgrind and it showed me massive > > leaks/double-frees etc. unfortunately I am not able to run valgrind on = recent > > 7-current (when I start it it just creates 2.8G coredump) > >=20 > > it would be great to run coverity on rcorder or something to reveal the= bugs. I > > am willing to hack on it but I'd appreciate some help (either the valgr= ind > > running or list of coverity revealed bugs) >=20 > I actually requested a coverity check of the code, and it didn't turn up > anything. The code for rcorder is the same in both HEAD and RELENG_6, > although obviously you won't get the new malloc if you are running in the > latter. However, I'm guessing that if you fix things that are obviously b= ugs > that are exposed by valgrind on RELENG_6, it would still be valuable to > bring those fixes into HEAD first. Looks fine to me ... % valgrind --leak-check=3Dyes rcorder -s nostart /etc/rc.d/* /usr/local/etc= /rc.d/* =3D=3D7236=3D=3D Memcheck, a memory error detector for x86-linux. =3D=3D7236=3D=3D Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward. =3D=3D7236=3D=3D Using valgrind-2.1.0, a program supervision framework for = x86-linux. =3D=3D7236=3D=3D Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward. =3D=3D7236=3D=3D Estimated CPU clock rate is 998 MHz =3D=3D7236=3D=3D For more details, rerun with: -v =3D=3D7236=3D=3D=20 /etc/rc.d/rcconf.sh /etc/rc.d/dumpon /etc/rc.d/initrandom =2E.. /etc/rc.d/bsnmpd /etc/rc.d/bgfsck =3D=3D7236=3D=3D=20 =3D=3D7236=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 fro= m 0) =3D=3D7236=3D=3D malloc/free: in use at exit: 18734 bytes in 612 blocks. =3D=3D7236=3D=3D malloc/free: 4090 allocs, 3478 frees, 744580 bytes allocat= ed. =3D=3D7236=3D=3D For counts of detected errors, rerun with: -v =3D=3D7236=3D=3D searching for pointers to 612 not-freed blocks. =3D=3D7236=3D=3D checked 1323540 bytes. =3D=3D7236=3D=3D=20 =3D=3D7236=3D=3D 2032 bytes in 110 blocks are definitely lost in loss recor= d 1 of 3 =3D=3D7236=3D=3D at 0x3C032183: malloc (in /usr/local/lib/valgrind/vgpre= load_memcheck.so) =3D=3D7236=3D=3D by 0x80489DA: emalloc (ealloc.c:75) =3D=3D7236=3D=3D by 0x8048E56: strnode_add (rcorder.c:216) =3D=3D7236=3D=3D by 0x8049055: add_keyword (rcorder.c:388) =3D=3D7236=3D=3D=20 =3D=3D7236=3D=3D LEAK SUMMARY: =3D=3D7236=3D=3D definitely lost: 2032 bytes in 110 blocks. =3D=3D7236=3D=3D possibly lost: 0 bytes in 0 blocks. =3D=3D7236=3D=3D still reachable: 16702 bytes in 502 blocks. =3D=3D7236=3D=3D suppressed: 0 bytes in 0 blocks. =3D=3D7236=3D=3D Reachable blocks (those to which a pointer was found) are = not shown. =3D=3D7236=3D=3D To see them, rerun with: --show-reachable=3Dyes If the problem lies with a specific rc script, you should probably try to find out which one, or post them somewhere, so people can take a look. Ulrich Spoerlein --=20 PGP Key ID: 20FEE9DD Encrypted mail welcome! Fingerprint: AEC9 AF5E 01AC 4EE1 8F70 6CBD E76E 2227 20FE E9DD Which is worse: ignorance or apathy? Don't know. Don't care. --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD+1Y4524iJyD+6d0RAiRLAKCpDaaZC2RHkjpxP5YaxK0wbEUKzwCgq1GN cL4YgFoQ6jhiH0lQNtjqmrM= =ThA6 -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT--