这是indexloc提供的服务,不要输入任何密码
Skip to content

[Bug]: RSS memory of surfaceflinger keeps growing. #522

@junrenshi

Description

@junrenshi

Problem description

The RSS memory of surfaceflinger grows (>10M) each time one switches termux-x11 to another app and back, or turns screen off and back on. After a few days of normal usuage, surfaceflinger could comsume a few GB RSS memory and renders the whole system unstable.

This seems to happen only when termux-x11 is running.

I check termux-x11 log, some errors are notable and may be related to the issue:

12-20 10:13:44.804 29946 30029 E BufferQueueProducer: query: BufferQueue has been abandoned
12-20 10:13:44.804 29946 30029 E BufferQueueProducer: query: BufferQueue has been abandoned
12-20 10:13:44.805 29946 30029 E BufferQueueProducer: SurfaceView[com.termux.x11/com.termux.x11.MainActivity]#25(BLAST Consumer)25 connect: BufferQueue has been abandoned
12-20 10:13:44.846 29946 29992 E BufferQueueProducer: SurfaceView[com.termux.x11/com.termux.x11.MainActivity]#26(BLAST Consumer)26 query: BufferQueue has been abandoned
12-20 10:13:44.847 29946 31356 E BufferQueueProducer: SurfaceView[com.termux.x11/com.termux.x11.MainActivity]#26(BLAST Consumer)26 setAsyncMode: BufferQueue has been abandoned
12-20 10:13:44.848 29946 31356 E BufferQueueProducer: SurfaceView[com.termux.x11/com.termux.x11.MainActivity]#26(BLAST Consumer)26 dequeueBuffer: BufferQueue has been abandoned
12-20 10:13:44.849 29946 31356 E BufferQueueProducer: SurfaceView[com.termux.x11/com.termux.x11.MainActivity]#26(BLAST Consumer)26 query: BufferQueue has been abandoned
x11.log

I am running Androud 12 in a Boox Tab10C Pro. The version of apk is Nightly Release 20231006 download from github, and the termux package is termux-x11-nightly 1.03.00-3.

What steps will reproduce the bug?

  1. Start termux-x11
  2. In a terminal, check memory ususage using "dumpsys meminfo"
  3. Switch to another app, or turn off the screen
  4. Switch back to termux-x11, or turn on screen
  5. Check memory usuage again.

What is the expected behavior?

The memory consumption of surfaceflinger does not keep growing, and one can continue running termux-x11 for a long period of time.

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