From owner-freebsd-arm@FreeBSD.ORG Sun Sep 15 14:52:56 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E6C98F19 for ; Sun, 15 Sep 2013 14:52:56 +0000 (UTC) (envelope-from db@db.net) Received: from diana.db.net (unknown [IPv6:2620:64:0:1:223:7dff:fea2:c8f2]) by mx1.freebsd.org (Postfix) with ESMTP id CE26F255F for ; Sun, 15 Sep 2013 14:52:56 +0000 (UTC) Received: from night.db.net (localhost [127.0.0.1]) by diana.db.net (Postfix) with ESMTP id 65F1D2AA56C; Sun, 15 Sep 2013 08:52:54 -0600 (MDT) Received: by night.db.net (Postfix, from userid 1000) id 5D3791CC20; Sun, 15 Sep 2013 09:52:38 -0500 (EST) Date: Sun, 15 Sep 2013 09:52:38 -0500 From: Diane Bruce To: Paul Mather Subject: Re: sshd isnt working? Message-ID: <20130915145238.GB18382@night.db.net> References: <20130915120005.GA16617@night.db.net> <92A05C0F-B921-4998-8AF5-E0B4994E37D5@g.mail.vt.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92A05C0F-B921-4998-8AF5-E0B4994E37D5@g.mail.vt.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 14:52:57 -0000 On Sun, Sep 15, 2013 at 10:23:08AM -0400, Paul Mather wrote: > On Sep 15, 2013, at 8:00 AM, Diane Bruce wrote: > > > On Sun, Sep 15, 2013 at 01:39:42PM +0800, Su Kang Yin wrote: > >> Hi, > >> > >> sshd throwing signal 6 on server side ... > > > For me, I've only encountered this problem when connecting from certain clients---Mac OS X 10.7 and 10.8 so far. I can SSH to my Raspberry Pi and BeagleBone Black just fine from another RELENG_9 FreeBSD system, and from a Debian Wheezy system. The failure mode for those that don't work is the same as reported above---a signal 6 on the server side. Also, this hasn't always been the case, but I can't recall a revision number when the problem began. Yes, I have been trying to keep track of these types of reports as well. This strongly smells of a timing related problem. I have a ktrace of the entire process of sshd doing its thing. It would depend on how fast the connection was when it was hit. I initially thought we had a possible use after free so sent the ktrace to jasone@ . The problem goes away using ElectricFence from ports to replace the malloc code in sshd. Using jemalloc's opt.quarantine feature, the problem will also go away. I think this the commit that triggered this bug. http://svnweb.freebsd.org/base?view=revision&revision=250991 I'd be curious if quarantine use results in a successful world build, but it is quite memory intensive using quarantine. The asm code that does our atomic operations for arm6 must be reviewed. As sshd uses pthreads, jemalloc utilises pthread_mutex calls. > > Cheers, > > Paul. > > Diane -- - db@FreeBSD.org db@db.net http://www.db.net/~db