0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/config/initializers
David Taylor 1fd0efc849 DEBUG: instrument MiniRacer::ScriptTerminatedError (revert before merge)
Temporary instrumentation to diagnose the ScriptTerminatedError that appears in single-threaded mode after the mini_racer 0.21.0 -> 0.21.3 upgrade (e.g. spec/system/table_builder_spec.rb, raised from PrettyText.cook during fab!/create_post setup).

Local reproduction shows no genuine 25s slowdown: idle cooks are ~19ms on both versions, and the per-callback regression in single-threaded mode (0.21.1+ routes js->ruby callbacks through the dedicated runner thread instead of inline, ~30x slower per callback) is nowhere near enough to hit the 25s watchdog. The open question is whether CI is hitting the watchdog at all, or whether the cook is being aborted instantly — 0.21.3 wires an rb_nogvl unblock function that calls v8_terminate_execution on any interrupt, where 0.21.0 passed a NULL ubf and deferred interrupts until the eval finished.

This prepends to MiniRacer::Context and, on every ScriptTerminatedError, logs the elapsed time of that eval/call (≈25000ms => real watchdog timeout; tiny => instant abort) plus a backtrace snapshot of every live thread, and logs stop/dispose so a concurrent terminator on the shared context is visible. Verified locally: transparent to normal cooks, fires on forced termination.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 13:18:35 +00:00
..
000-active_record.rb FEATURE: discourse-workflows (#40374) 2026-05-28 19:44:50 +02:00
000-development_reload_warnings.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
000-mini_racer.rb DEV: Add experimental DISCOURSE_MINI_RACER_SINGLE_THREADED (#38119) 2026-02-27 15:57:02 +00:00
000-mini_sql.rb
000-pg_connection_patch.rb DEV: Fix assigned but unused variable Prism warnings (#39436) 2026-04-22 12:42:14 +02:00
000-post_migration.rb
000-trace_pg_connections.rb DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
000-zeitwerk.rb DEV: Remove Unicorn web server in favor of Pitchfork (#39032) 2026-04-01 15:04:59 +02:00
001-redis.rb
002-freedom_patches.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
002-rails_failover.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
004-message_bus.rb DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
005-site_settings.rb DEV: Enable Style/RedundantBegin rubocop rule (#40096) 2026-05-19 18:44:54 +02:00
006-mini_profiler.rb DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
008-rack-cors.rb DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
009-omniauth.rb DEV: Show unauthorized message when OAuth::Unauthorized is hit (#37776) 2026-02-12 13:41:33 -05:00
012-category_types.rb FEATURE: add category type configuration system (#37929) 2026-02-27 13:20:17 +10:00
012-web_hook_events.rb Add user_anonymized webhook event (#36208) 2025-11-25 07:43:16 -08:00
014-track-setting-changes.rb Revert "FEATURE: discourse-workflows (#39704)" (#40366) 2026-05-28 13:59:42 +01:00
015-track-upcoming-change-toggle.rb FEATURE: Enable high context topic cards in Horizon by default (#39959) 2026-05-15 10:50:42 +10:00
099-anon-cache.rb
099-drain_pool.rb
099-mini_racer_debug.rb DEBUG: instrument MiniRacer::ScriptTerminatedError (revert before merge) 2026-06-23 13:18:35 +00:00
100-active-support-type-extensions.rb DEV: Add symbol to ActiveModel attribute types (#36420) 2025-12-03 10:57:44 +01:00
100-anonymous_actions.rb FEATURE: Prompt anonymous users to sign up after engagement clicks (#40256) 2026-05-26 09:30:38 +02:00
100-custom-timezones.rb DEV: maps IST rails timezone to kolkata (#32896) 2025-05-26 08:56:04 +02:00
100-flags.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
100-i18n.rb FIX: Purge ExtraLocalesController cache correctly for multisite (#32654) 2025-05-08 23:52:45 +01:00
100-logster.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
100-oj.rb DEV: Update multi_json to 1.20.1 (#39627) 2026-04-29 11:38:36 +02:00
100-onebox_options.rb DEV: Add a user agent to all HTTP requests that Discourse makes. (#31555) 2025-03-03 16:32:25 +11:00
100-quiet_logger.rb DEV: Upgrade Rails to version 7.1 2024-07-04 10:58:21 +02:00
100-regex-timeout.rb
100-secret_token.rb
100-session_store.rb DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
100-sidekiq.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
100-silence_logger.rb DEV: Upgrade Rails to version 7.1 2024-07-04 10:58:21 +02:00
100-strong_parameters.rb
100-verify_config.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
100-wrap_parameters.rb
101-lograge.rb DEV: Enable Style/RedundantBegin rubocop rule (#40096) 2026-05-19 18:44:54 +02:00
102-truncate-logs.rb DEV: Upgrade Rails to version 7.1 2024-07-04 10:58:21 +02:00
200-first_middlewares.rb DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
300-nested-replies.rb FEATURE: First iteration of nested replies (#38888) 2026-04-16 08:06:44 -05:00
300-perf.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
400-deprecations.rb
999-themes.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
assets.rb DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
filter_parameter_logging.rb