Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substantial memory leak on aarch64 and x86_64 architectures #1946

Open
kseistrup opened this issue Jan 9, 2024 · 0 comments
Open

Substantial memory leak on aarch64 and x86_64 architectures #1946

kseistrup opened this issue Jan 9, 2024 · 0 comments
Milestone

Comments

@kseistrup
Copy link

TL;DR: Profanity ate 1 GB swap in less than 15 days

I have profanity running on a RPi4 (aarch64 architecture) that is running ArchLinuxARM. Profanity receives notifications from e.g. cron jobs and casual interpersonal chat, altogether less than a couple of hundred messages daily — some days substantially less.

The RPi4 has 4 GB RAM + 1 GB swap. Usually no swap is used at all, so at first I didn't notice when free -tk reported that used and free swap had swapped places, so to speak: 100% used swap and 0% free. This was when the RPi4 and profanity had been up for slightly less than 15 days.

A ps ux revealed that the profanity process had gobbled up 2.5+ GB RAM, including all of the available 1 GB swap. Taking profanity down released all of the used swap, except ~40 MB.

Expected Behavior

Ideally, profanity should not keep gobbling up RAM.

Current Behavior

Launching profanity again, this is what I noticed (numbers taken from ps ux):

HH:MM     VSZ     RSS
-----··------··------
??:??  188208  163968
18:58  249260  225152
21:42  286228  262016
07:24  346020  321792

HH:MM is wallclock hours and minutes.

I tried the same thing on a x86_64 desktop pc, running ArchLinux:

HH:MM     VSZ     RSS
-----··------··------
??:??   55120   33976
18:13  280880   40264
22:13  316360   77128
07:21  360808  121544

Possible Solution

I haven't got a clue.

Steps to Reproduce (for bugs)

  1. Launch profanity in a terminal emulator
  2. Regularly run e.g. ps ux | rg pro[f]anity to see its increasing memory consumption

Context

N/A

Environment

  • Give us the version and build information output generated by profanity -v
$ profanity -v
Profanity, version 0.14.0
Copyright (C) 2012 - 2019 James Booth <[email protected]>.
Copyright (C) 2019 - 2023 Michael Vetter <[email protected]>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.23.2)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (3.11.6)
GTK icons/clipboard: Disabled
GDK Pixbuf: Enabled
  • If you could not yet build profanity, mention the revision you try to build from
  • Operating System/Distribution: ArchLinux + ArchLinuxARM
  • curl: 8.5.0
  • expat: 2.5.0
  • glib2: 2.78.3
  • glibc: 2.38
  • libassuan: 2.5.6
  • libgcrypt: 1.10.3
  • libgpg-error: 1.47
  • libgpgme: 1.23.2
  • libnotify: 0.8.3
  • libotr: 4.1.1
  • libsignal-protocol-c: 2.3.3
  • libstrophe: 0.12.3
  • ncurses: 6.4_20230520
  • python: 3.11.6
  • readline: 8.2.007

Options used when building the package can be seen here:

Cheers.

@jubalh jubalh added this to the next milestone Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants