Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-10 Thread Gedalya
On 11/10/2016 05:26 AM, Bernhard Schmidt wrote:
> I have just uploaded 2.5.5~dfsg-3 with all patches bundled in Asterisk
> applied. Please take a look, should be available shortly.

Installed, works just fine.



Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-10 Thread Bernhard Schmidt
On Wed, Nov 09, 2016 at 08:47:42PM -0500, Gedalya wrote:

Hi,

> OK, confirmed.
> The patch (r5401) works, we're back with the previous behavior:
> 
> [Nov  9 20:43:33] ERROR[14871]: res_pjsip.c:2883 ast_sip_create_dialog_uac: 
> Could not create dialog to endpoint '' as URI '' is not valid
> [Nov  9 20:43:33] ERROR[14871]: chan_pjsip.c:1947 request: Failed to create 
> outgoing session to endpoint ''
> [Nov  9 20:43:33] WARNING[14935][C-0001]: app_dial.c:2524 dial_exec_full: 
> Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
> [Nov  9 20:43:33] ERROR[14871]: res_pjsip.c:2883 ast_sip_create_dialog_uac: 
> Could not create dialog to endpoint '' as URI '' is not valid
> [Nov  9 20:43:33] ERROR[14871]: chan_pjsip.c:1947 request: Failed to create 
> outgoing session to endpoint ''
> [Nov  9 20:43:33] WARNING[14935][C-0001]: app_dial.c:2524 dial_exec_full: 
> Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
> 
> And the call goes through just fine.
> 
> I guess the problem you had when reproducing the issue was another problem. 
> Probably including some more of the upstream patches would be a good measure 
> indeed.

I have just uploaded 2.5.5~dfsg-3 with all patches bundled in Asterisk
applied. Please take a look, should be available shortly.

Bernhard


signature.asc
Description: Digital signature


Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-09 Thread Gedalya
OK, confirmed.
The patch (r5401) works, we're back with the previous behavior:

[Nov  9 20:43:33] ERROR[14871]: res_pjsip.c:2883 ast_sip_create_dialog_uac: 
Could not create dialog to endpoint '' as URI '' is not valid
[Nov  9 20:43:33] ERROR[14871]: chan_pjsip.c:1947 request: Failed to create 
outgoing session to endpoint ''
[Nov  9 20:43:33] WARNING[14935][C-0001]: app_dial.c:2524 dial_exec_full: 
Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Nov  9 20:43:33] ERROR[14871]: res_pjsip.c:2883 ast_sip_create_dialog_uac: 
Could not create dialog to endpoint '' as URI '' is not valid
[Nov  9 20:43:33] ERROR[14871]: chan_pjsip.c:1947 request: Failed to create 
outgoing session to endpoint ''
[Nov  9 20:43:33] WARNING[14935][C-0001]: app_dial.c:2524 dial_exec_full: 
Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)

And the call goes through just fine.

I guess the problem you had when reproducing the issue was another problem. 
Probably including some more of the upstream patches would be a good measure 
indeed.



Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-09 Thread Gedalya
r5401 seems to be the fix:

https://trac.pjsip.org/repos/ticket/1946

