OpenSolaris

Printable Version Enter a New Search
Bug ID 6761296
Synopsis syslogd crashes when extensive debugging is enabled
State 10-Fix Delivered (Fix available in build)
Category:Subcategory utility:logger
Keywords rtiq_reviewed
Responsible Engineer Vladimir Marek
Reported Against snv_99
Duplicate Of
Introduced In solaris_10
Commit to Fix snv_104
Fixed In snv_104
Release Fixed solaris_nevada(snv_104)
Related Bugs
Submit Date 20-October-2008
Last Update Date 4-December-2008
Description
$ LOG_FROM_REMOTE=1 SYSLOGD_DEBUG=9 /usr/sbin/syslogd -d
# from antoher shell log something over udp
$ perl -MSys::Syslog -e 'Sys::Syslog::setlogsock ("udp"); Sys::Syslog::syslog( "err", "this is an ERROR message");'

net_poll(19): received empty packet from 129.156.212.92.190.224
new_msg(19): creating msg c6ab8
formatnet(19): called for msg c6ab8
formatnet(19): Message content:
><11>vm156888: this is an ERROR message a
<
net_poll(19): received message from 129.156.212.92.190.224
net_poll(19): enqueued msg c6ab8 on queue 36db8
hostname_lookup(18): dequeued msg c6ab8 from queue 36db8
cvthname(18): looking up hostname for 129.156.212.92.190.224
cvthname(18): No cache found for 129.156.212.92.190.224
cvthname(18): Found 2 hostnames
Segmentation Fault (core dumped)


When recompiling with debug info, crash happened at:

$ /usr/dist/share/sunstudio_sparc/SUNWspro/bin/dbx syslogd core
Reading syslogd
core file header read successfully
Reading ld.so.1
Reading libnsl.so.1
Reading libdoor.so.1
Reading libscf.so.1
Reading libc.so.1
Reading libuutil.so.1
Reading libgen.so.1
Reading libc_psr.so.1
Reading straddr.so.2
t@18 (l@18) terminated by signal SEGV (no mapping at the fault address)
Current function is hnc_register
 5483                   mythreadno, (void *)h, (void *)hp, hp->h->hl_hosts[0] );
(dbx) where
current thread: t@18
=>[1] hnc_register(nbp = 0x3e814, ncp = 0x41678, h = 0x41750, hindex = 1286), line 5483 in "syslogd.c"
  [2] cvthname(nbp = 0x3e814, ncp = 0x41678, failsafe_addr = 0xfe1d3e8e "129.156.212.92.190.228"), line 2283 in "syslogd.c"
  [3] hostname_lookup(ap = (nil)), line 4906 in "syslogd.c"
(dbx) list
 5483                   mythreadno, (void *)h, (void *)hp, hp->h->hl_hosts[0] );
 5484           (void) pthread_mutex_unlock(&hnc_mutex);
 5485   }
 5486
 5487   static void
 5488   hnc_unreg(struct hostname_cache **hpp)
 5489   {
 5490           struct hostname_cache *hp = *hpp;
 5491           pthread_t mythreadno;
 5492
(dbx) print hp
hp = (nil)

*** (#1 of 1): [ UNSAVED ]  xxxxx@xxxxx.com
Work Around
Configure machine not to listen on udp and use instead syslog(3c) native call.
Comments
N/A