From owner-freebsd-ia64@FreeBSD.ORG  Mon Jun 18 08:55:52 2012
Return-Path: <owner-freebsd-ia64@FreeBSD.ORG>
Delivered-To: freebsd-ia64@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24D081065672;
	Mon, 18 Jun 2012 08:55:52 +0000 (UTC)
	(envelope-from mexas@bristol.ac.uk)
Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102])
	by mx1.freebsd.org (Postfix) with ESMTP id CE8368FC0C;
	Mon, 18 Jun 2012 08:55:51 +0000 (UTC)
Received: from ncsc.bris.ac.uk ([137.222.10.41])
	by dirg.bris.ac.uk with esmtp (Exim 4.72)
	(envelope-from <mexas@bristol.ac.uk>)
	id 1SgXkP-0003ps-CU; Mon, 18 Jun 2012 09:55:45 +0100
Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241])
	by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72)
	(envelope-from <mexas@bris.ac.uk>)
	id 1SgXkO-0002Uz-Qb; Mon, 18 Jun 2012 09:55:45 +0100
Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1])
	by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id
	q5I8tifG012620; Mon, 18 Jun 2012 09:55:44 +0100 (BST)
	(envelope-from mexas@bris.ac.uk)
Received: (from mexas@localhost)
	by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id
	q5I8tiid012619; Mon, 18 Jun 2012 09:55:44 +0100 (BST)
	(envelope-from mexas@bris.ac.uk)
X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to
	mexas@bris.ac.uk using -f
Date: Mon, 18 Jun 2012 09:55:44 +0100
From: Anton Shterenlikht <mexas@bristol.ac.uk>
To: freebsd-current@freebsd.org, freebsd-ia64@freebsd.org
Message-ID: <20120618085544.GA12592@mech-cluster241.men.bris.ac.uk>
Mail-Followup-To: freebsd-current@freebsd.org, freebsd-ia64@freebsd.org
References: <20120614105738.GA35741@mech-cluster241.men.bris.ac.uk>
	<20120614111505.GA36160@mech-cluster241.men.bris.ac.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20120614111505.GA36160@mech-cluster241.men.bris.ac.uk>
User-Agent: Mutt/1.4.2.3i
Cc: 
Subject: Re: csup ends up in sigwai after "Shutting down connection to
	server", never exits
X-BeenThere: freebsd-ia64@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Porting FreeBSD to the IA-64 <freebsd-ia64.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ia64>,
	<mailto:freebsd-ia64-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ia64>
List-Post: <mailto:freebsd-ia64@freebsd.org>
List-Help: <mailto:freebsd-ia64-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ia64>,
	<mailto:freebsd-ia64-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jun 2012 08:55:52 -0000

On Thu, Jun 14, 2012 at 12:15:05PM +0100, Anton Shterenlikht wrote:
> On Thu, Jun 14, 2012 at 11:57:38AM +0100, Anton Shterenlikht wrote:
> > On ia64 r235474 and r235163 I get: 
> > 
> > # csup -L2 /root/ports-supfile 
> > Parsing supfile "/root/ports-supfile"
> > Connecting to cvsup.uk.FreeBSD.org
> > Connected to 131.111.8.41
> > Server software version: SNAP_16_1h
> > MD5 authentication started
> > MD5 authentication successful
> > Negotiating file attribute support
> > Exchanging collection information
> > Establishing multiplexed-mode data connection
> > Running
> > Updating collection ports-all/cvs
> > Shutting down connection to server
> > 
> > csup never exits.
> > 
> > >From top:
> > 
> >   PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
> > 33822 root          2  20    0 37496K 23352K sigwai  1   0:32  0.00% csup
> >   
> > 
> > On amd64 r236740M I don't see this problem.
> 
> Just to update - I don't see this problem on ia64 r231193M.
> It seems the only relevant change in usr.bin/csup since then was:
> 
> Index: usr.bin/csup/auth.c
> ===================================================================
> --- usr.bin/csup/auth.c (revision 231193)
> +++ usr.bin/csup/auth.c (working copy)
> @@ -293,7 +293,7 @@
>         gettimeofday(&tv, NULL);
>         pid = getpid();
>         ppid = getppid();
> -       srand(tv.tv_usec ^ tv.tv_sec ^ pid);
> +       srandom(tv.tv_usec ^ tv.tv_sec ^ pid);
>         addrlen = sizeof(laddr);
>         error = getsockname(config->socket, (struct sockaddr *)&laddr, &addrlen);
>         if (error < 0) {

I was thinking of doing a binary search for this,
but realised that I'd have to build/install world,
not just kernel, right? This will take a *long* time.

Shall I submit a PR for this?

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423