Re: DNS related crash on start and reload on Debian 8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NOTE: You receive this message on the OLD GnuGk mailinglist
that will go away soon. Please re-subscribe for the NEW mailinglist at
https://lists.gnugk.org/cgi-bin/mailman/listinfo/gnugk-users

--

Hi Esa,

thanks for providing these stack traces.

This is an issue in PTLib where a fix for a memory leak seems to have
unwated side effects. I have reverted the patch and now the leak is
back, but its not crashing anymore.

Regards,
Jan

-- 
Jan Willamowius, Founder of the GNU Gatekeeper Project
EMail  : jan@xxxxxxxxxxxxxx
Website: https://www.gnugk.org
Support: https://www.willamowius.com/gnugk-support.html

Relaxed Communications GmbH
Frahmredder 91
22393 Hamburg
Geschäftsführer: Jan Willamowius
HRB 125261 (Amtsgericht Hamburg)
USt-IdNr: DE286003584


Esa Nyrhinen wrote:
> Hi,
> 
> Running GnuGk 4.8 on a Debian 8.10.
> Compiled as "debugnoshared" along with its dependencies but the issue is
> repeatable with GnuGk and its dependencies compiled as "optnoshared" too
> and regardless of if GnuGk is run as root or a limited user.
> 
> Configured as a H.460.18/19 client gatekeeper so it refers to its parent
> via DNS & SRV records. Crashes either on start or reload depending on
> TraceLevel=.
> 
> The IPs and DNS names have been replaced in the output below.
> 
> With TraceLevel=3 crashes on config reload via status port.
> 
> The last line of the log is:
> 2018/03/21 20:18:57.626 2             RasSrv.cxx(947)   GK      Home =
> 1.2.3.4
> 
> The core dump says:
> Program terminated with signal SIGABRT, Aborted.
> #0  0x00007f978e85f067 in __GI_raise (sig=sig@entry=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> 56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb) bt
> #0  0x00007f978e85f067 in __GI_raise (sig=sig@entry=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1  0x00007f978e860523 in __GI_abort () at abort.c:118
> #2  0x00007f978e89d1b4 in __libc_message (do_abort=do_abort@entry=1,
> fmt=fmt@entry=0x7f978e992210 "*** Error in `%s': %s: 0x%s ***\n") at
> ../sysdeps/posix/libc_fatal.c:175
> #3  0x00007f978e8a298e in malloc_printerr (action=1, str=0x7f978e98e326
> "free(): invalid pointer", ptr=<optimized out>) at malloc.c:4996
> #4  0x00007f978e8a3696 in _int_free (av=<optimized out>, p=<optimized
> out>, have_lock=0) at malloc.c:3840  
> #5  0x0000000000930db8 in DnsRecordListFree (rec=0x1bd8c40) at
> ptclib/pdns.cxx:315
> #6  0x0000000000932609 in PDNS::Cached_DnsQuery (name=0x1b9c490
> "_h323rs._udp.example.com", type=33, options=0, queryResults=0x7f978c32c200)
>     at ptclib/pdns.cxx:711
> #7  0x000000000088305f in PDNS::Lookup<33u, PDNS::SRVRecordList,
> PDNS::SRVRecord> (name=..., recordList=...)  
>     at /home/asdf/gnugk/build/ptlib/include/ptclib/pdns.h:226
> #8  0x0000000000882a59 in PDNS::GetRecords (service=...,
> serviceList=...) at /home/asdf/gnugk/build/ptlib/include/ptclib/pdns.h:287
> #9  0x0000000000931e9f in PDNS::LookupSRV (srvLookupStr=...,
> defaultPort=1720, addrList=std::vector of length 0, capacity 0) at
> ptclib/pdns.cxx:578
> #10 0x0000000000931e3a in PDNS::LookupSRV (domain=..., service=...,
> defaultPort=1720, addrList=std::vector of length 0, capacity 0) at
> ptclib/pdns.cxx:567
> #11 0x0000000000931926 in PDNS::LookupSRV (url=..., service=...,
> returnList=...) at ptclib/pdns.cxx:529
> #12 0x00000000004d9a91 in GkClient::OnReload (this=0x1bd68c0) at
> GkClient.cxx:1669
> #13 0x0000000000506dc1 in RasServer::LoadConfig (this=0x1bcce50) at
> RasSrv.cxx:1044
> #14 0x00000000005978c0 in ReloadHandler () at gk.cxx:1095
> #15 0x0000000000462629 in StatusClient::ExecCommand
> (this=0x7f976c004920, cmd=...) at GkStatus.cxx:1846
> #16 0x0000000000469837 in SimpleClassJobA<StatusClient, PString>::Run
> (this=0x7f9764006780) at job.h:236
> #17 0x000000000040e5a3 in Worker::Main (this=0x7f976c006990) at job.cxx:182
> #18 0x000000000099892a in PThread::PX_ThreadStart (arg=0x7f976c006990)
> at ptlib/unix/tlibthrd.cxx:493
> #19 0x00007f978fecd064 in start_thread (arg=0x7f978c32d700) at
> pthread_create.c:309
> #20 0x00007f978e91262d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
> 
> With TraceLevel=6 the gatekeeper crashes on start.
> 
> The lines of the log are:
> 2018/03/21 20:44:31.680 4               pdns.cxx(566)   DNS     SRV
> Lookup "_h323rs._udp.example.com"
> 2018/03/21 20:44:31.680 5               pdns.cxx(727)   DNS     SRV
> physical lookup "_h323rs._udp.example.com 33      0"
> 2018/03/21 20:44:31.689 6               pdns.cxx(741)   DNS     Query
> success: 0x2b94120
> 2018/03/21 20:44:31.689 6               pdns.cxx(744)   DNS     Query:
> name="", type=0, len=0
> 2018/03/21 20:44:31.689 6               pdns.cxx(744)   DNS     Query:
> name="^Z<F8>@", type=157, len=0
> 2018/03/21 20:44:31.689 6               pdns.cxx(744)   DNS     Query:
> name="H<89>}<F8>H<8B>E<F8>H<C7>", type=4332, len=35144
> 
> Looking at the pdns.cxx sources it seems that the contents of the pName
> field are garbled for some reason.
> 
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x00000000009328ff in PDNS::Cached_DnsQuery (name=0x2b57520
> "_h323rs._udp.example.com", type=33, options=0, queryResults=0x7ffe3b0fcf60)
>     at ptclib/pdns.cxx:743
> #1  0x000000000088305f in PDNS::Lookup<33u, PDNS::SRVRecordList,
> PDNS::SRVRecord> (name=..., recordList=...)  
>     at /home/asdf/gnugk/build/ptlib/include/ptclib/pdns.h:226
> #2  0x0000000000882a59 in PDNS::GetRecords (service=...,
> serviceList=...) at /home/asdf/gnugk/build/ptlib/include/ptclib/pdns.h:287
> #3  0x0000000000931e9f in PDNS::LookupSRV (srvLookupStr=...,
> defaultPort=1720, addrList=std::vector of length 0, capacity 0) at
> ptclib/pdns.cxx:578
> #4  0x0000000000931e3a in PDNS::LookupSRV (domain=..., service=...,
> defaultPort=1720, addrList=std::vector of length 0, capacity 0) at
> ptclib/pdns.cxx:567
> #5  0x0000000000931926 in PDNS::LookupSRV (url=..., service=...,
> returnList=...) at ptclib/pdns.cxx:529
> #6  0x00000000004d9a91 in GkClient::OnReload (this=0x2b91890) at
> GkClient.cxx:1669
> #7  0x0000000000506dc1 in RasServer::LoadConfig (this=0x2b88740) at
> RasSrv.cxx:1044
> #8  0x00000000005088a9 in RasServer::Run (this=0x2b88740) at RasSrv.cxx:1439
> #9  0x000000000059a50c in Gatekeeper::Main (this=0x2b61e90) at gk.cxx:1836
> #10 0x00000000009be043 in PProcess::InternalMain (this=0x2b61e90) at
> ptlib/common/osutils.cxx:1540
> #11 0x0000000000596913 in main (argc=3, argv=0x7ffe3b0fdfe8,
> envp=0x7ffe3b0fe008) at gk.cxx:53
> 
> Regards,
> Esa


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________________

Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: https://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: https://www.gnugk.org/




[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux