monit-dev
[Top][All Lists]
Advanced

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

Re: Platform quirks - darwin


From: Rick Robino
Subject: Re: Platform quirks - darwin
Date: Thu, 4 Sep 2003 04:07:34 -0700
User-agent: Mutt/1.4i

> On Thu, Sep 04, 2003 at 01:53:47AM +0200, Jan-Henrik Haukeland wrote:
> 
> Please download efence from: ftp://ftp.perens.com/pub/ElectricFence/
> and put the following in your $HOME/.gdbinit

Ok... I was able to get a staticly linked library out of it after
some coaxing but I can't get electricfence output as one of those
crazy apple style shared libraries.  Also, eftest failed on the
segfault test and I don't know how to fix that.  So I don't know
if this is reliable at all but gdb doesn't complain about efence
as an archive library.  Here is the output from within (Carbon)
Emacs, with the efence settings as prescribed:

Starting program: /Users/rrobino/Developer/Monit/monit status
[Switching to process 1976 thread 0xb03]
Reading symbols for shared libraries . done
Reading symbols for shared libraries .... done
The monit daemon uptime: 20m 
*** malloc[1976]: Deallocation of a pointer not malloced: 0x15ea98;
This could be a double free(), or free() called with the middle of
an allocated block; Try setting environment variable MallocHelp to
see tools to help debug
Process 'apache' is running with pid [439]
        Uptime: 6h 26m 

        Program exited normally.
        (gdb) q
Debugger finished

Not much different.  I stepped through as I did in the previous
message with the same breakpoint on fprintf, and it also yielded
the same results as the first time.

The only thing I can think of then, if it isn't a socket thing,
that status() does a free() on uptime before calling remote_status()
which can call local_status() which also does a free on uptime. But
playing with these hasn't born it out for me, ymmv.

OR... if you go up the stack before this malloc error, the truly
last function before it is that gethostname()::recycle_host() one
from apple with the socket functions having already been passed by.
That would explain why no other platform exhibits this problem, the
function is unique to darwin AFAIK.  The code for recycle_hosts()
is here:

http://www.opendarwin.org/cgi-bin/cvsweb.cgi/src/Libinfo/lookup.subproj/lu_host.c?rev=1.1.1.4&content-type=text/x-cvsweb-markup

<shrug>  As someone pointed out that most of monit's deployment,
practically, will be for linux (and solaris!) so maybe this here
qualifies as just a quirk of darwin, in terms of releasing.  I doubt
there are thousands of macs depending on this but I could be wrong.

It does *work* after all... just gives a little message and hangs
for a bit on cli status checks (not the web); and the ssl doesn't
work.  It's still quite usable.   A kludge is available for whom the
error bothers, what more can one ask?  :-)

--Rick





reply via email to

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