From owner-freebsd-hackers@freebsd.org Sat Feb 10 22:40:33 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09B0EF02F09 for ; Sat, 10 Feb 2018 22:40:33 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9236076719; Sat, 10 Feb 2018 22:40:32 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w1AMeKTu009585 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 10 Feb 2018 23:40:21 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: emss@free.fr Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w1AMe9t0097260 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 11 Feb 2018 05:40:09 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: Regression between 10 & 11, Freeswitch hangs when exiting To: Eric Masson , freebsd-hackers@FreeBSD.org, kib@freebsd.org References: <86tvuor6bt.fsf@newsrv.interne.associated-bears.org> From: Eugene Grosbein Message-ID: <5A7F74C7.9020609@grosbein.net> Date: Sun, 11 Feb 2018 05:40:07 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <86tvuor6bt.fsf@newsrv.interne.associated-bears.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=3.9 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, URIBL_BLACK autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist * [URIs: freewitch.org] * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Feb 2018 22:40:33 -0000 11.02.2018 2:29, Eric Masson пишет: > Hi, > > Freeswitch, a multiprotocol softswitch (http://freewitch.org) runs on > FreeBSD and a port is available (net/freeswitch/) > > Freeswitch runs fine on any 10.x installation, issueing the shutdown > command from cli makes the application exit cleanly. > > On any 11.x installation, issueing the shutdown command from cli makes > the application hang. > > FreeBSD version is : > FreeBSD newsrv.interne.associated-bears.org 11.1-STABLE FreeBSD 11.1-STABLE #0 r327876M: Sat Jan 13 16:19:26 CET 2018 emss@newsrv.interne.associated-bears.org:/usr/obj/usr/src/sys/SE7525GP2 amd64 > > Generic or custom kernel behave the same. > > On Freeswitch side, 1.6.19 (net/freeswitch) and also git branches master > & v1.6 show the same issue. > > I've reproduced the issue on the latest v1.6, the backtrace of stuck > process shows the following : > #0 0x00000008030ea91c in _umtx_op_err () from /lib/libthr.so.3 > #1 0x00000008030e6f97 in join_common (pthread=0x807ed7700, thread_return=0x7fffffffb658, abstime=0x0) at /usr/src/lib/libthr/thread/thr_join.c:125 > #2 0x0000000800f01421 in apr_thread_join (retval=0x7fffffffb68c, thd=0x8059e9658) at threadproc/unix/thread.c:234 > #3 0x0000000800cd889e in do_shutdown (module=0x2, shutdown=, unload=SWITCH_TRUE, fail_if_busy=(unknown: 1523667750), err=) at src/switch_loadable_module.c:2031 > #4 0x0000000800cdb84a in switch_loadable_module_shutdown () at src/switch_loadable_module.c:2083 > #5 0x0000000800c9d92c in switch_core_destroy () at src/switch_core.c:2940 > #6 0x0000000000403b2b in main (argc=, argv=0x7fffffffe988) at src/switch.c:1210 > > It seems the issue lies in thread handling. > > I've attached : > - the output of a Freeswitch related script used to gather relevant > information. > - source files showing in bt > > Thank for help. See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225584 What CPU do you use?