From root@dchagin.static.corbina.ru  Sat Feb  7 21:48:28 2009
Return-Path: <root@dchagin.static.corbina.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0727B106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Feb 2009 21:48:28 +0000 (UTC)
	(envelope-from root@dchagin.static.corbina.ru)
Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5])
	by mx1.freebsd.org (Postfix) with ESMTP id AFDC98FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Feb 2009 21:48:27 +0000 (UTC)
	(envelope-from root@dchagin.static.corbina.ru)
Received: from corbina.ru (mail.post.ru [195.14.50.16])
	by contrabass.post.ru (Postfix) with ESMTP id 8516B50631
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  8 Feb 2009 00:30:33 +0300 (MSK)
Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru)
  by corbina.ru (CommuniGate Pro SMTP 5.1.14)
  with ESMTPS id 1612336168 for FreeBSD-gnats-submit@freebsd.org; Sun, 08 Feb 2009 00:30:33 +0300
Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1])
	by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id n17LUX4w013261
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 8 Feb 2009 00:30:33 +0300 (MSK)
	(envelope-from root@dchagin.static.corbina.ru)
Received: (from root@localhost)
	by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n17LURk2013260;
	Sun, 8 Feb 2009 00:30:27 +0300 (MSK)
	(envelope-from root)
Message-Id: <200902072130.n17LURk2013260@dchagin.static.corbina.ru>
Date: Sun, 8 Feb 2009 00:30:27 +0300 (MSK)
From: Chagin Dmitry <dchagin@freebsd.org>
Reply-To: Chagin Dmitry <dchagin@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: csup hangs after reconnect
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         131477
>Category:       bin
>Synopsis:       csup(1) hangs after reconnect
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lulf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 07 21:50:01 UTC 2009
>Closed-Date:    Sun Feb 15 16:49:10 UTC 2009
>Last-Modified:  Sun Feb 15 16:49:10 UTC 2009
>Originator:     Chagin Dmitry
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD dchagin.static.corbina.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #148 r188216: Fri Feb 6 08:28:37 MSK 2009 root@dchagin.dialup.corbina.ru:/tank/obj/work/pub/head/sys/YOY amd64


	
>Description:


>How-To-Repeat:

dchagin# cd /tank/repos/csup
dchagin#
dchagin# cat csup.netbsd

*default host=cvsup.us.NetBSD.org
*default base=/tank/repos/netbsd
*default prefix=/tank/repos/netbsd
*default release=cvs
*default delete use-rel-suffix
*default compress

netbsd

dchagin# csup -L 2 csup.netbsd
Parsing supfile "csup.netbsd"
Connecting to cvsup.us.NetBSD.org
Connected to 216.165.129.134
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
............
.........
/tank/repos/netbsd/xsrc/xfree/xc/programs/Xserver/Xext/shm.c,v: Checksum mismatch -- will transfer entire file
 Edit xsrc/xfree/xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Times-BoldItalic.pmf,v
 Edit xsrc/xfree/xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Times-Italic.pmf,v
 Edit xsrc/xfree/xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Times-Roman.pmf,v
Receiver: Connection reset by peer
 Edit xsrc/xfree/xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/ZapfDingbats.pmf,v
 Edit xsrc/xfree/xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/fonts.dir,v
 Edit xsrc/xfree/xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/model-config,v
 Edit xsrc/xfree/xc/programs/Xserver/XpConfig/README,v
 SetAttrs xsrc/xfree/xc/programs/Xserver/Xprint/AttrValid.c,v
Will retry at 00:18:47
Retrying
Connected to 216.165.129.134
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
 (core dumped)
dchagin#                       