However I'm having trouble adding a patch with this source package :-(



Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-09 Thread Gedalya
On 11/09/2016 06:26 PM, Gedalya wrote:
> asterisk: ../src/pjsip/sip_auth_client.c:507: pjsip_auth_clt_deinit: 
> Assertion `sess && sess->endpt' failed.
> Aborted
>
> This is me calling myself via my outbound trunk and coming back in via my 
> inbound trunk.
> The problem comes up only on the inbound calls, at the point where I dial 
> them to the phones and other devices.
> If I just call e.g. my mobile phone it works fine, I can complete the call 
> and asterisk continues fine.

Per [0] + google translate and testing and confirming locally, the problem is 
isolated to missing (not currently registered) SIP peers.

Making sure the Dial() app is only dialing registered and available peers makes 
the problem go away.

Next step would be to see if there is a patch upstream addressing this.

[0] https://forum.asterisk.ru/viewtopic.php?f=5=7772=10



Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-09 Thread Gedalya
On 11/09/2016 04:51 AM, Bernhard Schmidt wrote:

> I have now uploaded Asterisk 13.12.1~dfsg-1 into sid, should be built
> and available within a few hours. This works well for me with pjproject
> from sid. Maybe it really just needed a recompile, but you had already
> tested that in the beginning. Would it be possible that something went
> wrong there?
I don't see what or how. I definitely rebuilt against the new pjproject.
I'm getting the same problems now, with the new packages in the debian archive.

Note that I can make outbound calls just fine. The problem is perhaps triggered 
by something specific in my inward dialing plan.

This is with the new packages:

-- Executing *desk-out:1] Goto("PJSIP/*-", 
"desk-out,*,1") in new stack
-- Goto (desk-out,*,1)
-- Executing [*@desk-out:1] Set("PJSIP/*-", 
"CALLERID(num)=*") in new stack
-- Executing [*@desk-out:2] Goto("PJSIP/*-", 
"out-vitel,*,1") in new stack
-- Goto (out-vitel,*,1)
-- Executing [*@out-vitel:1] MixMonitor("PJSIP/*-", 
"/var/local/callrec/2016-11/1478733136.0.wav") in new stack
  == Begin MixMonitor Recording PJSIP/*-
-- Executing [*@out-vitel:2] Set("PJSIP/*-", 
"CDR(peername)=*") in new stack
-- Executing [*@out-vitel:3] Dial("PJSIP/*-", 
"PJSIP/*@trunk-didlogic") in new stack
-- Called PJSIP/*@trunk-didlogic
-- Executing [*@from-external:1] 
Goto("PJSIP/trunk-vitelity-in-0002", "internal,gedalya-all,1")
-- Goto (internal,gedalya-all,1)
-- Executing [gedalya-all@internal:1] 
Set("PJSIP/trunk-vitelity-in-0002", "CDR(peername)=trunk-vitelity-in") in 
new stack
-- Executing [gedalya-all@internal:2] 
MixMonitor("PJSIP/trunk-vitelity-in-0002", 
"/var/local/callrec/2016-11/1478733137.2.wav") in new stack
  == Begin MixMonitor Recording PJSIP/trunk-vitelity-in-0002
-- Executing [gedalya-all@internal:3] 
Dial("PJSIP/trunk-vitelity-in-0002", 
"PJSIP/*/*/*/*/*,30") in new stack
asterisk: ../src/pjsip/sip_auth_client.c:507: pjsip_auth_clt_deinit: Assertion 
`sess && sess->endpt' failed.
Aborted

This is me calling myself via my outbound trunk and coming back in via my 
inbound trunk.
The problem comes up only on the inbound calls, at the point where I dial them 
to the phones and other devices.
If I just call e.g. my mobile phone it works fine, I can complete the call and 
asterisk continues fine.

I'll try patching pjproject now and see how that goes.



Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-06 Thread Gedalya
On 11/06/2016 05:50 PM, Bernhard Schmidt wrote:
> Nothing productive on the upstream mailinglist (or rather disturbing,
> they say that ABI can change in backward incompatible way even in minor
> versions and you're always expected to recompile),
Yea, I followed the conversation there. Looks rather grim.

>  BUT thanks to Stepan
> Golosunov and Tzafrir in Bug#828240 there now seems to be a way to build
> Asterisk 13.12.1 against OpenSSL 1.1.0. 
>
> I have tested that build (built against pjproject 2.5.5~dfsg-2 in sid)
> and it does not crash for me.
OK, a little confused here: the resulting asterisk will link against both 
libssl1.1 and libssl1.0.2 (via pjsip) during runtime?
Does that kind of thing work?


> It will probably take a few more days to fully test this (and import a
> few other crash fixes for pjproject as well for good measure),
Agreed, basically all the revisions in SVN related to DNS resolution since 
2.5.5 look important.

Anyhow, I'll try this on my end soon and let you know how it went.



Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-06 Thread Bernhard Schmidt
On Fri, Nov 04, 2016 at 11:02:03AM +0100, Bernhard Schmidt wrote:

Hi,

> > I decided to try this: I made a sid chroot, manually downgraded to
> > libssl-dev 1.0.2j-1 from stretch, and built asterisk from the
> > current packaging git head (ec0143a).  I actually enabled
> > OpenSSL-1.1.0-support.patch while I was at it.
> > 
> > Ultimately, running this with pjproject 2.5.5~dfsg-2 failed at the same 
> > stage, but with a different assert:
> > 
> > asterisk: ../src/pjsip/sip_auth_client.c:507: pjsip_auth_clt_deinit: 
> > Assertion `sess && sess->endpt' failed.
> > Aborted
> 
> Thanks. I have also tested that a fresh rebuild of 2.5.1 does not exhibit
> the problem, so it is not caused by updated build-deps.
> 
> Upstream recommends to disable assertions in production builds, see
> 
> https://trac.pjsip.org/repos/wiki/FAQ#assert
> 
> When I do this I get a full-blown segfault (and we lose a symbol, so
> although we only have one rdep it would technically involve a library
> transition). I've reported the segfault to the upstream mailinglist

Nothing productive on the upstream mailinglist (or rather disturbing,
they say that ABI can change in backward incompatible way even in minor
versions and you're always expected to recompile), BUT thanks to Stepan
Golosunov and Tzafrir in Bug#828240 there now seems to be a way to build
Asterisk 13.12.1 against OpenSSL 1.1.0. 

I have tested that build (built against pjproject 2.5.5~dfsg-2 in sid)
and it does not crash for me.

It will probably take a few more days to fully test this (and import a
few other crash fixes for pjproject as well for good measure), but now
the future looks a bit less dark than before. I will probably disable
the pjsip asserts as well, following upstream recommendation.

Bernhard


signature.asc
Description: Digital signature


Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-04 Thread Bernhard Schmidt
Control: forwarded -1 
http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2016-November/019636.html

On Thu, Nov 03, 2016 at 03:12:37PM -0400, Gedalya wrote:

Hi,

> > Confirmed. If you start Asterisk in the foreground you actually get an
> > assertion
> >
> > asterisk: ../src/pj/os_core_unix.c:1254: pj_mutex_lock: Assertion
> > `mutex' failed.
> > Aborted
> >
> > Haven't done any further debugging until now, since we can't build
> > asterisk.
> 
> Hi,
> 
> I decided to try this: I made a sid chroot, manually downgraded to libssl-dev 
> 1.0.2j-1 from stretch, and built asterisk from the current packaging git head 
> (ec0143a).
> I actually enabled OpenSSL-1.1.0-support.patch while I was at it.
> 
> Ultimately, running this with pjproject 2.5.5~dfsg-2 failed at the same 
> stage, but with a different assert:
> 
> asterisk: ../src/pjsip/sip_auth_client.c:507: pjsip_auth_clt_deinit: 
> Assertion `sess && sess->endpt' failed.
> Aborted

Thanks. I have also tested that a fresh rebuild of 2.5.1 does not exhibit
the problem, so it is not caused by updated build-deps.

Upstream recommends to disable assertions in production builds, see

https://trac.pjsip.org/repos/wiki/FAQ#assert

When I do this I get a full-blown segfault (and we lose a symbol, so
although we only have one rdep it would technically involve a library
transition). I've reported the segfault to the upstream mailinglist

I will try the latest SVN snapshot later.

Bernhard


signature.asc
Description: Digital signature


Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-03 Thread Gedalya
On 11/03/2016 07:39 AM, Bernhard Schmidt wrote:
> Confirmed. If you start Asterisk in the foreground you actually get an
> assertion
>
> asterisk: ../src/pj/os_core_unix.c:1254: pj_mutex_lock: Assertion
> `mutex' failed.
> Aborted
>
> Haven't done any further debugging until now, since we can't build
> asterisk.

Hi,

I decided to try this: I made a sid chroot, manually downgraded to libssl-dev 
1.0.2j-1 from stretch, and built asterisk from the current packaging git head 
(ec0143a).
I actually enabled OpenSSL-1.1.0-support.patch while I was at it.

Ultimately, running this with pjproject 2.5.5~dfsg-2 failed at the same stage, 
but with a different assert:

asterisk: ../src/pjsip/sip_auth_client.c:507: pjsip_auth_clt_deinit: Assertion 
`sess && sess->endpt' failed.
Aborted



Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-03 Thread Bernhard Schmidt
Control: tags -1 confirmed

> >   == Begin MixMonitor Recording PJSIP/trunk-vitelity-in-
> > asterisk*CLI>
> > Disconnected from Asterisk server
> > Asterisk cleanly ending (0).
> > Executing last minute cleanups
> > 
> > That's all. Nothing in the log either.
> > 
> > After going back to pjproject 2.5.1~dfsg-4 everything works again.
> > 
> > Maybe asterisk just needs to be rebuilt against 2.5.5? I could try this 
> > later perhaps.
> 
> Thanks for the report. Unfortunately as of tonight rebuilding is not an
> option anymore, because it FTBFSes against OpenSSL 1.1.0 (see
> Bug#816042). I'm reassigning this to pjproject to prevent testing
> migration for now.

Confirmed. If you start Asterisk in the foreground you actually get an
assertion

asterisk: ../src/pj/os_core_unix.c:1254: pj_mutex_lock: Assertion
`mutex' failed.
Aborted

Haven't done any further debugging until now, since we can't build
asterisk.

Bernhard


signature.asc
Description: Digital signature


Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-02 Thread Bernhard Schmidt
Control: reassign -1 src:pjproject 2.5.5~dfsg-1
Control: severity -1 grave
Control: affects -1 src:asterisk

On Tue, Nov 01, 2016 at 08:17:16PM -0400, Gedalya wrote:

Hi,

> Package: asterisk
> Version: 1:13.11.2~dfsg-1
> 
> Hi,
> 
> Not sure if this should be filed against asterisk or pjproject.
> 
> I've just tried upgrading the pjproject libraries to version 2.5.5~dfsg-1 
> from sid.
> 
> With this version, asterisk seems to just exit when trying to dial the inner 
> leg of the call. No error shows up, nothing in dmesg either.
> 
> -- Executing [gedalya-all@internal:1] 
> Set("PJSIP/trunk-vitelity-in-", "CDR(peername)=trunk-vitelity-in") in 
> new stack
> -- Executing [gedalya-all@internal:2] 
> MixMonitor("PJSIP/trunk-vitelity-in-", 
> "/var/local/callrec/2016-11/1478045348.0.wav") in new stack
> -- Executing [gedalya-all@internal:3] 
> Dial("PJSIP/trunk-vitelity-in-", 
> "PJSIP/../.././../.,30") in 
> new stack
>   == Begin MixMonitor Recording PJSIP/trunk-vitelity-in-
> asterisk*CLI>
> Disconnected from Asterisk server
> Asterisk cleanly ending (0).
> Executing last minute cleanups
> 
> That's all. Nothing in the log either.
> 
> After going back to pjproject 2.5.1~dfsg-4 everything works again.
> 
> Maybe asterisk just needs to be rebuilt against 2.5.5? I could try this later 
> perhaps.

Thanks for the report. Unfortunately as of tonight rebuilding is not an
option anymore, because it FTBFSes against OpenSSL 1.1.0 (see
Bug#816042). I'm reassigning this to pjproject to prevent testing
migration for now.

Bernhard


signature.asc
Description: Digital signature


Bug#842878: Asterisk crashes with pjproject 2.5.5

2016-11-01 Thread Gedalya
Package: asterisk
Version: 1:13.11.2~dfsg-1

Hi,

Not sure if this should be filed against asterisk or pjproject.

I've just tried upgrading the pjproject libraries to version 2.5.5~dfsg-1 from 
sid.

With this version, asterisk seems to just exit when trying to dial the inner 
leg of the call. No error shows up, nothing in dmesg either.

-- Executing [gedalya-all@internal:1] 
Set("PJSIP/trunk-vitelity-in-", "CDR(peername)=trunk-vitelity-in") in 
new stack
-- Executing [gedalya-all@internal:2] 
MixMonitor("PJSIP/trunk-vitelity-in-", 
"/var/local/callrec/2016-11/1478045348.0.wav") in new stack
-- Executing [gedalya-all@internal:3] 
Dial("PJSIP/trunk-vitelity-in-", 
"PJSIP/../.././../.,30") in new 
stack
  == Begin MixMonitor Recording PJSIP/trunk-vitelity-in-
asterisk*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups

That's all. Nothing in the log either.

After going back to pjproject 2.5.1~dfsg-4 everything works again.

Maybe asterisk just needs to be rebuilt against 2.5.5? I could try this later 
perhaps.

Thanks,

Gedalya