monit-general
[Top][All Lists]
Advanced

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

Re: strange segmentation fault


From: Martin Pala
Subject: Re: strange segmentation fault
Date: Fri, 22 Nov 2002 21:23:43 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1

I don't see any problem in the code "at first sight".

I'm using monit for monitoring sshd too and it works without problems - on Redhat Linux 7.2 (i386) and Solaris 8 (sparc). I'm not able to replicate this problem - please could you send your monitrc?

Thanks,
Martin

Igor Homyakov wrote:

monit crached with SIGSEGV when i try to check sshd
This my debuging log:
$ gdb ./monit (gdb) run -c /etc/monitrc validate
.... skipped ....

(gdb) print p->name
$3 = 0x806fcb8 "sshd"
(gdb) print desc[event]
$4 = "restarted", '\0' <repeats 246 times>
(gdb) s
substitute (m=0x7ffff5cc, name=0x806fcb8 "sshd", event=0x80684a0
"restarted") at alert.c:245
245       char *now= get_ctime();
(gdb) n
246       char *host= get_localhostname();
(gdb) n
248       replace(&(*m)->from, "$HOST", host);
(gdb) n
249       replace(&(*m)->subject, "$DATE", now);
(gdb) n
250       replace(&(*m)->message, "$DATE", now);
(gdb) n
251       replace(&(*m)->subject, "$HOST", host);
(gdb) n
252       replace(&(*m)->message, "$HOST", host);
(gdb) n
253       replace(&(*m)->subject, "$PROGRAM", name);
(gdb) print (*m)->subject
$5 = 0x8071570 "[monit] -- $PROGRAM $EVENT on kadath.pm.ramax.spb.ru at Fri
Nov 22 17:31:48 2002"
(gdb) print name
$6 = 0x806fcb8 "sshd"
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x2ac721ec in free () from /lib/i686/libc.so.6
(gdb) backtrace
#0  0x2ac721ec in free () from /lib/i686/libc.so.6
#1 0x0804b17d in replace (src=0x806b3b0, old=0x805a9c5 "$PROGRAM", new=0x806fcb8 "sshd") at alert.c:295
#2  0x0804b050 in substitute (m=0x7ffff5cc, name=0x806fcb8 "sshd",
event=0x80684a0 "restarted") at alert.c:253
#3 0x0804af6d in smtp_alert (p=0x80700f0, event=1, optmsg=0x8063d69 "%s", ap=0x7ffff738 "P\021\a\bP\021\a\b??\005\b?") at alert.c:216
#4  0x0804adc8 in smtp_alert_restart (p=0x80700f0, m=0x8063d69 "%s") at
alert.c:122
#5  0x080528dd in do_start (p=0x80700f0, m=0x0) at validate.c:298
#6  0x080527da in do_validate (p=0x80700f0) at validate.c:137
#7  0x08052591 in validate () at validate.c:98
#8  0x0804d579 in main (argc=4, argv=0x7ffffa04) at monitor.c:94
#9  0x2ac1a182 in __libc_start_main () from /lib/i686/libc.so.6


--
Igor Homyakov
<homyakov AT ramax.spb.ru>


--
To unsubscribe:
http://mail.nongnu.org/mailman/listinfo/monit-general







reply via email to

[Prev in Thread] Current Thread [Next in Thread]