Bug 513197

Summary: Creating ⪆ 111 tabs causes the shell to render error messages, rarely as text, more frequently as “□”. If interacted with, or if the user creates > 10 more tabs, Konsole forcefully closes, causing some shells to SEGV
Product: [Applications] konsole Reporter: Roke Julian Lockhart Beedell <4wy78uwh>
Component: single-processAssignee: Konsole Bugs <konsole-bugs-null>
Status: REPORTED ---    
Severity: minor CC: christoph
Priority: NOR    
Version First Reported In: 25.08.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
URL: https://discussion.fedoraproject.org/t/why-does-debuginfod-lack-symbols-for-dotnet-packages/156270/15
See Also: https://github.com/lxqt/qterminal/issues/1309#issuecomment-3633388780
https://bugzilla.redhat.com/show_bug.cgi?id=2420701
https://bugs.kde.org/show_bug.cgi?id=513666
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/332360/events/4ffa7f3eaa85413ca8df1140a290e1cd/
Attachments: A Screenshot Of The “□”s
A Screenshot Of The Invisible Window
A Screencast That Depicts How To Consistently Reproduce The Problem
A Screenshot Of > 111 Tabs Existing

Description Roke Julian Lockhart Beedell 2025-12-10 22:36:21 UTC
Created attachment 187508 [details]
A Screenshot Of The “□”s

# SUMMARY

Creating ⪆ 111 tabs causes the shell to render error messages, rarely as text, more frequently as “□”. If interacted with, or if the user creates > 10 more tabs, Konsole forcefully closes, causing some shells to SEGV.

# STEPS TO REPRODUCE

1.	Invoke Konsole.

2.	Create ⪆ 111 tabs to produce the two lines of “□”s.

	At this point, if one interacts with the tab, the effect is problematic, and detailed below. Similarly, if the user moves the Konsole window, the effect is also problematic, and detailed below.

3.	Create ⪆ 137 tabs, to cause at least "xdg_surface#46: error 3: attached a buffer before configure event" to appear.

Because Konsole disables holding the Control + Shift + T keys, utilise the undermentioned pseudocode as a reference for how to automate this. However, I'll note that this merely requires 20 s by hand, so it's solely worth automating if you've an RSI.

~~~
#!/usr/bin/env sh
plasmashell &
pkcon install konsole && \
konsole &
pkcon install kdotool && \
kdotool search --class konsole windowactivate && \
pkcon install ydotool && \
run0 ydotoold && \
run0 "$(echo $0) -c 'while true; do ydotool key 29:1 42:1 20:1 20:0 42:0 29:0; done' && \
konsole -c "$(echo $0) -c \"time while true; do kquitapp6 plasmashell; done\""
~~~

# OBSERVED RESULT

If one creates ⋛ 112 tabs, then right-clicks, or selects, the “□”s, the terminal closes with “file descriptor expected, object (57), message send(sh)”.

If, instead, they move it, the window disappears, and a thumbnail cannot be generated for it by `plasmashell`'s Task Manager.

However, if one merely creates ⪆ 137 tabs, as above, they see a subset (at least) of:

~~~
RokeJulianLockhart@Beedell:~$ konsole
QProcess: Cannot create pipe (Too many open files)
QProcess: Cannot create pipe (Too many open files)
kf.pty: Can't open a pseudo teletype
org.kde.konsole: foregroundProcessGroup master_fd < 0
org.kde.konsole: foregroundProcessGroup master_fd < 0
QProcess: Cannot create pipe (Too many open files)
QProcess: Cannot create pipe (Too many open files)
org.kde.konsole: foregroundProcessGroup master_fd < 0
org.kde.konsole: foregroundProcessGroup master_fd < 0
kf.pty: Can't open a pseudo teletype
org.kde.konsole: foregroundProcessGroup master_fd < 0
org.kde.konsole: foregroundProcessGroup master_fd < 0
QProcess: Cannot create pipe (Too many open files)
QProcess: Cannot create pipe (Too many open files)
QWaylandShmBuffer: failed: Too many open files
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::save: Painter not active
QPainter::setBrush: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::save: Painter not active
QPainter::setBrush: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::setClipRegion: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::drawPath: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setPen: Painter not active
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::save: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::drawRects: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::save: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::drawRects: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::save: Painter not active
QPainter::save: Painter not active
QPainter::hasClipping: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
xdg_surface#46: error 3: attached a buffer before configure event
The Wayland connection experienced a fatal error: Protocol error
~~~

# EXPECTED RESULT

Instead of allowing me to create 111 tabs, Konsole should at least warn me of the consequences, and provide user interaction to create the 111th. Otherwise, it should not permit > 110 tabs.

# SOFTWARE/OS VERSIONS

~~~
Name        : konsole
Version     : 25.08.3
Release     : 1.fc43
Architecture: x86_64
Install Date: Sat 15 Nov 2025 16:00:29 GMT
Signature   :
              RSA/SHA256, Thu 13 Nov 2025 14:09:56 GMT, Key ID 829b606631645531
Build Date  : Wed 12 Nov 2025 21:02:07 GMT
Build Host  : buildvm-x86-24.rdu3.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
Bug URL     : https://bugz.fedoraproject.org/konsole
~~~

# ADDITIONAL INFORMATION

This was originally noticed when diagnosing < https://github.com/lxqt/qterminal/issues/1309#issuecomment-3633388780, which demonstrates this affects any terminal Similarly, what https://discussion.fedoraproject.org/t/why-does-debuginfod-lack-symbols-for-dotnet-packages/156270/15 cites demonstrates that this affects any shell.
Comment 1 Roke Julian Lockhart Beedell 2025-12-10 23:10:13 UTC
Created attachment 187511 [details]
A Screenshot Of The Invisible Window

This required some serious wrangling to capture; it's solely possible with fast reflexes, and `sleep $number; spectacle --windowundercursor`. Otherwise, the window disappears.
Comment 2 Roke Julian Lockhart Beedell 2025-12-10 23:57:54 UTC
Created attachment 187513 [details]
A Screencast That Depicts How To Consistently Reproduce The Problem

Originally created for https://bugzilla.redhat.com/show_bug.cgi?id=2420701#c16:~:text=attachment%202118325%20%5Bdetails%5D-,A%20Screencast%20That%20Depicts%20How%20To%20Consistently%20Reproduce%20The%20Problem,-Thanks!%20Regarding%20%E2%80%9CDo, but is of use here, too, for it demonstrates that this isn't pleasant for some shells. However, this problem is inherently subordinate to all shells being forcefully lost, which affects `bash`, too.
Comment 3 Christoph Cullmann 2025-12-20 18:03:10 UTC
This more looks like a resource exhaustion:

QProcess: Cannot create pipe (Too many open files)
QProcess: Cannot create pipe (Too many open files)

Could you increase the allowed number of open files on your system?
Comment 4 Roke Julian Lockhart Beedell 2025-12-21 16:35:34 UTC
Created attachment 187852 [details]
A Screenshot Of > 111 Tabs Existing

(In reply to Christoph Cullmann from comment #3)

Indeed, https://stackoverflow.com/revisions/34645/3#:~:text=ulimit%20%2Dn works:

> ~~~
> The Wayland connection experienced a fatal error: Protocol error
> RokeJulianLockhart@Beedell:~$ ulimit -n 10000
> RokeJulianLockhart@Beedell:~$ konsole
> kf.windowsystem: static int KX11Extras::currentDesktop() may only be used on X11
> kf.windowsystem: static void KX11Extras::setOnDesktop(WId, int) may only be used on X11
> ~~~

Therefore, I suppose that Konsole should take into account the current limit.
Comment 5 Christoph Cullmann 2025-12-21 18:08:43 UTC
I am not sure if it is really feasible to properly check for that kind of resource limits with reasonable effort.
Comment 6 Roke Julian Lockhart Beedell 2025-12-24 10:57:00 UTC
No worries; Wayland's not going anywhere, nor is Konsole, so we're in no rush. If it's not too difficult to explain, however, might I know what's difficult? I presumed that it would be a matter of checking what the relevant `ulimit` is, and then ensure that the amount of tabs doesn't exceed it. Is it not 1:1?