View Issue Details

IDProjectCategoryView StatusLast Update
0002514unrealircdpublic2015-05-27 18:25
Reportercards Assigned Tosyzop  
PrioritynormalSeveritytrivialReproducibilityN/A
Status closedResolutionno change required 
Product Version3.2.3 
Summary0002514: Possible Memory Leak
DescriptionFreeBSD jovial.veritynet.net 4.11-STABLE FreeBSD 4.11-STABLE #0: Wed May 4

bsd@jovial:/home/bsd$ ps x -l rss
  UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
 2036 15170 1 0 2 0 17048 16524 select S ?? 0:50.94 ircd: PurpleHaze.420-Mafia.Org (ircd)

Initially I though it was a module causing the leak, but after unloading all but the core modules, and restarting, it gradually started a memory leak again. I am unable to reproduce on any other OS, and don't have access to another BSD 4.11 box to test on. Is anyone else able to reproduce?
Steps To ReproduceN/A
Additional InformationComplete Process List:
bsd@jovial:/home/bsd$ ps x -l rss
  UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
 2036 15170 1 0 2 0 17048 16524 select S ?? 0:50.94 ircd: PurpleHaze.420-Mafia.Org (ircd)
 2036 39950 39948 0 2 0 4944 2072 select I ?? 0:00.01 sshd: bsd@ttyp0 (sshd)
 2036 40235 40233 0 2 0 4944 2072 select S ?? 0:00.01 sshd: bsd@ttyp2 (sshd)
 2036 62503 62501 0 2 0 4944 2072 select I ?? 0:00.03 sshd: bsd@ttyp1 (sshd)
 2036 39951 39950 0 3 0 1764 1536 ttyin Is+ p0 0:00.03 -bash (bash)
 2036 62504 62503 0 3 0 1764 1536 ttyin Is+ p1 0:00.03 -bash (bash)
 2036 40236 40235 0 10 0 1764 1536 wait Ss p2 0:00.04 -bash (bash)
 2036 42299 40236 0 28 0 392 248 - R+ p2 0:00.00 ps x -l rss
[23:15:35/Thu May 05]
3rd party modulesN/A Skeleton

Activities

aquanight

2005-05-06 02:48

reporter   ~0009892

Did you check /stats Z (memory info) and see if the numbers add up?

syzop

2005-05-06 09:51

administrator   ~0009893

/stats Z output would be useful indeed.

Sidenote: note that memory will grow slightly due to the /WHOWAS history, so if you do like 'check memory, connect 1000 clients, disconnect all of them, check memory' then those figures will be different and that's correct. BUT.. that's only ~220 bytes per user, the default NICKNAMEHISTORYLENGTH is to hold it for 2000 users, so that's max ~0.5Mb ;)... Unless you changed that of course ('grep NICKNAMEHIST include/setup.h' to find out).

Besides the /stats Z, could you also give us some more info like:
- how many users are connected on average / peak
- how much memory does it start with?
- how quickly do you see such an increase? like ?mb per day/hour/week..

cards

2005-05-07 14:30

reporter   ~0009895

Another output from the shell after 42 hours.
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
bsd 15170 0.9 3.7 38296 37492 ?? S Thu08PM 42:14.37 ircd: PurpleHaze.420-Mafia.org

Stats Z Report:
Client Local 524(484176) Remote 1788(314688)
Users 2304(350208) Invites 0(0)
User channels 6525(130500) Aways 12(375)
WATCH headers 71(1650) entries 0(0)
Attached confs 0(0)
Conflines 0(0)
Classes 0(0)
Channels 112(15826) Bans 79(4609)
Channel members 6525(130500) invite 0(0)
Whowas users 2000(304000) away 0(112000)
Whowas array 2000(200000)
Hash: client 16384(196608) chan 16384(196608) watch 10007(40028)
Dbuf blocks 15539(31637404)
Link blocks free 98(1960) total 0(0)
RES table 808
Structs 3240 IP storage 972 Name storage 2815
Total: ww 616000 ch 150935 cl 1281597 co 0 db 31637404
TOTAL: 34128975 sbrk(0)-etext: 35415292
End of /STATS report

bsd@jovial:/home/bsd/Unreal3.2$ grep NICKNAMEHIST include/setup.h
#define NICKNAMEHISTORYLENGTH 2000

Shouldn't be a reason for 37MB's to be used. Any ideas at all?

syzop

2005-05-07 16:57

administrator   ~0009899

Is it a busy server? Could you check with tcpdump/iptraf/whatever to see how much kb/s in/out we are talking about?
It seems most of the memory - 31.6MB - is allocated to input/output buffers, these are the receive- and sendqueue for clients.

{please do follow these instructions, it seems you skipped over 3/4 of my last post, thanks in advance}

pinstrate

2005-05-08 15:14

reporter   ~0009904

sorry for offtopic, but:
I see stats Z displays valuable information, however, it is hard to understand it. Syzop, could you explain please what these stats (letters) mean? At least what does 'Total: ww 616000 ch 150935 cl 1281597 co 0 db 31637404' mean? (I'm talking about whose ww, ch, cl & etc)

RandomNumber

2005-06-09 22:18

reporter   ~0010075

not sure if it is still relevent, but FreeBSD 4.10
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
 1010 3651 1 0 2 0 6492 5536 select S ?? 16:28.67 ircd: supreme.irchat.tv (ircd)
Client Local 222(205128) Remote 357(62832)
Users 573(89388) Invites 2(40)
User channels 859(17180) Aways 47(1964)
WATCH headers 31(763) entries 0(0)
Attached confs 0(0)
Conflines 0(0)
Classes 0(0)
Channels 255(38287) Bans 149(8661)
Channel members 859(17180) invite 2(40)
Whowas users 2000(312000) away 0(112000)
Whowas array 2000(200000)
Hash: client 16384(196608) chan 16384(196608) watch 10007(40028)
Dbuf blocks 238(484568)
Link blocks free 200(4000) total 0(0)
RES table 808
Structs 3240 IP storage 972 Name storage 2949
Total: ww 624000 ch 64168 cl 377295 co 0 db 484568
TOTAL: 1995244 sbrk(0)-etext: 2805852
End of /STATS report
Up 5 days, just upgraded, average in and out is 30-35 k

stskeeps

2007-04-16 12:42

reporter   ~0013463

Is this still happening?

Bricker

2007-04-17 00:20

reporter   ~0013472

is 4.11 still supporter? can anyone confirm this on a newer version of freebsd. i could try but my box is currently down. thanks

syzop

2015-05-27 18:25

administrator   ~0018361

Probably no longer an issue. lots of this has been rewritten in 3.4. If there's still anything it will show up in valgrind and/or is likely something else anyway.

Issue History

Date Modified Username Field Change
2005-05-06 00:27 cards New Issue
2005-05-06 00:27 cards 3rd party modules => N/A Skeleton
2005-05-06 02:48 aquanight Note Added: 0009892
2005-05-06 09:51 syzop Note Added: 0009893
2005-05-07 14:30 cards Note Added: 0009895
2005-05-07 16:57 syzop Note Added: 0009899
2005-05-08 15:14 pinstrate Note Added: 0009904
2005-06-08 16:41 syzop Status new => confirmed
2005-06-09 22:18 RandomNumber Note Added: 0010075
2007-04-16 12:42 stskeeps Note Added: 0013463
2007-04-17 00:20 Bricker Note Added: 0013472
2015-05-27 18:25 syzop Note Added: 0018361
2015-05-27 18:25 syzop Status confirmed => closed
2015-05-27 18:25 syzop Assigned To => syzop
2015-05-27 18:25 syzop Resolution open => no change required