The libnetsnmp provides an own memdup() function and typically this one does not use symbol versioning, like our memdup() in libsamba-util. In this case I encountered the libsmbconf prefers the unversioned memdup() instead of our own memdup(). I give an example: A system uses the nss_wins module. A tool tries to get a host by name, using the netsnmp_getaddrinfo() from the libnetsnmp. This ends in a _nss_wins_gethostbyname_r() call by the nss_wins, which calls the memdup() function of the libnetsnmp (instead of the memdup() of libsamba-util()). I think this backtrace explains this a bit better: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7886886 in __memcpy_ssse3_back () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff7886886 in __memcpy_ssse3_back () from /lib64/libc.so.6 #1 0x00007ffff7b54724 in memdup () from /usr/lib64/libnetsnmp.so.30 #2 0x00007ffff5c56572 in load_interfaces () from /usr/lib64/libsmbconf.so.0 #3 0x00007ffff64f74ee in _nss_wins_gethostbyname_r () from /usr/lib64/libnss_wins.so.2 #4 0x00007ffff7853601 in gethostbyname2_r () from /lib64/libc.so.6 #5 0x00007ffff7825e2f in gaih_inet () from /lib64/libc.so.6 #6 0x00007ffff7827de4 in getaddrinfo () from /lib64/libc.so.6 #7 0x00007ffff7b4b2bc in netsnmp_getaddrinfo () from /usr/lib64/libnetsnmp.so.30 #8 0x00007ffff7b4b4c6 in netsnmp_gethostbyname_v4 () from /usr/lib64/libnetsnmp.so.30 #9 0x00007ffff7b6933c in netsnmp_sockaddr_in2 () from /usr/lib64/libnetsnmp.so.30 #10 0x00007ffff7b6c042 in netsnmp_udp_create_tstring () from /usr/lib64/libnetsnmp.so.30 #11 0x00007ffff7b65289 in netsnmp_tdomain_transport_full () from /usr/lib64/libnetsnmp.so.30 #12 0x00007ffff7b38fd3 in snmp_sess_open () from /usr/lib64/libnetsnmp.so.30 #13 0x00007ffff7b39229 in snmp_open () from /usr/lib64/libnetsnmp.so.30 #14 0x0000000000401714 in main ()
Created attachment 9855 [details] proposed patch for 4.0, cherry-picked from master
Created attachment 9856 [details] proposed patch for 4.1, cherry-picked from master
Re-assigning to Karolin for inclusion in 4.1.next, 4.0.next. Jeremy.
Pushed to autobuild-v4-[0|1]-test.
(In reply to comment #4) > Pushed to autobuild-v4-[0|1]-test. Pushed to v4-0-test, but building in v4-1-test fails with: ../source3/locking/brlock.c: In function 'brl_traverse_fn': ../source3/locking/brlock.c:1777: error: implicit declaration of function 'memdup' ../source3/locking/brlock.c:1777: warning: cast to pointer from integer of different size ../source3/rpc_server/rpc_sock_helper.c: In function 'rpc_create_tcpip_sockets': ../source3/rpc_server/rpc_sock_helper.c:75: warning: cast discards qualifiers from pointer target type ../source3/rpc_server/rpc_sock_helper.c: In function 'rpc_setup_tcpip_sockets': ../source3/rpc_server/rpc_sock_helper.c:199: warning: cast discards qualifiers from pointer target type Waf: Leaving directory `/memdisk/kseeger/a41/b761433/samba/bin' Build failed: -> task failed (err #1): {task: cc brlock.c -> brlock_94.o} make: *** [all] Error 1 Re-assigning to Björn Baumbach.
Created attachment 9907 [details] new proposed patch for 4.1, cherry-picked from master Sorry. Please find the new one attached. Björn
Comment on attachment 9907 [details] new proposed patch for 4.1, cherry-picked from master Compiles happily for me on 4.1.x :-).
Re-assigning to Karolin for 4.1.next, 4.0.next. Jeremy.
(In reply to comment #8) > Re-assigning to Karolin for 4.1.next, 4.0.next. > > Jeremy. Pushed to autobuild-v4-1-test (already included in v4-0-test).
(In reply to comment #9) > (In reply to comment #8) > > Re-assigning to Karolin for 4.1.next, 4.0.next. > > > > Jeremy. > > Pushed to autobuild-v4-1-test (already included in v4-0-test). Pushed to v4-1-test. Closing out bug report. Thanks!