dchagin# gdb /usr/bin/csup csup.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `csup'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypto.so.5...done.
Loaded symbols for /lib/libcrypto.so.5
Reading symbols from /lib/libz.so.4...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  pattlist_size (p=0x0) at /work/pub/head/usr.bin/csup/../../contrib/csup/misc.c:500
500     {
[New Thread 800e021c0 (LWP 100401)]
(gdb) bt
#0  pattlist_size (p=0x0) at /work/pub/head/usr.bin/csup/../../contrib/csup/misc.c:500
#1  0x000000000040efdf in proto_xchgcoll (config=0x800e12080) at /work/pub/head/usr.bin/csup/../../contrib/csup/proto.c:372
#2  0x000000000040fc6f in proto_run (config=0x800e12080) at /work/pub/head/usr.bin/csup/../../contrib/csup/proto.c:614
#3  0x000000000040ba8a in main (argc=Variable "argc" is not available.
) at /work/pub/head/usr.bin/csup/../../contrib/csup/main.c:314
(gdb) up 1
#1  0x000000000040efdf in proto_xchgcoll (config=0x800e12080) at /work/pub/head/usr.bin/csup/../../contrib/csup/proto.c:372
372                     for (i = 0; i < pattlist_size(coll->co_accepts); i++) {
(gdb) list
367             STAILQ_FOREACH(coll, &config->colls, co_next) {
368                     if (coll->co_options & CO_SKIP)
369                             cse, coll->co_umask, coll->co_options);
372                     for (i = 0; i < pattlist_size(coll->co_accepts); i++) {
373                 }
376                     for (i = 0; i < pattlist_size(coll->co_refusals); i++) {
(gdb)

	
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->lulf 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Thu Feb 12 13:41:31 UTC 2009 
Responsible-Changed-Why:  
Assign to lulf, who has recently been enhancing csup. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=131477 
State-Changed-From-To: open->feedback 
State-Changed-By: lulf 
State-Changed-When: Thu Feb 12 20:03:27 UTC 2009 
State-Changed-Why:  
- Replied with a patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=131477 

From: Ulf Lilleengen <lulf@FreeBSD.org>
To: bug-followup@freebsd.org
Cc: freebsd-bugs@FreeBSD.org
Subject: Re: bin/131477: csup(1) hangs after reconnect
Date: Thu, 12 Feb 2009 21:03:49 +0000

 On tor, feb 12, 2009 at 01:42:59pm +0000, rwatson@FreeBSD.org wrote:
 > Synopsis: csup(1) hangs after reconnect
 > 
 > Responsible-Changed-From-To: freebsd-bugs->lulf
 > Responsible-Changed-By: rwatson
 > Responsible-Changed-When: Thu Feb 12 13:41:31 UTC 2009
 > Responsible-Changed-Why: 
 > Assign to lulf, who has recently been enhancing csup.
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=131477
 > 
 Could you try this patch? I think it should solve the issue:
 
 http://people.freebsd.org/~lulf/patches/csup/csup_pattlistcrash.diff
 
 -- 
 Ulf Lilleengen

From: Ulf Lilleengen <lulf@freebsd.org>
To: bug-followup@freebsd.org
Cc: Chagin Dmitry <dchagin@freebsd.org>
Subject: Re: bin/131477: csup(1) hangs after reconnect
Date: Fri, 13 Feb 2009 20:40:54 +0000

 On fre, feb 13, 2009 at 08:29:04pm +0300, Chagin Dmitry wrote:
 > On Thu, Feb 12, 2009 at 08:03:49PM +0000, lulf@freebsd.org wrote:
 > > Synopsis: csup(1) hangs after reconnect
 > > 
 > > State-Changed-From-To: open->feedback
 > > State-Changed-By: lulf
 > > State-Changed-When: Thu Feb 12 20:03:27 UTC 2009
 > > State-Changed-Why: 
 > > - Replied with a patch.
 > > 
 > > http://www.freebsd.org/cgi/query-pr.cgi?pr=131477
 > 
 > 
 > whoops, with patch:
 > 
 > [New Thread 800e021c0 (LWP 100276)]
 > (gdb) bt
 > #0  0x000000000040bd16 in pattlist_free (p=0x800e0d420) at /work/pub/head/usr.bin/csup/../../contrib/csup/misc.c:511
 > #1  0x00000000004037e3 in coll_free (coll=0x800e09180) at /work/pub/head/usr.bin/csup/../../contrib/csup/config.c:492
 > #2  0x0000000000403dad in config_free (config=0x800e11080) at /work/pub/head/usr.bin/csup/../../contrib/csup/config.c:274
 > #3  0x000000000040bac2 in main (argc=Variable "argc" is not available.
 > ) at /work/pub/head/usr.bin/csup/../../contrib/csup/main.c:335
 > (gdb) 
 > 
 
 Oops, two of the lines were redundant. Try this instead:
 
 http://people.freebsd.org/~lulf/patches/csup/pattlistcrash2.diff
 
 -- 
 Ulf Lilleengen

From: Chagin Dmitry <dchagin@freebsd.org>
To: Ulf Lilleengen <lulf@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: bin/131477: csup(1) hangs after reconnect
Date: Sun, 15 Feb 2009 13:05:42 +0300

 On Fri, Feb 13, 2009 at 08:40:54PM +0000, Ulf Lilleengen wrote:
 > On fre, feb 13, 2009 at 08:29:04pm +0300, Chagin Dmitry wrote:
 > > On Thu, Feb 12, 2009 at 08:03:49PM +0000, lulf@freebsd.org wrote:
 > > > Synopsis: csup(1) hangs after reconnect
 > > > 
 > > > State-Changed-From-To: open->feedback
 > > > State-Changed-By: lulf
 > > > State-Changed-When: Thu Feb 12 20:03:27 UTC 2009
 > > > State-Changed-Why: 
 > > > - Replied with a patch.
 > > > 
 > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=131477
 > > 
 > > 
 > > whoops, with patch:
 > > 
 > > [New Thread 800e021c0 (LWP 100276)]
 > > (gdb) bt
 > > #0  0x000000000040bd16 in pattlist_free (p=0x800e0d420) at /work/pub/head/usr.bin/csup/../../contrib/csup/misc.c:511
 > > #1  0x00000000004037e3 in coll_free (coll=0x800e09180) at /work/pub/head/usr.bin/csup/../../contrib/csup/config.c:492
 > > #2  0x0000000000403dad in config_free (config=0x800e11080) at /work/pub/head/usr.bin/csup/../../contrib/csup/config.c:274
 > > #3  0x000000000040bac2 in main (argc=Variable "argc" is not available.
 > > ) at /work/pub/head/usr.bin/csup/../../contrib/csup/main.c:335
 > > (gdb) 
 > > 
 > 
 > Oops, two of the lines were redundant. Try this instead:
 > 
 > http://people.freebsd.org/~lulf/patches/csup/pattlistcrash2.diff
 > 
 
 fixed, no longer crash. thnx.
 
 -- 
 Have fun!
 chd

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/131477: commit references a PR
Date: Sun, 15 Feb 2009 13:22:32 +0000 (UTC)

 Author: lulf
 Date: Sun Feb 15 13:22:21 2009
 New Revision: 188644
 URL: http://svn.freebsd.org/changeset/base/188644
 
 Log:
   - Do not free the pattern lists immediately after use, as they might be needed
     again in case the connection is interrupted and csup have to reconnect. The
     lists will be freed after the collection has been completely processed.
   
   PR:		bin/131477
   Tested by:	dchagin
 
 Modified:
   head/contrib/csup/proto.c
 
 Modified: head/contrib/csup/proto.c
 ==============================================================================
 --- head/contrib/csup/proto.c	Sun Feb 15 12:10:05 2009	(r188643)
 +++ head/contrib/csup/proto.c	Sun Feb 15 13:22:21 2009	(r188644)
 @@ -521,12 +521,6 @@ proto_xchgcoll(struct config *config)
  		coll->co_filefilter = globtree_and(fileaccept,
  		    globtree_not(filerefuse));
  
 -		/* At this point we don't need the pattern lists anymore. */
 -		pattlist_free(coll->co_accepts);
 -		pattlist_free(coll->co_refusals);
 -		coll->co_accepts = NULL;
 -		coll->co_refusals = NULL;
 -
  		/* Set up a mask of file attributes that we don't want to sync
  		   with the server. */
  		if (!(coll->co_options & CO_SETOWNER))
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: lulf 
State-Changed-When: Sun Feb 15 16:48:51 UTC 2009 
State-Changed-Why:  
- Fixed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=131477 
>Unformatted:
