Re: memory leak in Init 10.3-STABLE .svn_revision 304147 ?

2018-03-03 Thread Julian H. Stacey
Hi, Reference:
> From: Eugene Grosbein <eu...@grosbein.net>
> Date: Sat, 3 Mar 2018 23:48:42 +0700

Eugene Grosbein wrote:
> 03.03.2018 23:33, Julian H. Stacey wrote:
> 
> > Eugene Grosbein wrote:
> >> 03.03.2018 23:11, Julian H. Stacey wrote:
> >>
> >>> Oops!  I got Subject & body wrong s/inetd/init/ !
> >>>
> >>> Was:    memory leak in inetd 10.3-STABLE .svn_revision 304147 ?
> >>> Should be:  memory leak in init 10.3-STABLE .svn_revision 304147 ?
> >>
> >> There is no evidence that /sbin/init has memory leak (nor inetd), what 
> >> makes you think so?
> > 
> > I got back about 500M of wap after kill -HUP 1
> 
> There may be plenty of reasons for that apart from init's "memory leak"
> and init does not even show in the top. Please share your /etc/ttys file.

console noneunknown off secure
ttyv0   "/usr/libexec/getty Pc" xterm   on  secure
ttyv1   "/usr/libexec/getty Pc" xterm   on  secure
ttyv2   "/usr/libexec/getty Pc" xterm   on  secure
ttyv3   "/usr/libexec/getty Pc" xterm   off  secure
ttyv4   "/usr/libexec/getty Pc" xterm   off  secure
ttyv5   "/usr/libexec/getty Pc" xterm   off  secure
ttyv6   "/usr/libexec/getty Pc" xterm   off  secure
ttyv7   "/usr/libexec/getty Pc" xterm   off  secure
ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
ttyu0   "/usr/libexec/getty 3wire"  vt100   onifconsole secure
ttyu1   "/usr/libexec/getty 3wire"  vt100   onifconsole secure
ttyu2   "/usr/libexec/getty 3wire"  vt100   onifconsole secure
ttyu3   "/usr/libexec/getty 3wire"  vt100   onifconsole secure
dcons   "/usr/libexec/getty std.9600"   vt100   off secure

Cheers,
Julian
-- 
Julian Stacey, Computer Consultant, Systems Engineer, BSD Linux Unix, Munich
 Brexit Referendum stole 3,700,000 votes, inc. 700,000 from British in EU.
 UK Govt. lied it's "democratic" in Article 50 letter to EU paragraph 3.
Petition for votes: http://berklix.eu/queen/
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: memory leak in Init 10.3-STABLE .svn_revision 304147 ?

2018-03-03 Thread Eugene Grosbein
03.03.2018 23:33, Julian H. Stacey wrote:

> Eugene Grosbein wrote:
>> 03.03.2018 23:11, Julian H. Stacey wrote:
>>
>>> Oops!  I got Subject & body wrong s/inetd/init/ !
>>>
>>> Was:memory leak in inetd 10.3-STABLE .svn_revision 304147 ?
>>> Should be:  memory leak in init 10.3-STABLE .svn_revision 304147 ?
>>
>> There is no evidence that /sbin/init has memory leak (nor inetd), what makes 
>> you think so?
> 
> I got back about 500M of wap after kill -HUP 1

There may be plenty of reasons for that apart from init's "memory leak"
and init does not even show in the top. Please share your /etc/ttys file.

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: memory leak in Init 10.3-STABLE .svn_revision 304147 ?

2018-03-03 Thread Julian H. Stacey
Eugene Grosbein wrote:
> 03.03.2018 23:11, Julian H. Stacey wrote:
> 
> > Oops!  I got Subject & body wrong s/inetd/init/ !
> > 
> > Was:memory leak in inetd 10.3-STABLE .svn_revision 304147 ?
> > Should be:  memory leak in init 10.3-STABLE .svn_revision 304147 ?
> 
> There is no evidence that /sbin/init has memory leak (nor inetd), what makes 
> you think so?

I got back about 500M of wap after kill -HUP 1


> Pleas show output of "top -ores -d1" command.

last pid: 57791;  load averages:  0.39,  0.52,  0.48   up 547+03:40:39 17:31:32
41 processes:  2 running, 39 sleeping
CPU: % user, % nice, % system, % interrupt, % idle
Mem: 32M Active, 1160M Inact, 388M Wired, 108K Cache, 212M Buf, 391M Free
Swap: 614M Total, 79M Used, 535M Free, 12% Inuse

  PID USERNAMETHR PRI NICE   SIZERES STATETIMEWCPU COMMAND
47677 bind  4  200 74956K 28088K kqread 231:10   0.00% named
35591 mailman   1  200   113M 18968K select  47:57   0.00% python2.
35590 mailman   1  200   112M 16120K select  50:09   0.00% python2.
35588 mailman   1  200   112M 15588K select  51:08   0.00% python2.
35592 mailman   1  200   108M 14928K select  51:53   0.00% python2.
  579 root  1  200 21900K 13812K select 867:23   0.00% ntpd
35593 mailman   1  200   107M 13564K select  50:30   0.00% python2.
35589 mailman   1  200   108M 13432K select  54:56   0.00% python2.
96114 root  1  200   101M 11388K select   8:20   0.00% vmtoolsd
35587 mailman   1  200   106M 10832K wait 0:01   0.00% python2.
57188 www   1  200   147M  9708K lockf0:01   0.00% httpd
57337 www   1  200   147M  9692K select   0:01   0.00% httpd
57335 www   1  200   147M  9672K lockf0:01   0.00% httpd
57616 www   1  200   147M  9660K select   0:00   0.00% httpd
57365 www   1  200   147M  9652K select   0:00   0.00% httpd
57613 www   1  200   147M  9648K kqread   0:00   0.00% httpd
78720 root  1  200   147M  9512K select   0:40   0.00% httpd



Cheers,
Julian
-- 
Julian Stacey, Computer Consultant, Systems Engineer, BSD Linux Unix, Munich
 Brexit Referendum stole 3,700,000 votes, inc. 700,000 from British in EU.
 UK Govt. lied it's "democratic" in Article 50 letter to EU paragraph 3.
Petition for votes: http://berklix.eu/queen/
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: memory leak in Init 10.3-STABLE .svn_revision 304147 ?

2018-03-03 Thread Eugene Grosbein
03.03.2018 23:11, Julian H. Stacey wrote:

> Oops!  I got Subject & body wrong s/inetd/init/ !
> 
> Was:memory leak in inetd 10.3-STABLE .svn_revision 304147 ?
> Should be:  memory leak in init 10.3-STABLE .svn_revision 304147 ?

There is no evidence that /sbin/init has memory leak (nor inetd), what makes 
you think so?

Pleas show output of "top -ores -d1" command.

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


memory leak in Init 10.3-STABLE .svn_revision 304147 ?

2018-03-03 Thread Julian H. Stacey
Oops!  I got Subject & body wrong s/inetd/init/ !

Was:memory leak in inetd 10.3-STABLE .svn_revision 304147 ?
Should be:  memory leak in init 10.3-STABLE .svn_revision 304147 ?

Hi sta...@freebsd.org

I think I have found a memory leak with init on 10.3-STABLE
(server runs in a VM); server ran out of swap.

top
Mem: 34M Active, 791M Inact, 387M Wired, 200K Cache, 212M Buf, 759M Free
Swap: 614M Total, 605M Used, 8744K Free, 98% Inuse

uptime
 4:47PM  up 544 days,  2:56, 2 users, load averages: 0.26, 0.30, 0.32

uname -a
FreeBSD slim.domain 10.3-STABLE FreeBSD 10.3-STABLE #0: Tue
Aug 16 18:09:22 CEST 2016
jhs@slim.domain:/usr/obj/usr/src/sys/GENERIC  amd64

First I just commented out a few trivial getty as a start, ran 
kill -HUP 1 and was surprised to get loads of swap back:
swapinfo
Device  1K-blocks UsedAvail Capacity
/dev/da0p3 62873681056   54768013%

( Before I ran `kill -9  541` after seeing this:
  PID USERNAMETHR PRI NICE   SIZERES STATETIMEWCPU COMMAND
  541 root  2  520   769M   103M select  28.4H   0.00% vmtoolsd
but it didn't gain me swap space, hence next the `kill -HUP 1`
which I had first avoided, as server is remote. 
Restarting vmtoolsd leaves swapinfo unchanged. )

