Bug 10420 - no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
Status: RESOLVED DUPLICATE of bug 8449
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other
4.1.4
All All
: P5 major
: ---
Assigned To: Andrew Bartlett
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-05 19:35 UTC by Thomas Bork
Modified: 2014-07-02 11:14 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bork 2014-02-05 19:35:01 UTC
If adding a new user to the system and pam_smbpass kicks in (to change a system and potentially a samba password), I see this:

Changing password for y.
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

I see this messages in syslog:

Jan 12 19:21:23 samba passwd[25028]: pam_smbpass(passwd:chauthtok): Failed to find entry for user y.
Jan 12 19:21:28 samba passwd[25028]: pam_smbpass(passwd:chauthtok): Failed to find entry for user y.

Line 4864 of /source3/param/loadparm.c:
                 n2 = talloc_sub_basic(talloc_tos(), get_current_username(),

Line for pam_smbpass.so in /etc/pam.d/common-password:
password        optional        pam_smbpass.so  nullok use_authtok try_first_pass


samba # ldd /lib/security/pam_smbpass.so
        linux-gate.so.1 =>  (0xb7702000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb76dd000)
        libsamba-util.so.0 => /usr/lib/samba/libsamba-util.so.0 (0xb76b1000)
        libwbclient.so.0 => /usr/lib/samba/libwbclient.so.0 (0xb76a6000)
        libsamba-credentials.so.0 => /usr/lib/samba/libsamba-credentials.so.0 (0xb7697000)
        libndr-samba.so => /usr/lib/samba/libndr-samba.so (0xb75d3000)
        libcliauth.so => /usr/lib/samba/libcliauth.so (0xb75c2000)
        liberrors.so => /usr/lib/samba/liberrors.so (0xb7564000)
        libsmbconf.so.0 => /usr/lib/samba/libsmbconf.so.0 (0xb74fe000)
        libtalloc.so.2 => /usr/lib/samba/libtalloc.so.2 (0xb74f2000)
        libsamba3-util.so => /usr/lib/samba/libsamba3-util.so (0xb74e8000)
        libndr.so.0 => /usr/lib/samba/libndr.so.0 (0xb74d6000)
        libpdb.so.0 => /usr/lib/samba/libpdb.so.0 (0xb749e000)
        libsecrets3.so => /usr/lib/samba/libsecrets3.so (0xb7495000)
        libgensec.so.0 => /usr/lib/samba/libgensec.so.0 (0xb7475000)
        libpam.so.0 => /lib/libpam.so.0 (0xb7468000)
        libc.so.6 => /lib/libc.so.6 (0xb732a000)
        /lib/ld-linux.so.2 (0xb7703000)
        libtevent.so.0 => /usr/lib/samba/libtevent.so.0 (0xb731f000)
        libreplace.so => /usr/lib/samba/libreplace.so (0xb731d000)
        librt.so.1 => /lib/librt.so.1 (0xb7315000)
        libwinbind-client.so => /usr/lib/samba/libwinbind-client.so (0xb7311000)
        libldb.so.1 => /usr/lib/samba/libldb.so.1 (0xb72e9000)
        libsamdb-common.so => /usr/lib/samba/libsamdb-common.so (0xb72d0000)
        libgssapi-samba4.so.2 => /usr/lib/samba/libgssapi-samba4.so.2 (0xb72a4000)
        libkrb5samba.so => /usr/lib/samba/libkrb5samba.so (0xb729b000)
        libtdb-wrap.so => /usr/lib/samba/libtdb-wrap.so (0xb7298000)
        libauthkrb5.so => /usr/lib/samba/libauthkrb5.so (0xb728b000)
        libsamba-hostconfig.so.0 => /usr/lib/samba/libsamba-hostconfig.so.0 (0xb725e000)
        libldbsamba.so => /usr/lib/samba/libldbsamba.so (0xb723a000)
        libdbwrap.so => /usr/lib/samba/libdbwrap.so (0xb722e000)
        libutil_tdb.so => /usr/lib/samba/libutil_tdb.so (0xb722a000)
        libsamba-security.so => /usr/lib/samba/libsamba-security.so (0xb7212000)
        libkrb5-samba4.so.26 => /usr/lib/samba/libkrb5-samba4.so.26 (0xb71b4000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xb71b1000)
        libndr-standard.so.0 => /usr/lib/samba/libndr-standard.so.0 (0xb6f0e000)
        libasn1util.so => /usr/lib/samba/libasn1util.so (0xb6f08000)
        libndr-nbt.so.0 => /usr/lib/samba/libndr-nbt.so.0 (0xb6ef5000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb6ee0000)
        libsmbregistry.so => /usr/lib/samba/libsmbregistry.so (0xb6ec7000)
        libinterfaces.so => /usr/lib/samba/libinterfaces.so (0xb6ec5000)
        libtevent-util.so.0 => /usr/lib/samba/libtevent-util.so.0 (0xb6ec1000)
        libccan.so => /usr/lib/samba/libccan.so (0xb6ebd000)
        libCHARSET3.so => /usr/lib/samba/libCHARSET3.so (0xb6eba000)
        libcli_smb_common.so => /usr/lib/samba/libcli_smb_common.so (0xb6e9c000)
        libutil_reg.so => /usr/lib/samba/libutil_reg.so (0xb6e9a000)
        libsamba-sockets.so => /usr/lib/samba/libsamba-sockets.so (0xb6e85000)
        libsmbd_shim.so => /usr/lib/samba/libsmbd_shim.so (0xb6e83000)
        libutil_setid.so => /usr/lib/samba/libutil_setid.so (0xb6e81000)
        libtdb.so.1 => /usr/lib/samba/libtdb.so.1 (0xb6e71000)
        libsmb_transport.so => /usr/lib/samba/libsmb_transport.so (0xb6e6d000)
        libserver-role.so => /usr/lib/samba/libserver-role.so (0xb6e6a000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb6e54000)
        libsamba-modules.so => /usr/lib/samba/libsamba-modules.so (0xb6e51000)
        libsamdb.so.0 => /usr/lib/samba/libsamdb.so.0 (0xb6e3d000)
        libdl.so.2 => /lib/libdl.so.2 (0xb6e38000)
        libflag_mapping.so => /usr/lib/samba/libflag_mapping.so (0xb6e36000)
        libcli-ldap-common.so => /usr/lib/samba/libcli-ldap-common.so (0xb6e2f000)
        libroken-samba4.so.19 => /usr/lib/samba/libroken-samba4.so.19 (0xb6e24000)
        libasn1-samba4.so.8 => /usr/lib/samba/libasn1-samba4.so.8 (0xb6dbe000)
        libhcrypto-samba4.so.5 => /usr/lib/samba/libhcrypto-samba4.so.5 (0xb6d8e000)
        libheimbase-samba4.so.1 => /usr/lib/samba/libheimbase-samba4.so.1 (0xb6d8b000)
        libndr-krb5pac.so.0 => /usr/lib/samba/libndr-krb5pac.so.0 (0xb6d83000)
        libauth_sam_reply.so => /usr/lib/samba/libauth_sam_reply.so (0xb6d80000)
        libutil_ntdb.so => /usr/lib/samba/libutil_ntdb.so (0xb6d7c000)
        libntdb.so.0 => /usr/lib/samba/libntdb.so.0 (0xb6d68000)
        libhx509-samba4.so.5 => /usr/lib/samba/libhx509-samba4.so.5 (0xb6d2f000)
        libwind-samba4.so.0 => /usr/lib/samba/libwind-samba4.so.0 (0xb6d07000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb6cf2000)


How can I avoid leaking memory? 


der tom
Comment 1 Thomas Bork 2014-03-15 18:48:18 UTC
Also occuring with 4.1.5 and 4.1.6.
Comment 2 Thomas Bork 2014-03-30 22:30:13 UTC
See also http://ubuntuforums.org/showthread.php?t=2214042

der tom
Comment 3 Andrew Bartlett 2014-07-02 11:14:36 UTC
I've uploaded the 4.1 backport fix to 8449 so marking this as a dup.  (Already fixed in master)

*** This bug has been marked as a duplicate of bug 8449 ***