You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
omarchy-menu-keybindings: mock 'noop' table causes unbounded infinite loop and 100% CPU when config iterates with ipairs #12124
When pressing SUPER + K (or running omarchy menu keybindings / omarchy-menu-keybindings), if the user's Hyprland Lua configuration (or any module it requires) uses ipairs() on a function call or table that falls back to the mock noop object (for example, ipairs(hl.get_windows() or {})), the subshell Lua process enters an infinite loop, never exits, and spins at 100% CPU.
Each time SUPER + K is pressed, another un-reaped lua process is spawned and pegs a CPU core permanently.
Steps to Reproduce
In ~/.config/hypr/hyprland.lua (or a required module), add any standard Lua loop that iterates over a mockable Hyprland API, such as:
for_, winipairs(hl.get_windows() or {}) do-- window handling logicend
(Note: This is completely valid Lua inside the real Hyprland compositor).
Clear the keybindings cache:
rm -f ~/.cache/omarchy/keybindings-*.records
Press SUPER + K or execute:
omarchy-menu-keybindings --print
Observe that the command never completes, and ps aux | grep lua shows a lua process consuming 100% CPU.
Root Cause
In /usr/share/omarchy/bin/omarchy-menu-keybindings:
omarchy-menu-keybindings parses user keybindings by executing dofile("~/.config/hypr/hyprland.lua") in a standalone lua subshell.
To avoid crashes on unhandled Hyprland APIs, it falls back to a recursive noop mock.
However, in Lua, ipairs(t) iterates sequentially (t[1], t[2], t[3], ...) until the table returns nil. Because noop's __index returns noop (which is truthy) for all keys, noop[1], noop[2], etc. are never nil. As a result, ipairs(noop) becomes an infinite loop.
Proposed Solution
In /usr/share/omarchy/bin/omarchy-menu-keybindings, update noop so that numeric index lookups return nil:
Confirmed from source on current quattro (9480d1b): build_lua_bind_cache() in bin/omarchy-menu-keybindings still runs hyprland.lua under a stub hl whose noop fallback answers every key with itself (lines 209–217). hl.get_windows() returns noop, which is truthy, so or {} never applies, and ipairs never reaches a nil. pcall catches errors but not a loop that never ends, and nothing time-boxes the scan, so the lua process spins until killed. The same report is open as #7025, which is where the earlier duplicates were closed into.
The fix is already an open pull request: #7564 makes noop answer nil for numeric keys, which is the change proposed here, and wraps the scan in timeout 10. It already lists this issue as one it closes. It no longer applies cleanly to quattro, though. It was written against an older copy of the script, so bringing it up to date has to keep the scan's current lua -E - invocation and its cache key bump has to move past v15. Its test's extractor also matches the old invocation only. #11733 and #14128 take other approaches to the same hang.
Checked by Claude Opus 5.5 and Codex Medium as a second opinion, each reading the script and #7564's diff. Codex agreed on the mechanism and the fix, and found the conflicts with current quattro described above. Nothing was run for this issue: the cause is plain from the source, and #7564 will be tested as its own item. The bug is fixed when #7564, or one of the alternatives, lands, so this waits on the maintainer.
Still present on quattro: the noop stub answers numeric keys with itself, so ipairs(hl.get_windows()) never terminates. Same root cause as #15216, #14302, #14243, #7025.
Canonical tracker — please dup the others here (or to whichever fix PR lands). A fix hunk also lives inside the #12155 bundle; prefer a single-purpose PR.
Re-checked since my last comment. The bug is unchanged, and so is the fix side: #7564 still lists this issue among the ones it closes, and #12712, #14128 and #11733 are still open as other approaches to the same hang. Choosing between them is the maintainer's call.
This report and #7025 describe the same stub noop loop in bin/omarchy-menu-keybindings, and #14243, #14302 and #15216 look like the same again. I asked whether to close this one into #7025, the older report. Claude Opus 5.5 read both as the same bug, but Codex Medium, asked separately from the two reports alone, did not agree, so this stays open. Which report becomes the tracker is left to the maintainer, and whichever fix lands closes it, since #7564 already links both.
Nothing was run for this re-check. This waits on the maintainer.
Activity
omarchybot commentedon Oct 12, 2026
Confirmed from source on current
quattro(9480d1b):build_lua_bind_cache()inbin/omarchy-menu-keybindingsstill runshyprland.luaunder a stubhlwhosenoopfallback answers every key with itself (lines 209–217).hl.get_windows()returnsnoop, which is truthy, soor {}never applies, andipairsnever reaches anil.pcallcatches errors but not a loop that never ends, and nothing time-boxes the scan, so theluaprocess spins until killed. The same report is open as #7025, which is where the earlier duplicates were closed into.The fix is already an open pull request: #7564 makes
noopanswernilfor numeric keys, which is the change proposed here, and wraps the scan intimeout 10. It already lists this issue as one it closes. It no longer applies cleanly toquattro, though. It was written against an older copy of the script, so bringing it up to date has to keep the scan's currentlua -E -invocation and its cache key bump has to move pastv15. Its test's extractor also matches the old invocation only. #11733 and #14128 take other approaches to the same hang.Checked by Claude Opus 5.5 and Codex Medium as a second opinion, each reading the script and #7564's diff. Codex agreed on the mechanism and the fix, and found the conflicts with current
quattrodescribed above. Nothing was run for this issue: the cause is plain from the source, and #7564 will be tested as its own item. The bug is fixed when #7564, or one of the alternatives, lands, so this waits on the maintainer.jandrusk commentedon Oct 13, 2026
Still present on
quattro: thenoopstub answers numeric keys with itself, soipairs(hl.get_windows())never terminates. Same root cause as #15216, #14302, #14243, #7025.Canonical tracker — please dup the others here (or to whichever fix PR lands). A fix hunk also lives inside the #12155 bundle; prefer a single-purpose PR.
omarchybot commentedon Oct 14, 2026
Re-checked since my last comment. The bug is unchanged, and so is the fix side: #7564 still lists this issue among the ones it closes, and #12712, #14128 and #11733 are still open as other approaches to the same hang. Choosing between them is the maintainer's call.
This report and #7025 describe the same stub
nooploop inbin/omarchy-menu-keybindings, and #14243, #14302 and #15216 look like the same again. I asked whether to close this one into #7025, the older report. Claude Opus 5.5 read both as the same bug, but Codex Medium, asked separately from the two reports alone, did not agree, so this stays open. Which report becomes the tracker is left to the maintainer, and whichever fix lands closes it, since #7564 already links both.Nothing was run for this re-check. This waits on the maintainer.