top
CPU:  0.8% user,  0.0% nice,  3.1% system,  0.0% interrupt, 96.1% idle
Mem: 32M Active, 711M Inact, 383M Wired, 176K Cache, 216M Buf, 846M Free
Swap: 614M Total, 79M Used, 535M Free, 12% Inuse

/var/log/dmesg.today  858 x swap_pager_getswapspace

In case someone asks me to de specific debugging, that server has:
cd /usr/src
cat .svn_revision  304147
cat .ctm_status src-10 1304
Though I'm wary of a reboot with a debug kernel in case it hangs,
as it's a remote live server.

(So I guess an ideal world would have someone say
there used to be a leak but it was fixed long since.)

PS Below there's an intriguing "Swap: 32G",
presumably coming from hypervisor outside my server.

-
BEFORE
top
last pid: 91299;  load averages:  0.62,  0.68,  0.49  up 543+22:18:42
12:09:35
47 processes:  1 running, 46 sleeping

Mem: 34M Active, 791M Inact, 387M Wired, 200K Cache, 212M Buf, 759M Free
Swap: 614M Total, 605M Used, 8744K Free, 98% Inuse

  PID USERNAMETHR PRI NICE   SIZERES STATETIMEWCPU COMMAND
  541 root  2  520   769M   103M select  28.4H   0.00% vmtoolsd
  579 root  1  200 21900K 13812K select 862:04   0.00% ntpd
47677 bind  4  200 74956K 27996K kqread 227:10   0.00% named
  411 root  1  200 14524K  1708K select 124:23   0.00% syslogd
  313 root  1  200 13656K   536K select 121:22   0.00% devd
63839 root  1  200 51512K  4852K select  61:12   0.00% sendmail
35589 mailman   1  200   108M 13168K select  53:29   0.00% python2.
35592 mailman   1  200   108M 14852K select  50:27   0.00% python2.
35588 mailman   1  200   112M 15384K select  49:43   0.00% python2.
35593 mailman   1  200   107M 13344K select  49:10   0.00% python2.
35590 mailman   1  200   112M 15272K select  48:49   0.00% python2.
35591 mailman   1  200   113M 18564K select  46:37   0.00% python2.
  651 root  1  200 61316K  4116K select  17:21   0.00% sshd
  676 root  1  200 16624K  2228K nanslp  11:02   0.00% cron
63843 smmsp 1  200 26480K  4048K pause0:30   0.00% sendmail
35594 mailman   1  200   106M  5932K select   0:27   0.00% python2.
78594 root  1  200 16832K  2576K kqread   0:15   0.00% dovecot
78720 root  1  200   147M  9512K select   0:09   0.00% httpd

-

IMMEDIATELY BEFORE
last pid: 12063;  load averages:  0.02,  0.06,  0.07   up 360+17:30:09 12:05:23
23 processes:  1 running, 22 sleeping
CPU:  0.0% user,  0.0% nice,  0.1% system,  0.0% interrupt, 99.9% idle
Mem: 242M Active, 18G Inact, 12G Wired, 161M Cache, 240M Free
ARC: 8578M Total, 3785M MFU, 809M MRU, 59K Anon, 227M Header, 3758M Other
Swap: 32G Total, 200M Used, 32G Free

  PID USERNAME   THR PRI NICE   SIZERES STATE   C   TIMEWCPU COMMAN
97336 bind11  200   109M 30084K kqread  4  57:01   0.00% named
 1544 root 1  200 14536K   656K select  7  10:19   0.00% syslog
47145 root 1  200 41596K  3008K select  2   7:42   0.00% sendma
22566 root 1  200 16836K  1324K kqread  6   7:00   0.00% doveco
22567 root 1  200 21264K  1176K kqread  6   2:28   0.00% doveco
 1704 root 1  200 34636K   744K select  2   1:31   0.00% sshd
 6181 root 1  200   149M  7192K select  4   1:00   0.00% httpd
 1764 root 1  200 18752K   708K select  2