Trenta sis
2017-Mar-13 09:47 UTC
[Samba] Memory leak samba 4.4.5 and authentications errors
Hi, We are using samba 4.4.5, and we detected two issue, and we are not sure if both errors are related... 1) memory leak I have detected that It seems that samba 4.4.5 (AD mode) has a memory leak, because after some time memory usage is very high, for example with an environment with 150 users and Samba server with 2GB RAM after 222 days up, is using swap, and memory is increasing continuously... I have searched in changelog of samba 4.4.10 but any clear information about memory leaks, and before to upgrade we like to ensure if this is solved or not... Actual server is Debian 8 with samba 4.4.5 compiled form sources and additional information with high memory usage is: # free -m total used free shared buffers cached Mem: 2010 1770 239 40 519 623 -/+ buffers/cache: 627 1382 Swap: 2076 *523 *1553 root at samba4:~# ps auxf | egrep "samba|smbd|winbindd" root 10925 0.0 0.0 12728 2040 pts/0 S+ 10:45 0:00 \_ grep -E samba|smbd|winbindd root 3639 0.0 0.4 540524 9020 ? Ss 2016 0:15 /usr/local/samba/sbin/samba -D root 3657 0.0 0.2 540524 4904 ? S 2016 0:00 \_ /usr/local/samba/sbin/samba -D root 3661 0.0 0.4 513240 10204 ? Ss 2016 6:50 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground root 3673 0.0 0.3 503500 7976 ? S 2016 74:21 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground root 3674 0.0 0.1 503508 3276 ? S 2016 0:17 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground root 3679 0.0 0.1 513240 3476 ? S 2016 0:53 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground root 14383 0.0 1.4 533324 29804 ? S Mar03 0:02 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground DOMAIN\31+ 1984 1.0 2.4 533964 49976 ? S Mar08 74:12 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground DOMAIN\32+ 5343 0.7 2.7 537760 56696 ? S 06:57 1:38 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground root 7161 0.1 2.4 533964 49888 ? S 08:12 0:10 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground root 7171 0.0 1.5 533972 32760 ? S 08:14 0:00 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground root 8837 0.0 1.9 533964 39404 ? S 09:22 0:00 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground DOMAIN\sr+ 10920 0.2 1.4 536512 30596 ? S 10:44 0:00 | \_ /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground root 3658 0.2 1.0 553932 20888 ? S 2016 616:00 \_ /usr/local/samba/sbin/samba -D root 3659 0.0 0.6 544676 12800 ? S 2016 3:35 \_ /usr/local/samba/sbin/samba -D root 3660 0.0 0.2 540524 4952 ? S 2016 0:14 \_ /usr/local/samba/sbin/samba -D root 3662 0.0 2.0 555616 42616 ? S 2016 104:33 \_ /usr/local/samba/sbin/samba -D root 3663 0.0 0.5 540524 10892 ? S 2016 12:07 \_ /usr/local/samba/sbin/samba -D root 3664 0.0 2.8 915716 59188 ? S 2016 79:00 \_ /usr/local/samba/sbin/samba -D root 3665 0.0 0.5 540524 10888 ? S 2016 83:37 \_ /usr/local/samba/sbin/samba -D root 3666 0.0 0.2 540524 4956 ? S 2016 0:00 \_ /usr/local/samba/sbin/samba -D root 3667 0.0 0.6 466468 14352 ? Ss 2016 19:52 | \_ /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground root 3675 0.0 0.5 478496 10776 ? S 2016 62:22 | \_ /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground root 3677 0.0 0.7 469044 15280 ? S 2016 0:22 | \_ /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground root 9546 0.0 0.4 478996 9740 ? S 2016 0:22 | \_ /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground root 3668 0.0 0.4 543072 9744 ? S 2016 0:20 \_ /usr/local/samba/sbin/samba -D root 3669 0.0 1.4 543072 29728 ? S 2016 34:56 \_ /usr/local/samba/sbin/samba -D root 3670 0.0 0.4 540524 10004 ? S 2016 5:21 \_ /usr/local/samba/sbin/samba -D I can give more information if is needed 2) random errors locked accounts Users are reporting raondom errors with authentications, in some situations users can't login, and they have entered correctly password, but they receive a message that account is locked, and after 2 minutes they can login with same password that in previou attempts was refused... We don't know how to reproduce this error and how to debug and give any interesting information to find the problem... What can I do? I'm not sure if bot errors are related... Anybody can help? Thanks
Reindl Harald
2017-Mar-13 09:57 UTC
[Samba] Memory leak samba 4.4.5 and authentications errors
Am 13.03.2017 um 10:47 schrieb Trenta sis via samba:> We are using samba 4.4.5, and we detected two issue, and we are not sure if > both errors are related... > > > 1) memory leak > I have detected that It seems that samba 4.4.5 (AD mode) has a memory leak, > because after some time memory usage is very high, for example with an > environment with 150 users and Samba server with 2GB RAM after 222 days > up, is using swap, and memory is increasing continuously... > > I have searched in changelog of samba 4.4.10 but any clear information > about memory leaks, and before to upgrade we like to ensure if this is > solved or not...you sould in general update because 4.4.5 to 4.4.10 is just a BUGFIX update with no feature changes - at least in case your are building your own binaries and your 4.4.5 is not from a distribution which backports improtant fixes