0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/config
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
..
environments DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
initializers DEBUG: instrument MiniRacer::ScriptTerminatedError (revert before merge) 2026-06-23 13:18:35 +00:00
locales SECURITY: Potential DoS on posts requests (#41092) 2026-06-22 14:02:03 -04:00
application.rb DEV: Rename EmberCli to EmberAssets (#40938) 2026-06-16 12:56:56 +02:00
boot.rb DEV: Change test formatters (#39427) 2026-04-22 12:26:07 +02:00
cdn.yml.sample
database.yml DEV: Support per-unicorn-worker DB variable overrides (#35615) 2025-10-27 13:45:27 +08:00
deploy.rb.sample
dev_defaults.yml DEV: Add admin_dashboard:populate rake task to seed Site Traffic (#39775) 2026-05-06 12:07:47 +08:00
discourse.config.sample
discourse.pill.sample DEV: Move puma to test-only dependency (#38652) 2026-03-18 05:23:12 +08:00
discourse_defaults.conf FEATURE: Add opt-in IAM role assumption for S3 operations (#39174) 2026-04-15 04:29:50 +08:00
environment.rb DEV: Add env var for local email port (#36900) 2025-12-31 14:25:02 +10:00
logrotate.conf
multisite.yml.production-sample
nginx.sample.conf FIX: nginx sample configuration should be setting x-f-f to the end user IP 2026-06-16 16:24:15 -04:00
official_plugins.json DEV: Drop d-teambuild from CI (#39417) 2026-04-21 17:43:19 +01:00
pitchfork.conf.rb DEV: Rename EmberCli to EmberAssets (#40938) 2026-06-16 12:56:56 +02:00
projections.json DEV: Prepare for rename of app/assets/javascripts/ -> frontend/ 2025-10-22 16:24:11 +01:00
routes.rb FEATURE: Accept shared files via the Web Share Target (#41030) 2026-06-18 17:35:09 -03:00
sidekiq.yml
site_settings.yml DEV: Track beacon browser pageviews behind dashboard_improvements (#40934) 2026-06-23 10:21:39 +08:00
spring.rb
thin.yml.sample
unicorn_launcher DEV: Enable Pitchfork by default (#37679) 2026-02-11 11:52:39 +01:00