Skip to content

Fix TuiMonitor when using SimpleRestartingEventManager#3846

Open
Ollrogge wants to merge 1 commit into
AFLplusplus:mainfrom
Ollrogge:fix_tui
Open

Fix TuiMonitor when using SimpleRestartingEventManager#3846
Ollrogge wants to merge 1 commit into
AFLplusplus:mainfrom
Ollrogge:fix_tui

Conversation

@Ollrogge

Copy link
Copy Markdown

Description

As discussed in #3154, TuiMonitor can show an empty UI when used with restarting event managers.

The issue is that TuiMonitor starts its rendering thread during construction. Restarting managers such as SimpleRestartingEventManager and the LLMP restarting manager used by Launcher fork after the monitor has been constructed. After fork, only the calling thread exists in the child process, so the broker child receives and updates fuzzing stats but the TUI rendering thread doesn't exist.

This PR fixes the issue by starting the TUI rendering thread lazily on the first display call instead of during monitor construction. This ensures the rendering thread is created in the broker process, where monitor updates are applied.

Checklist

  • I have run ./scripts/precommit.sh and addressed all comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant