From owner-freebsd-current@freebsd.org Sat Jun 4 02:19:55 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5952B686E6 for ; Sat, 4 Jun 2016 02:19:55 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x230.google.com (mail-pf0-x230.google.com [IPv6:2607:f8b0:400e:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B39919BD for ; Sat, 4 Jun 2016 02:19:55 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x230.google.com with SMTP id g64so49096247pfb.2 for ; Fri, 03 Jun 2016 19:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=p2jrID7WR+MEJ/bfjHesI02me3se74MIWu5TxqFlqps=; b=y24Tti6rawB6kb+cR/tUul1tzmy/aghjKj7TaeU70OGylMOWSpAe5EPmnhq8Z5OaHW m90mKWljqxextb4WV0w05gpsIYC3rrI+/fDPL239vMrtzt4uqHanMbiVOnj1qMWA2WmJ aw7YI9mmU9YFATFbHeLY08Y97hHRqYkBZgRiJ1JsuSHktIP4O5/pG9wGaySGtZqAk8N/ LklfCbKX14MLeNFwXzpBG3UXKjtDW4FJFLpn2FhLz3TZ+v5IqOMhm3YlyB+K2ck/qj6Z GKgY8IGyYPGKb8Kr/oFZCI0dEERqJAaZYIUgPA920SIOAZ9jUq3CvWRoQtoW2VDczmrV D12A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:subject:message-id :mime-version:content-disposition:user-agent; bh=p2jrID7WR+MEJ/bfjHesI02me3se74MIWu5TxqFlqps=; b=C9ywMlQ7xKykhNfKK5ytmn/kt1MxPC6SLqSnpwgEy0amL1p8fSOTk8cB/aIi8oRBM4 FqNYJhQcCklxPJdqNCni20fQR+DO9vXamUWTOaegTlAlZctUAWlLipYLv4GFjxV6hlAt YVaOLI/d086nFQl7+PYapwiDCUmmaMHarHncs4b8Bf+fQMUrdbXF8ewUer/7zq1fsIDC xcc5iCL+Avbu1b/JKn7nDwqGtc3k8rIaFuwcIEFnj5o3HEAxE6U98YcI1+0gI1lBdLwI K3bK2niPNEXZS1etI8PR2+9ysh71TQ25kpzuIE2CxPV547vvbvHoLEI3KsBaVdVi+Ih9 4loQ== X-Gm-Message-State: ALyK8tJAgd3I7WwGKOtIa7q3AJzl1QcC4HCdMkwScwJ95iN++22muXzMxVzIb4ZKxi86Rg== X-Received: by 10.98.73.214 with SMTP id r83mr9655422pfi.114.1465006794902; Fri, 03 Jun 2016 19:19:54 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id x71sm11215164pfj.43.2016.06.03.19.19.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jun 2016 19:19:54 -0700 (PDT) Sender: Mark Johnston Date: Fri, 3 Jun 2016 19:23:47 -0700 From: Mark Johnston To: freebsd-current@FreeBSD.org Subject: thread suspension when dumping core Message-ID: <20160604022347.GA1096@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 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: Sat, 04 Jun 2016 02:19:55 -0000 Hi, I've recently observed a hang in a multi-threaded process that had hit an assertion failure and was attempting to dump core. One thread was sleeping interruptibly on an advisory lock with TDF_SBDRY set (our filesystem sets VFCF_SBDRY). SIGABRT caused the receipient thread to suspend other threads with thread_single(SINGLE_NO_EXIT), which fails to interrupt the sleeping thread, resulting in the hang. My question is, why does the SA_CORE handler not force all threads to the user boundary before attempting to dump core? It must do so later anyway in order to exit. As I understand it, TDF_SBDRY is intended to avoid deadlocks that can occur when stopping a process, but in this case we don't stop the process with the intention of resuming it, so it seems erroneous to apply this flag. Thanks, -Mark