[Samba] [PATCH] Workaround very slow nss_winbind, fix crash on the AD DC (particularly for backups)

Philippe.Simonet at swisscom.com Philippe.Simonet at swisscom.com
Mon Jun 24 07:05:00 MDT 2013


Hi Andrew,

you can find here output of valgrind .

thanks and regards

Philippe


root at gwnois03.test.ch ~/bisect/samba-master# valgrind samba -i -M single
==8110== Memcheck, a memory error detector
==8110== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==8110== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==8110== Command: samba -i -M single
==8110== 
samba version 4.0.6 started.
Copyright Andrew Tridgell and the Samba Team 1992-2012
samba: using 'single' process model
==8110== Invalid read of size 8
==8110==    at 0xA1DDC5C: krb5_cc_store_cred (cache.c:684)
==8110==    by 0xA1F261F: krb5_get_credentials_with_flags (get_cred.c:1207)
==8110==    by 0xA1F266A: krb5_get_credentials (get_cred.c:1220)
==8110==    by 0x953CDB7: gsskrb5_get_creds (init_sec_context.c:246)
==8110==    by 0x953D366: init_auth (init_sec_context.c:455)
==8110==    by 0x953E168: _gsskrb5_init_sec_context (init_sec_context.c:942)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==  Address 0x24924930 is 0 bytes inside a block of size 24 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1DDC3E: krb5_cc_close (cache.c:666)
==8110==    by 0x954CD8E: _gsskrb5_release_cred (release_cred.c:65)
==8110==    by 0x9555049: gss_release_cred (gss_release_cred.c:65)
==8110==    by 0x548DAC0: free_gssapi_creds (credentials_krb5.c:443)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 8
==8110==    at 0xA203B3D: mcc_store_cred (mcache.c:239)
==8110==    by 0xA1DDC73: krb5_cc_store_cred (cache.c:684)
==8110==    by 0xA1F261F: krb5_get_credentials_with_flags (get_cred.c:1207)
==8110==    by 0xA1F266A: krb5_get_credentials (get_cred.c:1220)
==8110==    by 0x953CDB7: gsskrb5_get_creds (init_sec_context.c:246)
==8110==    by 0x953D366: init_auth (init_sec_context.c:455)
==8110==    by 0x953E168: _gsskrb5_init_sec_context (init_sec_context.c:942)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==  Address 0x24924940 is 16 bytes inside a block of size 24 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1DDC3E: krb5_cc_close (cache.c:666)
==8110==    by 0x954CD8E: _gsskrb5_release_cred (release_cred.c:65)
==8110==    by 0x9555049: gss_release_cred (gss_release_cred.c:65)
==8110==    by 0x548DAC0: free_gssapi_creds (credentials_krb5.c:443)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 4
==8110==    at 0xA203B49: mcc_store_cred (mcache.c:243)
==8110==    by 0xA1DDC73: krb5_cc_store_cred (cache.c:684)
==8110==    by 0xA1F261F: krb5_get_credentials_with_flags (get_cred.c:1207)
==8110==    by 0xA1F266A: krb5_get_credentials (get_cred.c:1220)
==8110==    by 0x953CDB7: gsskrb5_get_creds (init_sec_context.c:246)
==8110==    by 0x953D366: init_auth (init_sec_context.c:455)
==8110==    by 0x953E168: _gsskrb5_init_sec_context (init_sec_context.c:942)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==  Address 0x2199ed0c is 12 bytes inside a block of size 56 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1EC05D: krb5_data_free (data.c:66)
==8110==    by 0xA2039E9: mcc_close (mcache.c:189)
==8110==    by 0xA1DDC2F: krb5_cc_close (cache.c:665)
==8110==    by 0xA1DDBFF: krb5_cc_destroy (cache.c:647)
==8110==    by 0x548CF06: free_mccache (credentials_krb5.c:127)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110== 
==8110== Invalid read of size 8
==8110==    at 0xA1DDD77: krb5_cc_get_principal (cache.c:748)
==8110==    by 0x953D002: do_delegation (init_sec_context.c:328)
==8110==    by 0x953D692: init_auth_restart (init_sec_context.c:571)
==8110==    by 0x953E1C1: _gsskrb5_init_sec_context (init_sec_context.c:959)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==  Address 0x24924930 is 0 bytes inside a block of size 24 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1DDC3E: krb5_cc_close (cache.c:666)
==8110==    by 0x954CD8E: _gsskrb5_release_cred (release_cred.c:65)
==8110==    by 0x9555049: gss_release_cred (gss_release_cred.c:65)
==8110==    by 0x548DAC0: free_gssapi_creds (credentials_krb5.c:443)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 8
==8110==    at 0xA203C4F: mcc_get_principal (mcache.c:270)
==8110==    by 0xA1DDD8E: krb5_cc_get_principal (cache.c:748)
==8110==    by 0x953D002: do_delegation (init_sec_context.c:328)
==8110==    by 0x953D692: init_auth_restart (init_sec_context.c:571)
==8110==    by 0x953E1C1: _gsskrb5_init_sec_context (init_sec_context.c:959)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==  Address 0x24924940 is 16 bytes inside a block of size 24 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1DDC3E: krb5_cc_close (cache.c:666)
==8110==    by 0x954CD8E: _gsskrb5_release_cred (release_cred.c:65)
==8110==    by 0x9555049: gss_release_cred (gss_release_cred.c:65)
==8110==    by 0x548DAC0: free_gssapi_creds (credentials_krb5.c:443)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 4
==8110==    at 0xA203C5B: mcc_get_principal (mcache.c:272)
==8110==    by 0xA1DDD8E: krb5_cc_get_principal (cache.c:748)
==8110==    by 0x953D002: do_delegation (init_sec_context.c:328)
==8110==    by 0x953D692: init_auth_restart (init_sec_context.c:571)
==8110==    by 0x953E1C1: _gsskrb5_init_sec_context (init_sec_context.c:959)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==  Address 0x2199ed0c is 12 bytes inside a block of size 56 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1EC05D: krb5_data_free (data.c:66)
==8110==    by 0xA2039E9: mcc_close (mcache.c:189)
==8110==    by 0xA1DDC2F: krb5_cc_close (cache.c:665)
==8110==    by 0xA1DDBFF: krb5_cc_destroy (cache.c:647)
==8110==    by 0x548CF06: free_mccache (credentials_krb5.c:127)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110== 
==8110== Invalid read of size 4
==8110==    at 0x953D764: init_auth_restart (init_sec_context.c:606)
==8110==    by 0x953E1C1: _gsskrb5_init_sec_context (init_sec_context.c:959)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==    by 0x7C6BCC3: dcerpc_pipe_auth_send (dcerpc_util.c:621)
==8110==    by 0x7C7229E: dcerpc_secondary_auth_connection_bind (dcerpc_secondary.c:299)
==8110==  Address 0x2208cf98 is 8 bytes inside a block of size 64 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x954CDE4: _gsskrb5_release_cred (release_cred.c:73)
==8110==    by 0x9555049: gss_release_cred (gss_release_cred.c:65)
==8110==    by 0x548DAC0: free_gssapi_creds (credentials_krb5.c:443)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110== 
==8110== Invalid write of size 4
==8110==    at 0x953D797: init_auth_restart (init_sec_context.c:613)
==8110==    by 0x953E1C1: _gsskrb5_init_sec_context (init_sec_context.c:959)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==    by 0x7C6BCC3: dcerpc_pipe_auth_send (dcerpc_util.c:621)
==8110==    by 0x7C7229E: dcerpc_secondary_auth_connection_bind (dcerpc_secondary.c:299)
==8110==  Address 0x22f9880c is 108 bytes inside a block of size 224 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x679C453: _talloc_free_internal (talloc.c:878)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 8
==8110==    at 0xA1DDD77: krb5_cc_get_principal (cache.c:748)
==8110==    by 0xA1DE7B1: build_conf_principals (cache.c:1226)
==8110==    by 0xA1DEAC2: krb5_cc_get_config (cache.c:1347)
==8110==    by 0x953D84A: init_auth_restart (init_sec_context.c:628)
==8110==    by 0x953E1C1: _gsskrb5_init_sec_context (init_sec_context.c:959)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==  Address 0x24924930 is 0 bytes inside a block of size 24 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1DDC3E: krb5_cc_close (cache.c:666)
==8110==    by 0x954CD8E: _gsskrb5_release_cred (release_cred.c:65)
==8110==    by 0x9555049: gss_release_cred (gss_release_cred.c:65)
==8110==    by 0x548DAC0: free_gssapi_creds (credentials_krb5.c:443)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 8
==8110==    at 0xA203C4F: mcc_get_principal (mcache.c:270)
==8110==    by 0xA1DDD8E: krb5_cc_get_principal (cache.c:748)
==8110==    by 0xA1DE7B1: build_conf_principals (cache.c:1226)
==8110==    by 0xA1DEAC2: krb5_cc_get_config (cache.c:1347)
==8110==    by 0x953D84A: init_auth_restart (init_sec_context.c:628)
==8110==    by 0x953E1C1: _gsskrb5_init_sec_context (init_sec_context.c:959)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==  Address 0x24924940 is 16 bytes inside a block of size 24 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1DDC3E: krb5_cc_close (cache.c:666)
==8110==    by 0x954CD8E: _gsskrb5_release_cred (release_cred.c:65)
==8110==    by 0x9555049: gss_release_cred (gss_release_cred.c:65)
==8110==    by 0x548DAC0: free_gssapi_creds (credentials_krb5.c:443)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 4
==8110==    at 0xA203C5B: mcc_get_principal (mcache.c:272)
==8110==    by 0xA1DDD8E: krb5_cc_get_principal (cache.c:748)
==8110==    by 0xA1DE7B1: build_conf_principals (cache.c:1226)
==8110==    by 0xA1DEAC2: krb5_cc_get_config (cache.c:1347)
==8110==    by 0x953D84A: init_auth_restart (init_sec_context.c:628)
==8110==    by 0x953E1C1: _gsskrb5_init_sec_context (init_sec_context.c:959)
==8110==    by 0x9556619: gss_init_sec_context (gss_init_sec_context.c:187)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==  Address 0x2199ed0c is 12 bytes inside a block of size 56 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0xA1EC05D: krb5_data_free (data.c:66)
==8110==    by 0xA2039E9: mcc_close (mcache.c:189)
==8110==    by 0xA1DDC2F: krb5_cc_close (cache.c:665)
==8110==    by 0xA1DDBFF: krb5_cc_destroy (cache.c:647)
==8110==    by 0x548CF06: free_mccache (credentials_krb5.c:127)
==8110==    by 0x679C161: _talloc_free_internal (talloc.c:831)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110== 
==8110== Invalid write of size 8
==8110==    at 0x955667A: gss_init_sec_context (gss_init_sec_context.c:208)
==8110==    by 0x61370BD: gensec_gssapi_update (gensec_gssapi.c:464)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==    by 0x7C6BCC3: dcerpc_pipe_auth_send (dcerpc_util.c:621)
==8110==    by 0x7C7229E: dcerpc_secondary_auth_connection_bind (dcerpc_secondary.c:299)
==8110==    by 0xB5C7950: composite_done (composite.c:143)
==8110==    by 0x7C71FF7: continue_pipe_open (dcerpc_secondary.c:191)
==8110==  Address 0x22f987f0 is 80 bytes inside a block of size 224 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x679C453: _talloc_free_internal (talloc.c:878)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid write of size 8
==8110==    at 0x61370D2: gensec_gssapi_update (gensec_gssapi.c:478)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==    by 0x7C6BCC3: dcerpc_pipe_auth_send (dcerpc_util.c:621)
==8110==    by 0x7C7229E: dcerpc_secondary_auth_connection_bind (dcerpc_secondary.c:299)
==8110==    by 0xB5C7950: composite_done (composite.c:143)
==8110==    by 0x7C71FF7: continue_pipe_open (dcerpc_secondary.c:191)
==8110==    by 0x7C71E80: continue_open_smb (dcerpc_secondary.c:140)
==8110==  Address 0x22f98828 is 136 bytes inside a block of size 224 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x679C453: _talloc_free_internal (talloc.c:878)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 4
==8110==    at 0x61371F1: gensec_gssapi_update (gensec_gssapi.c:516)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==    by 0x7C6BCC3: dcerpc_pipe_auth_send (dcerpc_util.c:621)
==8110==    by 0x7C7229E: dcerpc_secondary_auth_connection_bind (dcerpc_secondary.c:299)
==8110==    by 0xB5C7950: composite_done (composite.c:143)
==8110==    by 0x7C71FF7: continue_pipe_open (dcerpc_secondary.c:191)
==8110==    by 0x7C71E80: continue_open_smb (dcerpc_secondary.c:140)
==8110==  Address 0x22f98868 is 200 bytes inside a block of size 224 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x679C453: _talloc_free_internal (talloc.c:878)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid write of size 4
==8110==    at 0x61371FB: gensec_gssapi_update (gensec_gssapi.c:516)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==    by 0x7C6BCC3: dcerpc_pipe_auth_send (dcerpc_util.c:621)
==8110==    by 0x7C7229E: dcerpc_secondary_auth_connection_bind (dcerpc_secondary.c:299)
==8110==    by 0xB5C7950: composite_done (composite.c:143)
==8110==    by 0x7C71FF7: continue_pipe_open (dcerpc_secondary.c:191)
==8110==    by 0x7C71E80: continue_open_smb (dcerpc_secondary.c:140)
==8110==  Address 0x22f98868 is 200 bytes inside a block of size 224 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x679C453: _talloc_free_internal (talloc.c:878)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 4
==8110==    at 0x679B5E3: talloc_chunk_from_ptr (talloc.c:349)
==8110==    by 0x679B921: __talloc (talloc.c:556)
==8110==    by 0x679BD03: _talloc_named_const (talloc.c:676)
==8110==    by 0x679E423: _talloc_memdup (talloc.c:1910)
==8110==    by 0x635BFD7: data_blob_talloc_named (data_blob.c:52)
==8110==    by 0x61374F5: gensec_gssapi_update (gensec_gssapi.c:550)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==  Address 0x22b155c0 is 64 bytes inside a block of size 184 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x679C453: _talloc_free_internal (talloc.c:878)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 4
==8110==    at 0x679B5FD: talloc_chunk_from_ptr (talloc.c:355)
==8110==    by 0x679B921: __talloc (talloc.c:556)
==8110==    by 0x679BD03: _talloc_named_const (talloc.c:676)
==8110==    by 0x679E423: _talloc_memdup (talloc.c:1910)
==8110==    by 0x635BFD7: data_blob_talloc_named (data_blob.c:52)
==8110==    by 0x61374F5: gensec_gssapi_update (gensec_gssapi.c:550)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==  Address 0x22b155c0 is 64 bytes inside a block of size 184 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x679C453: _talloc_free_internal (talloc.c:878)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
==8110== Invalid read of size 8
==8110==    at 0x679B60B: talloc_chunk_from_ptr (talloc.c:356)
==8110==    by 0x679B921: __talloc (talloc.c:556)
==8110==    by 0x679BD03: _talloc_named_const (talloc.c:676)
==8110==    by 0x679E423: _talloc_memdup (talloc.c:1910)
==8110==    by 0x635BFD7: data_blob_talloc_named (data_blob.c:52)
==8110==    by 0x61374F5: gensec_gssapi_update (gensec_gssapi.c:550)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x612E248: gensec_spnego_create_negTokenInit (spnego.c:644)
==8110==    by 0x612EC6C: gensec_spnego_update (spnego.c:842)
==8110==    by 0x61301F5: gensec_spnego_update_wrapper (spnego.c:1311)
==8110==    by 0x61308C9: gensec_update (gensec.c:220)
==8110==    by 0x7C69399: dcerpc_bind_auth_send (dcerpc_auth.c:372)
==8110==  Address 0x22b155b0 is 48 bytes inside a block of size 184 free'd
==8110==    at 0x4C27D4E: free (vg_replace_malloc.c:427)
==8110==    by 0x679C453: _talloc_free_internal (talloc.c:878)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110==    by 0x679D1B8: _talloc_free_children_internal (talloc.c:1256)
==8110==    by 0x679C304: _talloc_free_internal (talloc.c:851)
==8110== 
talloc: access after free error - first free may be at ../source4/smbd/service_stream.c:82
Bad talloc magic value - access after free
PANIC: Bad talloc magic value - access after free
==8110== 
==8110== HEAP SUMMARY:
==8110==     in use at exit: 4,050,429 bytes in 32,410 blocks
==8110==   total heap usage: 652,812 allocs, 620,402 frees, 107,197,581 bytes allocated
==8110== 
==8110== LEAK SUMMARY:
==8110==    definitely lost: 156 bytes in 6 blocks
==8110==    indirectly lost: 1,971 bytes in 32 blocks
==8110==      possibly lost: 3,756,597 bytes in 30,581 blocks
==8110==    still reachable: 291,705 bytes in 1,791 blocks
==8110==         suppressed: 0 bytes in 0 blocks
==8110== Rerun with --leak-check=full to see details of leaked memory
==8110== 
==8110== For counts of detected and suppressed errors, rerun with: -v
==8110== ERROR SUMMARY: 18 errors from 18 contexts (suppressed: 287 from 8)
Aborted




> -----Original Message-----
> From: Andrew Bartlett [mailto:abartlet at samba.org]
> Sent: Saturday, June 22, 2013 9:09 AM
> To: Simonet Philippe, ITS-OUS-OP-IFM-NW-IPE
> Cc: samba at samba.org; samba-technical at samba.org
> Subject: Re: [Samba] [PATCH] Workaround very slow nss_winbind, fix crash
> on the AD DC (particularly for backups)
> 
> On Fri, 2013-06-21 at 08:10 +0000, Philippe.Simonet at swisscom.com wrote:
> > I tried both, and I get still crashes :
> > ----
> > 0001-gensec-work-around-nested-event-loops-by-ensuring-th.patch
> > 0002-s4-winbind-Add-special-case-for-BUILTIN-domain.patch
> > ----
> >
> > -----
> > samba version 4.0.6 started.
> > Copyright Andrew Tridgell and the Samba Team 1992-2012
> > samba: using 'single' process model
> > talloc: access after free error - first free may be at
> > ../source4/kdc/db-glue.c:206 Bad talloc magic value - access after
> > free
> > PANIC: Bad talloc magic value - access after free Aborted
> > ----
> >
> > philippe
> 
> Does setting:
> 
>         interfaces = virbr0:0 lo
>         bind interfaces only = yes
> 
> help?
> 
> Also, does reverting (with 'git revert HASH', where HASH is the commit id
> your bisect identified) help?
> 
> Finally, can you run Samba under valgrind again?  The error you show above
> doesn't seem quite right in the context, and I want to be sure we are not
> chasing an unrelated issue.
> 
> Thanks,
> 
> Andrew Bartlett
> 
> --
> Andrew Bartlett                                http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org
> 



More information about the samba-technical mailing list