Copying output from console causes large mem usage/OOM #887

issue fanquake openend this issue on September 4, 2025
  1. fanquake commented at 2:23 pm on September 4, 2025: member

    Moved from https://github.com/bitcoin/bitcoin/issues/33285.

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    Running the GUI on mainnet, I open the console, run:

    getblocktemplate '{"rules": ["segwit"]}'

    everything acts normally until then. If I then try to copy the test, memory usage blows out:

    on release build, jumps from <2GB to >7GB memory

    on debug build, it jumps to dozens of GB, often causing OOM and kills the process.

    Expected behaviour

    I expect the memory usage to not blow up on basic operations.

    Steps to reproduce

    Already detailed.

    Relevant log output

    No logs after the block generated is tested for validity.

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master@7e58c94112d0

    Operating system and version

    Ubuntu 24.04.2 LTS

    Machine specifications

    64GB of memory

  2. hebasto commented at 2:23 pm on September 6, 2025: member

    I can confirm this issue on Ubuntu 24.04 with the system’s Qt 6.4.2.

    However, a static build using Qt 6.7.3 from depends works perfectly. Perhaps this Qt issue was resolved upstream at some point?

  3. davidgumberg commented at 6:38 pm on September 9, 2025: contributor

    However, a static build using Qt 6.7.3 from depends works perfectly. Perhaps this Qt issue was resolved upstream at some point?

    I experience this issue linking against system Qt 6.9.1, so I do not think this has been fixed upstream.

    But in our depends build we set -no-feature-textmarkdownwriter:

    https://github.com/bitcoin-core/gui/blob/689a32197638e92995dd8eb071425715f5fdc3a4/depends/packages/qt.mk#L103

    and when that feature is disabled, QTextEditMimeData won’t try to convert the selection to markdown, avoiding the problematic function:

    0void QTextEditMimeData::setup() const
    1{
    2    // [ Populate other mime data formats... ]
    3#if QT_CONFIG(textmarkdownwriter)
    4    that->setData("text/markdown"_L1, fragment.toMarkdown().toUtf8());
    5#endif
    6    that->setText(fragment.toPlainText());
    7}
    

    https://github.com/qt/qtbase/blob/b617d1176593963a2a9ed21dd5d9a63e84a09400/src/widgets/widgets/qwidgettextcontrol.cpp#L3538-L3540

  4. hebasto renamed this:
    GUI (?): Copying output from console causes large mem usage/OOM
    Copying output from console causes large mem usage/OOM
    on Sep 10, 2025
  5. hebasto referenced this in commit ee42d59d4d on Sep 10, 2025
  6. hebasto closed this on Sep 10, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-09-16 08:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me