• Re: malloc error on ssh?

    From void * clvrmnky()@clvrmnky.invalid@hotmail.com.invalid to comp.sys.mac.system on Friday, April 07, 2006 10:43:44
    From Newsgroup: comp.sys.mac.system

    benlotto wrote:
    void * clvrmnky() wrote:
    Benjamin Lotto wrote:
    I've never had any problem ssh-ing to other machines from mine, but
    recently I've started getting the following error every time I use ssh:

    ssh(477) malloc: *** Deallocation of a pointer not malloced: 0x1; 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

    Did this happen with the new system update? Is there some easy fix?
    ssh still works fine, but the message is annoying.

    What is the output from "ssh -V"?

    OpenSSH_3.8.1p1, OpenSSL 0.9.7i 14 Oct 2005

    What level of OS X are you running?

    10.4.6

    I should add that this happens on my office machine and the lab
    machines I manage, but not on my iBook (which is also running 10.4.6).

    Same as what I'm running. It looks like the OS is unhappy in some
    manner with how one or more apps are asking for resources. MallocDebug
    is a general purpose memory and stack checking utility available to applications.

    If you are technically minded, and would like to collect some info on
    this, read <http://devworld.apple.com/technotes/tn2004/tn2124.html> Pay specific attention to the "Guarded Memory Allocator" section.

    Otherwise, the usual incantations apply: see if perhaps a softlinked
    library is wrong by running Repair Permissions. A bit of a hail-mary, I
    know. If no other apps or commands also cause this warning, and/or
    Repair Perms does not help, it may be time to look at the specific
    libraries that ssh uses.

    otool -L /usr/bin/ssh will give you a list of dynamic libs and their
    versions. It should look something like this:

    clvrmnky@Swizzle:~ # otool -L /usr/bin/ssh
    /usr/bin/ssh:
    /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7,
    current version 0.9.7)
    /usr/lib/libbsm.dylib (compatibility version 1.0.0, current
    version 1.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current
    version 1.2.2)

    /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 222.0.0)

    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
    current version 88.0.0)
    clvrmnky@Swizzle:~ #
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Lot-o-fun@lotofun61@yahoo.com to comp.sys.mac.system on Friday, April 07, 2006 23:24:10
    From Newsgroup: comp.sys.mac.system

    I ran the gdb command but don't know enough to interpret the output:


    GuardMalloc[ssh-1817]: Tried to free pointer at 0xaa5bddd0 which is not currently a pointer to a malloc buffer.
    GuardMalloc[ssh-1817]: Explicitly trapping into debugger!!!

    Program received signal SIGTRAP, Trace/breakpoint trap.
    0x9a5be88c in GMfree ()


    Repairing Permissions didn't do anything. I looked at the libraries
    that the "otool" command gave me and compared my office computer (which
    gives the error) and my iBook (which doesn't). The /usr/lib libraries
    appear to be identical (same size) as does the /System/Library/Frameworks/Kerberos.framework libraries, but the /System/Library/Frameworks/Security.framework libraries on the two
    computers appear to be different:


    ibook% ls -l
    /System/Library/Frameworks/Security.framework/Versions/A/Security
    -rwxr-xr-x 1 root wheel 3187664 Apr 3 19:35 /System/Library/Frameworks/Security.framework/Versions/A/Security*

    office% ls -l
    /System/Library/Frameworks/Security.framework/Versions/A/Security
    -rwxr-xr-x 1 root wheel 3111108 Apr 7 09:40 /System/Library/Frameworks/Security.framework/Versions/A/Security*


    Could this be where the problem is?

    Thanks for your help!



    In article <AUuZf.17393$43.16348@nnrp.ca.mci.com!nnrp1.uunet.ca>, void
    * clvrmnky <clvrmnky.invalid@hotmail.com.invalid> wrote:

    Otherwise, the usual incantations apply: see if perhaps a softlinked
    library is wrong by running Repair Permissions. A bit of a hail-mary, I know. If no other apps or commands also cause this warning, and/or
    Repair Perms does not help, it may be time to look at the specific
    libraries that ssh uses.

    otool -L /usr/bin/ssh will give you a list of dynamic libs and their versions. It should look something like this:

    clvrmnky@Swizzle:~ # otool -L /usr/bin/ssh
    /usr/bin/ssh:
    /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libbsm.dylib (compatibility version 1.0.0, current
    version 1.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current
    version 1.2.2)

    /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 222.0.0)

    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
    current version 88.0.0)
    clvrmnky@Swizzle:~ #
    --- Synchronet 3.18b-Win32 NewsLink 1.113