Skip to content

memory leak when changing input method #41

@martinetd

Description

@martinetd

Please fill in the following items if you don't know the root cause.

Which distribution and version?:
debian bookworm

Which desktop environment and version?:
custom DE on X11 (wmii)

Which session type?:
X11

Which application and version?:
unrelated

IBus version?:
1.5.27-5

ibus-anthy version?:
1.5.14-1

Issue description:
ibus-anthy RSS grows by about 400KB everytime ibus-anthy is selected.
I see ibus anthy's engine/factory.py do_create_engine is called everytime so I assume the old factory sitll has references somewhere and is not gc'd?

Steps to reproduce:

  1. in ibus-setup have at least two input methods (I have English - English and Japanese - Anthy) with a keyboard shortcot to select next input method
  2. check RSS amount through e.g. ps aux | grep ibus-anthy
  3. toggle input method
  4. notice RSS grew
  5. with a 3 months uptime my ibus-anthy has filled in over 5.5GB of RSS+swap

Can you reproduce your problem when you restart ibus-daemon? (yes / no):
yes

Do you see any errors when you run ibus-daemon with the verbose option?:
no error, messages about some cleanup happening:

Removing imported_words_ibus__oldchar
Removing imported_words_ibus__era
Removing imported_words_ibus__zipcode
Removing ibus__symbol
Removing imported_words_ibus__emoji

Can you reproduce your problem with a new user account instead of the current your account? (yes / no):
... I was sure it would reproduce but I actually can't! I tried copying my .bashrc/.Xdefaults, .anthy directory, .xsession file, dconf dump of /desktop/ibus and /org/freedesktop/ibus/... I don't see what else could impact this?
I can reproduce this on two PCs so it's not 100% random, but if I can't reproduce on another account I'm not sure you'll be able to, do you have any idea what could cause this kind of things? I see new engines being created too but the old ones are properly gc'd, so perhaps a bad client?... I've tried running the same programs I think I have right now but might have missed some..

Anyway, enough time spent on this for a short while, any idea to trim this down further would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions