Public bug reported:

## Summary

The XFCE panel StatusNotifier plugin `libsntray-xfce.so`
(package **xfce4-sntray-plugin**) leaks memory continuously. On the affected
system a single panel-plugin wrapper process hosting this plugin grew to
**~6.4 GB resident (20% of total RAM)** after roughly **18 hours** of normal
desktop use — an unbounded leak of approximately **350 MB/hour**.

The plugin runs inside an `xfce4-panel` `wrapper-2.0` process, so the leak
slowly consumes all system memory and will eventually trigger swapping / OOM.

## Affected component

| Item | Value |
|------|-------|
| Plugin file | 
`/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libsntray-xfce.so` |
| Package | `xfce4-sntray-plugin` `0.4.13.1-5` (Ubuntu `questing/universe`) |
| Plugin build date | 2024-10-05 |
| Host panel | `xfce4-panel` `4.20.4-1` |
| OS | Ubuntu 25.10 (questing), kernel 6.17.0-29-generic, x86_64 |
| GTK | libgtk-3.so.0.2418.32 |
| Upstream | https://gitlab.com/vala-panel-project/xfce4-sntray-plugin 
(**archived/read-only**) |

## Evidence

### Process / memory snapshot

Command line of the leaking process:

```
/usr/lib/x86_64-linux-gnu/xfce4/panel/wrapper-2.0 \
    /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libsntray-xfce.so \
    6 16777229 sntray StatusNotifier Plugin Display AppIndicators in FlowBox
```

`/proc/<pid>/status` (PID 1504190):

```
VmPeak:   6965592 kB   (~6.6 GB)
VmRSS:    6569436 kB   (~6.4 GB)
RssAnon:  6558280 kB   (~6.4 GB)   <- essentially all anonymous heap
RssFile:    11156 kB
VmSwap:         0 kB
Threads:        5
```

### The leak is one growing glibc heap

`/proc/<pid>/smaps` shows the resident memory is almost entirely a **single
contiguous `[heap]` region**, not mmap'd arenas or shared files:

```
6564016 kB  5c0f0fa19000-5c10a0458000  rw-p  [heap]
Private_Dirty: 6410 MB
Anonymous:     6410 MB
```

A single, monotonically growing main-arena heap is the classic signature of
**leaked `malloc`/`g_malloc` allocations** (objects allocated and never freed),
as opposed to fragmentation or legitimately large working sets.

### Leak rate

```
Process start : Fri Jun  5 14:12:11 2026
Snapshot      : Sat Jun  6 08:17:31 2026
Elapsed       : ~18h 05m
RssAnon       : ~6.4 GB
=> ~350 MB/hour, with no plateau
```

## Steps to reproduce

1. Run XFCE 4.20 with the `xfce4-sntray-plugin` (StatusNotifier / "AppIndicators
   in FlowBox") added to the panel.
2. Run one or more tray applications that update their icon/menu frequently
   (e.g. `nm-applet`, `redshift`).
3. Leave the session running and watch the hosting `wrapper-2.0` process:
   ```
   watch -n 60 'ps -o pid,rss,cmd -C wrapper-2.0 | grep sntray'
   ```
4. Observe RSS climbing without bound (hundreds of MB per hour here).


### Likely trigger: StatusNotifier item icon/menu updates

At capture time the `org.kde.StatusNotifierWatcher` (provided by this very
plugin/wrapper, `:1.32`) had these registered tray items:

```
:1.7310/org/blueman/sni                          (blueman)
:1.37/org/ayatana/NotificationItem/nm_applet     (nm-applet)
org.kde.StatusNotifierItem-1511802-1             (tomboy-ng)
:1.57/org/ayatana/NotificationItem/redshift      (redshift)
```

Several of these (notably **nm-applet** and **redshift**) push frequent
icon/tooltip/`dbusmenu` property updates over D-Bus. The growth pattern is
consistent with the plugin allocating new `GdkPixbuf` / icon-pixmap / menu
objects on each `NewIcon` / `NewToolTip` / menu-layout update and failing to
release the previous ones. (This is a hypothesis based on the heap signature
and item set, not yet confirmed with a Valgrind/heaptrack capture.)

** Affects: xfce4-sntray-plugin (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2155768

Title:
  Severe memory leak in `libsntray-xfce` (xfce4-sntray-plugin)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xfce4-sntray-plugin/+bug/2155768/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to