[Pkg-samba-maint] Bug#912717: samba: Samba should clean up sockets in /var/lib/samba/private/msg.sock/

Kim-Alexander Brodowski kim.brodowski at iserv.eu
Thu Sep 12 17:30:12 BST 2019


Dear Maintainer,

this bug does actually cause some issues when attempting to remove a 
user from smbpasswd:

     training.iserv.eu ~ # smbpasswd -x kim.test
     send_all_fn: messaging_send_buf to 7764 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 28701 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 16341 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 2975 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 10329 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 18682 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 13021 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 3398 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15631 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 28495 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7773 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7611 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 1654 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15628 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 3169 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15637 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 24374 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 1849 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 3405 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7827 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15458 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 3170 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7603 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 28703 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7776 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 1650 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 2978 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 19229 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15552 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 1653 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15472 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15634 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 16279 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 3173 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 28713 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 8498 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7767 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 1852 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 18884 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 16277 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 28583 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7691 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15558 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 13038 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 28494 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 8443 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 16312 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7770 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 10410 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7594 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 2977 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 3174 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15467 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 13014 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 3172 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 8647 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 15625 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 8442 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 16343 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 1755 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 3422 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 31592 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     send_all_fn: messaging_send_buf to 7697 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     Deleted user kim.test.

Using strace we can easily see that those messages come from no longer existing samba processes with leftover socket files:

     connect(23, {sa_family=AF_UNIX, sun_path="/var/lib/samba/private/msg.sock/1755"}, 110) = -1 ECONNREFUSED (Verbindungsaufbau abgelehnt)
     close(23)                               = 0
     write(2, "send_all_fn: messaging_send_buf "..., 80send_all_fn: messaging_send_buf to 1755 failed: NT_STATUS_OBJECT_NAME_NOT_FOUND) = 80

This is easily confirmed by cleaning up manually:

     training.iserv.eu ~ # for file in /var/lib/samba/private/msg.sock/*; do [ -d "/proc/$(basename "$file")" ] || rm -vf "$file"; done; smbpasswd -x kim.test
     '/var/lib/samba/private/msg.sock/23847' wurde entfernt
     '/var/lib/samba/private/msg.sock/23855' wurde entfernt
     Deleted user kim.test.

The error messages don't actually affect anything, but they confuse users and are a bit of a mess when attempting to use smbpasswd in scripts.

-- 
Kind regards,
Kim-Alexander Brodowski

IServ GmbH
Entwicklung
Bültenweg 73
38106 Braunschweig

Phone: +49 531 22 43 666-0
Mobile: +49 152 55 17 55 16
Fax: +49 531 22 43 666-9
E-Mail: Kim.Brodowski at iserv.eu
Web: https://iserv.eu

USt-IdNr. DE265149425 | Amtsgericht Braunschweig | HRB 201822
Geschäftsführer: Benjamin Heindl, Martin Hüppe, Jörg Ludwig
Grundsätze zum Datenschutz: https://iserv.eu/privacy



More information about the Pkg-samba-maint mailing list