BTW the associated bug was closed by upstream presumptuously but there is a 
linked pull request that actually seeks to fix the issue. Specifically:
https://github.com/lxqt/lxqt-session/pull/256

** Description changed:

- lxqt-session had multiple gigabytes RSS memory.
+ STEPS TO REPRODUCE
+  0. Prepare a 100MB file, e.g. `dd if=/dev/urandom of=foo bs=1MB count=1`
+  1. Create a script to read the above file to standard output, i.e. `cat foo`
+  2. Monitor lxqt-session memory usage, using qps or `ps -C lxqt-session -F` 
(watch RSS)
+  3. Run the script through lxqt-panel or lxqt-runner
  
- It seems to be related to what else is running at the time. In my case,
- it was playing a game. Similar report:
- https://github.com/lxqt/lxqt/issues/442
+ EXPECTED RESULTS
+ Memory is not allocated for the script.
  
- `valgrind --leak-check yes` didn't think these were unreachable leaks:
+ ACTUAL RESULTS
+ Memory is allocated for the script and stays allocated.
  
- ==29251== HEAP SUMMARY:
- ==29251==     in use at exit: 579,390 bytes in 13,710 blocks
- ==29251==   total heap usage: 761,288 allocs, 747,578 frees, 2,257,247,645 
bytes allocated
- [...]
- ==29251== LEAK SUMMARY:
- ==29251==    definitely lost: 10,392 bytes in 58 blocks
- ==29251==    indirectly lost: 15,727 bytes in 209 blocks
- ==29251==      possibly lost: 0 bytes in 0 blocks
- ==29251==    still reachable: 553,271 bytes in 13,443 blocks
- ==29251==         suppressed: 0 bytes in 0 blocks
- ==29251== Reachable blocks (those to which a pointer was found) are not shown.
- ==29251== To see them, rerun with: --leak-check=full --show-leak-kinds=all
- 
- (those under-a-megabyte numbers are all much smaller than the gigabyte-
- size leak.)
- 
- `valgrind --tool=massif` shows memory growth as linear, and reports most
- of it here:
- 
- 
--------------------------------------------------------------------------------
-   n        time(i)         total(B)   useful-heap(B) extra-heap(B)    
stacks(B)
- 
--------------------------------------------------------------------------------
-  81 10,818,324,116    2,585,012,840    2,575,948,310     9,064,530            0
-  82 10,857,711,051    2,593,973,776    2,584,877,698     9,096,078            0
- 99.65% (2,584,877,698B) (heap allocation functions) malloc/new/new[], 
--alloc-fns, etc.
- ->99.61% (2,583,820,288B) 0x59C7730: QArrayData::allocate(unsigned long, 
unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) 
(qarraydata.cpp:118)
- | ->98.95% (2,566,770,242B) 0x59C967E: QByteArray::QByteArray(int, 
Qt::Initialization) (qarraydata.h:222)
- | | ->98.95% (2,566,736,443B) 0x5A31700: QRingBuffer::reserve(long long) 
(qringbuffer_p.h:77)
- | | | ->98.95% (2,566,736,443B) 0x5B0880E: 
QProcessPrivate::tryReadFromChannel(QProcessPrivate::Channel*) 
(qprocess.cpp:1020)
- | | |   ->98.95% (2,566,724,080B) 0x5B08CCE: 
QProcess::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) 
(qprocess.cpp:1081)
- | | |   | ->98.95% (2,566,724,080B) 0x5B986D9: 
QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3771)
- | | |   |   ->98.95% (2,566,724,080B) 0x5BA3F17: 
QSocketNotifier::activated(int, QSocketNotifier::QPrivateSignal) 
(moc_qsocketnotifier.cpp:136)
- | | |   |     ->98.95% (2,566,724,080B) 0x5BA425F: 
QSocketNotifier::event(QEvent*) (qsocketnotifier.cpp:266)
- | | |   |       ->98.95% (2,566,724,080B) 0x4EA049F: 
QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3727)
- | | |   |         ->98.95% (2,566,724,080B) 0x4EA7ADE: 
QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3486)
- | | |   |           ->98.95% (2,566,724,080B) 0x5B6F497: 
QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1048)
- | | |   |             ->98.95% (2,566,724,080B) 0x5BC1D68: 
socketNotifierSourceDispatch(_GSource*, int (*)(void*), void*) 
(qcoreapplication.h:234)
- | | |   |               ->98.95% (2,566,724,080B) 0x76D8C3C: 
g_main_context_dispatch (gmain.c:3182)
- | | |   |                 ->98.95% (2,566,724,080B) 0x76D8ED6: 
g_main_context_iterate.isra.26 (gmain.c:3920)
- | | |   |                   ->98.95% (2,566,724,080B) 0x76D8F6A: 
g_main_context_iteration (gmain.c:3981)
- | | |   |                     ->98.95% (2,566,719,959B) 0x5BC1141: 
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 
(qeventdispatcher_glib.cpp:423)
- | | |   |                     | ->98.95% (2,566,719,959B) 0xB471E4F: 
QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 
(qeventdispatcher_glib.cpp:69)
- | | |   |                     |   ->98.95% (2,566,719,959B) 0x5B6E169: 
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:214)
- | | |   |                     |     ->98.95% (2,566,719,959B) 0x5B762E0: 
QCoreApplication::exec() (qcoreapplication.cpp:1336)
- | | |   |                     |       ->98.95% (2,566,719,959B) 0x113C26: 
main (main.cpp:70)
- 
- I'm not too familiar with Qt, so I'm not sure how to interpret that. It
- looks like an event handler but none of the functions named there are
- obviously part of this application.
- 
- ProblemType: Bug
- DistroRelease: Ubuntu 18.10
- Package: lxqt-session 0.13.0-0ubuntu2
- ProcVersionSignature: Ubuntu 4.18.0-17.18-generic 4.18.20
- Uname: Linux 4.18.0-17-generic x86_64
- NonfreeKernelModules: nvidia_modeset nvidia
- ApportVersion: 2.20.10-0ubuntu13.2
- Architecture: amd64
- CurrentDesktop: LXQt
- Date: Fri Apr  5 16:21:53 2019
- ExecutablePath: /usr/bin/lxqt-session
- InstallationDate: Installed on 2018-08-12 (236 days ago)
- InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 
(20180725)
- ProcEnviron:
-  PATH=(custom, user)
-  XDG_RUNTIME_DIR=<set>
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
- SourcePackage: lxqt-session
- UpgradeStatus: Upgraded to cosmic on 2018-11-28 (128 days ago)
+ AFFECTED VERSIONS
+ 0.13.0-0ubuntu2
+ 0.14.1-0ubuntu1

** Summary changed:

- runaway high memory usage in lxqt-session
+ lxqt-session allocates memory for process output never read

** Tags added: disco lubuntu

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

Title:
  lxqt-session allocates memory for process output never read

To manage notifications about this bug go to:
https://bugs.launchpad.net/lxqt/+bug/1823416/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to