From owner-freebsd-isdn@freebsd.org Sun Feb 21 22:55:32 2016 Return-Path: Delivered-To: freebsd-isdn@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 675C8AB0122 for ; Sun, 21 Feb 2016 22:55:32 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 325391380 for ; Sun, 21 Feb 2016 22:55:31 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id C77B367BC1; Sun, 21 Feb 2016 23:55:22 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id ojxLIdYW6Nqt; Sun, 21 Feb 2016 23:55:22 +0100 (CET) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id 3773667BD5; Sun, 21 Feb 2016 23:55:22 +0100 (CET) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.local.incore (Postfix) with ESMTP id D02F650899; Sun, 21 Feb 2016 23:55:21 +0100 (CET) Message-ID: <56CA4059.7060601@incore.de> Date: Sun, 21 Feb 2016 23:55:21 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Hans Petter Selasky CC: freebsd-isdn@freebsd.org Subject: Re: chan_capi error after update References: <56C6E0D4.5060603@incore.de> <56C74704.6060606@selasky.org> <56C83752.6080708@selasky.org> <56C87494.6020605@incore.de> <56C87F06.1070504@selasky.org> <56C88301.3060104@selasky.org> <56C89326.4030803@incore.de> <56C895EA.5000404@selasky.org> In-Reply-To: <56C895EA.5000404@selasky.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2016 22:55:32 -0000 Hi, > Looks good to me. What happens when you try to dial IN/OUT. Nothing works? > And did you try "capitest" to make a CAPI test call? > Can you describe a bit more what is not working? > > --HPS On first dial OUT asterisk crashed with core dump and therefore I first tried to get rid of the messages ERROR[988] chan_capi.c: CAPI error sending CAPI_FACILITY_REQ In the meantime I have inspected the core dumps and found the crash happens in the library libexecinfo.so.1, which is activated by asterisk because I have ASTCFLAGS+=-DDEBUG_THREADS -DBETTER_BACKTRACES -DNO_OPTIMIZE in the configure step. Then I found PR/193610 which includes your comment to the compiler flag "-fno-omit-frame-pointer". After adding this flag to the asterisk18 Makefile the dumps are gone and on my (small) test machine everything works as expected. Maybe it is better to use this flag for chan_capi too ? -- Andreas Longwitz From owner-freebsd-isdn@freebsd.org Mon Feb 22 06:51:37 2016 Return-Path: Delivered-To: freebsd-isdn@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 B138FAAF652 for ; Mon, 22 Feb 2016 06:51:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B4961860 for ; Mon, 22 Feb 2016 06:51:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E62F41FE022; Mon, 22 Feb 2016 07:51:33 +0100 (CET) Subject: Re: chan_capi error after update To: Andreas Longwitz References: <56C6E0D4.5060603@incore.de> <56C74704.6060606@selasky.org> <56C83752.6080708@selasky.org> <56C87494.6020605@incore.de> <56C87F06.1070504@selasky.org> <56C88301.3060104@selasky.org> <56C89326.4030803@incore.de> <56C895EA.5000404@selasky.org> <56CA4059.7060601@incore.de> Cc: freebsd-isdn@freebsd.org From: Hans Petter Selasky Message-ID: <56CAB08C.7000309@selasky.org> Date: Mon, 22 Feb 2016 07:54:04 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <56CA4059.7060601@incore.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2016 06:51:37 -0000 On 02/21/16 23:55, Andreas Longwitz wrote: > Hi, > > >> Looks good to me. What happens when you try to dial IN/OUT. Nothing works? >> And did you try "capitest" to make a CAPI test call? >> Can you describe a bit more what is not working? >> >> --HPS > > On first dial OUT asterisk crashed with core dump and therefore I first > tried to get rid of the messages > > ERROR[988] chan_capi.c: CAPI error sending CAPI_FACILITY_REQ > > In the meantime I have inspected the core dumps and found the crash > happens in the library libexecinfo.so.1, which is activated by asterisk > because I have > > ASTCFLAGS+=-DDEBUG_THREADS -DBETTER_BACKTRACES -DNO_OPTIMIZE > > in the configure step. Then I found PR/193610 which includes your > comment to the compiler flag "-fno-omit-frame-pointer". After adding > this flag to the asterisk18 Makefile the dumps are gone and on my > (small) test machine everything works as expected. > > Maybe it is better to use this flag for chan_capi too ? > Hi Andreas, I've now created version 2.0.17 of chan_capi and that also includes an option to use clang to compile it, which supports the -fblocks argument. I think 8.4-stable has the clang compiler? Thank you! --HPS From owner-freebsd-isdn@freebsd.org Mon Feb 22 08:39:03 2016 Return-Path: Delivered-To: freebsd-isdn@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 79E4BAB05D0 for ; Mon, 22 Feb 2016 08:39:03 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 439B2180A for ; Mon, 22 Feb 2016 08:39:03 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id D0A2A67960; Mon, 22 Feb 2016 09:39:00 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id urYkXSBszh57; Mon, 22 Feb 2016 09:39:00 +0100 (CET) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id 480576797E; Mon, 22 Feb 2016 09:39:00 +0100 (CET) Received: from bsdlo.incore (bsdlo.incore [192.168.0.84]) by mail.local.incore (Postfix) with ESMTP id 3270A5089D; Mon, 22 Feb 2016 09:39:00 +0100 (CET) Message-ID: <56CAC923.8030704@incore.de> Date: Mon, 22 Feb 2016 09:38:59 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Hans Petter Selasky CC: freebsd-isdn@freebsd.org Subject: Re: chan_capi error after update References: <56C6E0D4.5060603@incore.de> <56C74704.6060606@selasky.org> <56C83752.6080708@selasky.org> <56C87494.6020605@incore.de> <56C87F06.1070504@selasky.org> <56C88301.3060104@selasky.org> <56C89326.4030803@incore.de> <56C895EA.5000404@selasky.org> <56CA4059.7060601@incore.de> <56CAB08C.7000309@selasky.org> In-Reply-To: <56CAB08C.7000309@selasky.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2016 08:39:03 -0000 Hi Hans, >> because I have >> >> ASTCFLAGS+=-DDEBUG_THREADS -DBETTER_BACKTRACES -DNO_OPTIMIZE >> >> in the configure step. Then I found PR/193610 which includes your >> comment to the compiler flag "-fno-omit-frame-pointer". After adding >> this flag to the asterisk18 Makefile the dumps are gone and on my >> (small) test machine everything works as expected. >> >> Maybe it is better to use this flag for chan_capi too ? >> > > I've now created version 2.0.17 of chan_capi and that also includes an > option to use clang to compile it, which supports the -fblocks argument. > I think 8.4-stable has the clang compiler? No, I use FreeBSD 8 (no clang) and 10 (has clang). My asterisk version from from port branch 2014Q4 has the entry "USE_GCC=YES" in his Makefile independent of OS version. -- Andreas Longwitz From owner-freebsd-isdn@freebsd.org Mon Feb 22 10:16:34 2016 Return-Path: Delivered-To: freebsd-isdn@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 37E0FAAF7F7 for ; Mon, 22 Feb 2016 10:16:34 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from slim.berklix.org (slim.berklix.org [94.185.90.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0DE414C3 for ; Mon, 22 Feb 2016 10:16:32 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from mart.js.berklix.net (pD9FE990D.dip0.t-ipconnect.de [217.254.153.13]) (authenticated bits=128) by slim.berklix.org (8.14.5/8.14.5) with ESMTP id u1M98KLF027318; Mon, 22 Feb 2016 10:08:20 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id u1M98SQu016230; Mon, 22 Feb 2016 10:08:28 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id u1M97qVX025180; Mon, 22 Feb 2016 10:08:10 +0100 (CET) (envelope-from jhs@berklix.com) Message-Id: <201602220908.u1M97qVX025180@fire.js.berklix.net> To: Andreas Longwitz cc: Hans Petter Selasky , freebsd-isdn@freebsd.org Subject: Re: chan_capi error after update From: "Julian H. Stacey" Organization: http://berklix.eu BSD Unix Linux Consultants, Munich Germany User-agent: EXMH on FreeBSD http://berklix.eu/free/ X-URL: http://www.berklix.eu In-reply-to: Your message "Mon, 22 Feb 2016 09:38:59 +0100." <56CAC923.8030704@incore.de> Date: Mon, 22 Feb 2016 10:07:52 +0100 X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2016 10:16:34 -0000 Andreas Longwitz wrote: > Hi Hans, > > >> because I have > >> > >> ASTCFLAGS+=-DDEBUG_THREADS -DBETTER_BACKTRACES -DNO_OPTIMIZE > >> > >> in the configure step. Then I found PR/193610 which includes your > >> comment to the compiler flag "-fno-omit-frame-pointer". After adding > >> this flag to the asterisk18 Makefile the dumps are gone and on my > >> (small) test machine everything works as expected. > >> > >> Maybe it is better to use this flag for chan_capi too ? > >> > > > > I've now created version 2.0.17 of chan_capi and that also includes an > > option to use clang to compile it, which supports the -fblocks argument. > > I think 8.4-stable has the clang compiler? > > No, I use FreeBSD 8 (no clang) and 10 (has clang). My asterisk version > from from port branch 2014Q4 has the entry "USE_GCC=YES" in his Makefile > independent of OS version. > > > -- > Andreas Longwitz In case it might help anyone, I looked on my laptop with 4 MBR slices with latest minor releases of each major, (3 releases not stables though) S1 8.4-RELEASE S3 9.3-RELEASE S2 10.2-RELEASE S4 11.0-CURRENT chroot /s1 head -1 /etc/motd FreeBSD 8.4-RELEASE (LAPR.small) #0: Fri May 9 02:23:49 CEST 2014 which clang /usr/local/bin/clang clang -v clang version 3.2 (tags/RELEASE_32/final) Target: amd64-portbld-freebsd8.4 Thread model: posix which cc /usr/bin/cc cc -v Using built-in specs. Target: amd64-undermydesk-freebsd Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 4.2.1 20070831 patched [FreeBSD] ------ head -1 /etc/motd FreeBSD 9.3-RELEASE (LAPR.small) #1: Tue Nov 4 22:22:57 CET 2014 which clang /usr/bin/clang clang -v FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd9.3 Thread model: posix Selected GCC installation: which cc /usr/bin/cc cc -v Using built-in specs. Target: amd64-undermydesk-freebsd Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 4.2.1 20070831 patched [FreeBSD] ------ head -1 /etc/motd FreeBSD 10.2-RELEASE (LAPR.small) #0: Tue Jan 19 21:14:45 CET 2016 which clang /usr/bin/clang clang -v FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.2 Thread model: posix Selected GCC installation: which cc /usr/bin/cc cc -v FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.2 Thread model: posix Selected GCC installation: ------ S4 Current: head -1 /etc/motd FreeBSD 11.0-CURRENT (GENERIC) #0 r295216M: Thu Feb 4 12:18:23 CET 2016 which clang /usr/bin/clang clang -v FreeBSD clang version 3.7.1 (tags/RELEASE_371/final 255217) 20151225 Target: x86_64-unknown-freebsd11.0 Thread model: posix which cc /usr/bin/cc cc -v FreeBSD clang version 3.7.1 (tags/RELEASE_371/final 255217) 20151225 Target: x86_64-unknown-freebsd11.0 Thread model: posix ------ Cheers, Julian -- Julian Stacey, BSD Linux Unix Sys Eng Consultant Munich http://berklix.eu/jhs/ Mail plain text, No quoted-printable, HTML, base64, MS.doc. Prefix old lines '> ' Reply below old, like play script. Break lines by 80. From owner-freebsd-isdn@freebsd.org Tue Feb 23 23:13:27 2016 Return-Path: Delivered-To: freebsd-isdn@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 ED7C6AB1548 for ; Tue, 23 Feb 2016 23:13:27 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6E681A1F for ; Tue, 23 Feb 2016 23:13:27 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id 61DA167C47; Wed, 24 Feb 2016 00:13:18 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id jkszI2alqGw3; Wed, 24 Feb 2016 00:13:17 +0100 (CET) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id C596D67C73; Wed, 24 Feb 2016 00:13:17 +0100 (CET) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.local.incore (Postfix) with ESMTP id 64E485089A; Wed, 24 Feb 2016 00:13:17 +0100 (CET) Message-ID: <56CCE78C.1020509@incore.de> Date: Wed, 24 Feb 2016 00:13:16 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Hans Petter Selasky CC: freebsd-isdn@freebsd.org Subject: Re: chan_capi error after update References: <56C6E0D4.5060603@incore.de> <56C74704.6060606@selasky.org> <56C83752.6080708@selasky.org> <56C87494.6020605@incore.de> <56C87F06.1070504@selasky.org> <56C88301.3060104@selasky.org> <56C89326.4030803@incore.de> <56C895EA.5000404@selasky.org> <56CA4059.7060601@incore.de> <56CAB08C.7000309@selasky.org> In-Reply-To: <56CAB08C.7000309@selasky.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2016 23:13:28 -0000 Hi Hans, the message that bothered me was ERROR[8810] chan_capi.c: CAPI error sending CAPI_FACILITY_REQ ... with error code 0x1101 (= CAPI_ERROR_INVALID_APPLICATION_ID). In chan_capi 2.0.3 the application was registered with capi20_register() on startup direct from load_module() via capi_application_alloc(), that worked fine. In chan_capi 2.0.17 the application will be registered with capi20_register() in the capi_do_monitor thread in function capi_application_restart(). Therefore the main thread should wait until registration is done. After introducing the following patch all error messages on startup are gone: --- chan_capi.c.orig 2016-02-20 15:55:36.000000000 +0100 +++ chan_capi.c 2016-02-23 21:38:15.144667154 +0100 @@ -8309,6 +8309,9 @@ */ capi_application[0] = p_app; + /* wait until capi_do_monitor has called capi20_register() */ + sleep(2); + cc_mutex_lock(&p_app->lock); app_locked = 1; -- Thanks again for help, with kindly regards Andreas Longwitz