barriers leaks memory when clients with duplicate names attempt to connect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PmWiki |
Fix Released
|
Unknown
|
|||
barrier (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When a second client with the same name as an existing client attempts to connect to barriers, it leaks memory. See #1 for supporting evidence.
[Original Report]
I have had barriers running for a few days now, and it has a RSS of 2695M. When I Stop/Start using the tray icon, this drops to a much more sensible ~10MB though has climbed up to 13MB in the past couple of minutes.
(One note: I appear to have two identically-named clients attempting to connect; this may be triggering some bad behaviour?)
ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: barrier 2.3.1+dfsg-1
ProcVersionSign
Uname: Linux 5.2.0-10-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu7
Architecture: amd64
CurrentDesktop: i3
Date: Fri Aug 16 12:08:37 2019
InstallationDate: Installed on 2019-05-07 (100 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
SourcePackage: barrier
UpgradeStatus: Upgraded to eoan on 2019-05-08 (99 days ago)
Changed in pmwiki: | |
status: | Unknown → Fix Released |
OK, so I've tracked memory usage using this barebones shell one-liner:
while true; do echo $(date) $(ps aux | grep bin/barriers | grep -v grep); sleep 60; done | tee -a ~/barriers.ps
The first few entries look fine; RSS doesn't change (to save you working it out without the ps headers, it's the 9228 number here):
Fri Aug 16 12:17:38 EDT 2019 daniel 15785 2.0 0.0 111528 9228 ? Sl 12:17 0:00 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
TRAPWINCH:zle:2: widgets can only be called when ZLE is active
Fri Aug 16 12:18:38 EDT 2019 daniel 15785 0.1 0.0 111528 9228 ? Sl 12:17 0:00 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:19:38 EDT 2019 daniel 15785 0.1 0.0 111528 9228 ? Sl 12:17 0:00 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:20:38 EDT 2019 daniel 15785 0.1 0.0 111528 9228 ? Sl 12:17 0:00 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:21:38 EDT 2019 daniel 15785 0.1 0.0 111692 9228 ? Sl 12:17 0:00 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:22:38 EDT 2019 daniel 15785 0.2 0.0 111692 9228 ? Sl 12:17 0:00 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:23:38 EDT 2019 daniel 15785 0.2 0.0 111692 9228 ? Sl 12:17 0:00 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:24:38 EDT 2019 daniel 15785 0.2 0.0 111692 9228 ? Sl 12:17 0:00 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:25:38 EDT 2019 daniel 15785 0.2 0.0 111692 9228 ? Sl 12:17 0:01 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:26:38 EDT 2019 daniel 15785 0.2 0.0 111692 9228 ? Sl 12:17 0:01 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
However, when I enable the duplicate client (I have two user sessions on my client screen, if you're wondering), things go sideways fast:
Fri Aug 16 12:27:38 EDT 2019 daniel 15785 0.2 0.0 112072 11432 ? Sl 12:17 0:01 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:28:38 EDT 2019 daniel 15785 0.3 0.0 112576 13516 ? Sl 12:17 0:02 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
Fri Aug 16 12:29:38 EDT 2019 daniel 15785 0.3 0.0 113200 15728 ? Sl 12:17 0:02 /usr/bin/barriers -f --no-tray --debug INFO --name surprise --enable-crypto -c /tmp/Barrier.lHYHCL --address :24800
That's an extra 6MB of memory used over 3 minutes. When I turn the duplicate client back off, we see some growth in the first line (as the duplicate cli...