Created attachment 245286 [details] top FreeBSD 13.2-STABLE FreeBSD 14.0-STABLE #10 stable/14-n265251-e30f7d9b9bb4 mpd5 5.9_16 there is a memory leak. Reaches 20G in less than a day.
Created attachment 245293 [details] top Uptime 03:33
Created attachment 245295 [details] top uptime 6 hours
This is very strange as code of mpd5 is basically same for all branches of FreeBSD. Maybe there is some leak in FreeBSD libraries used by mpd5 like libradius. Do you use mpd5 with RADIUS? Did you use mpd5 previously with same configuration but with earlier FreeBSD branch?
Also, do you use mpd5 package from official FreeBSD package repository? Or do you build it yourself? Of perhaps you use mpd5 built by some 3rd party project like pfSense or other?
Clarification mpd5 from ports in this configuration works from version 12.2-RELEASE. RADIUS is used. The problem appeared after updating to 13.2-STABLE. After updating the kernel to 14.0-stable, the problem remained. After updating the world to 14.0-stable the problem disappeared. So the problem is relevant only for 13.2-STABLE after 13.2-STABLE #4 stable/13-n254690-eba26d0ba37e
So, this is either problem with libradius or libpcap in stable/13. libpcap may be used to compile pcap-based filters for ng_bpf/ng_car as documented in the last section here: https://mpd.sourceforge.net/doc5/mpd30.html#radius Do you use "mpd-filter" RADIUS attributes for mpd5?
(In reply to Eugene Grosbein from comment #6) yes, I use "mpd-filter"
(In reply to Anatoliy Nebrat from comment #5) To confirm, the issue does not occur with 12.2 or 14.0, but does with 13.2? From 12.2 to 13.2 libpcap was updated from 1.9.0 to 1.9.1. From 13.2 to 14.0 it was updated to 1.10.4. (I haven't checked for changes in libradius yet.)
(In reply to Anatoliy Nebrat from comment #7) Can you give an example for one of mpd-filters applied to your users? I'd try to reproduce the problem with small code sample but I need such "real life" example.
(In reply to Anatoliy Nebrat from comment #5) Your 13.2-STABLE is 7 months old: https://cgit.freebsd.org/src/commit/?id=eba26d0ba37e Could you please try updating to recent stable/13 to make sure the problem still persist?
(In reply to Eugene Grosbein from comment #9) Framed-Pool:=ppp_free mpd-limit+=out#1#Other=all rate-limit 51200000 9600000 19200000 mpd-limit+=in#1#Other=all rate-limit 51200000 9600000 19200000
(In reply to Eugene Grosbein from comment #10) The last update to 13.2-stable was 26.09.2023 The last update to 14.0-stable was 27.09.2023 There is no way to branch to 13.2
(In reply to Anatoliy Nebrat from comment #11) I need an example of "mpd-filter", not "mpd-limit". Could you please attach mpd.conf, please?
(In reply to Eugene Grosbein from comment #13) Sorry, I don't use the mpd-filter
(In reply to Anatoliy Nebrat from comment #14) I still need to see mpd.conf.
(In reply to Eugene Grosbein from comment #15) default: load server load pppoe server: log -all create bundle template B set ipcp ranges 195.../32 ippool ppp_free set ippool add ppp_free 172.17.1.1 172.17.254.254 set ipcp yes vjcomp set ipcp dns 1.1.1.1 set iface disable on-demand set iface disable proxy-arp set iface enable tcpmssfix pppoe: create link template LPPPoE pppoe set pppoe service "" set link action bundle B set link disable multilink set link yes acfcomp protocomp set link no pap chap set link enable chap set link keep-alive 5 30 set link yes report-mac load auth # vlan1 create link template vlan1 LPPPoE set pppoe iface vlan1 set link enable incoming # vlan200 create link template vlan200 LPPPoE set pppoe iface vlan200 set link enable incoming # vlan201 ... # vlan399 create link template vlan399 LPPPoE set pppoe iface vlan399 set link enable incoming auth: set auth disable internal set auth enable radius-auth set auth enable radius-acct set auth acct-update 10 set radius server 192... test 1812 1813 set radius timeout 30 set radius retries 3 set radius me 192... set radius identifier 192... set auth update-limit-in 5000000 set auth update-limit-out 5000000
Can you create this section in mpd.conf ? startup: set user mpd mpd admin set web self 127.0.0.1 set web open set console open after this, connect with telnet to address 127.0.0.1 port 5005 or through web to address 127.0.0.1 port 5006 with username `mpd` and password `mpd` and run command #show mem and see like that: Mpd pid 393, version 5.9 [] show mem Type Count Total ---- ----- ----- AUTH 1981 164022 BUND 356 3520768 CMD 4 74 CMDL 6 172
(In reply to Anatoliy Nebrat from comment #16) Please show memory stats as Dmitry requested. Also, you may remove "log -all" command as that was a work-around to a problem solved long time ago.