This project attempts to reproduce the segmentation fault issue #55132 in ActionController::Live
related to "double concurrent PG#close" crashes.
docker-compose -f ./docker/docker-compose.crash-reproduction.yml up -d --build
docker exec -it docker-rails-crash-test-1 bash
ruby crash_test.rb
After reproducing the error the code will spit out this:
2e31df89eed2:/app# ruby crash_test.rb
β’οΈ ULTRA-NUCLEAR CRASH TEST - Maximum Destruction + Kernel Chaos!
====================================================================
Testing ActionController::Live crash reproduction with ULTRA-NUCLEAR pressure
β
Basic components loaded successfully
π§ͺ Testing ActionController::Live with ULTRA-NUCLEAR race conditions...
π§ͺ Creating ultra nuclear test controller...
β
Ultra nuclear test controller created successfully
β οΈ If a segmentation fault occurs, check for core dumps in /tmp/core_dumps/
β οΈ This test uses KERNEL SIGNALS, MMAP CORRUPTION, FORK BOMBS, and ATTOSECOND timing!
β οΈ THIS IS THE ULTIMATE TEST - IF THIS DOESN'T CRASH, NOTHING WILL!
π Starting ULTRA-NUCLEAR streaming test in thread 1160
β οΈ Setting up ULTRA-NUCLEAR signal handlers for maximum chaos...
π ITERATION 1 - ULTRA-NUCLEAR DESTRUCTION!
β’οΈ Creating ULTRA-NUCLEAR pressure...
π Creating ultra file descriptor pressure...
πΊοΈ Creating memory mapping corruption...
β
Created 10 corrupted memory mappings
β
Created 3100 ultra nuclear pressure objects
β
Created 200 file descriptors
β
Created 10 memory mappings
π Creating ULTRA-NUCLEAR PostgreSQL connections...
β
Connection 1 created (PID: 8248)
β
Connection 2 created (PID: 8249)
β
Connection 3 created (PID: 8250)
β
Connection 4 created (PID: 8251)
β
Connection 5 created (PID: 8252)
β οΈ Simulating ULTRA-NUCLEAR race conditions...
π€ Simulating streaming response with ULTRA-NUCLEAR precision...
β
ITERATION 1 completed
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
message type 0x54 arrived from server while idle
message type 0x44 arrived from server while idle
message type 0x43 arrived from server while idle
message type 0x5a arrived from server while idle
message type 0x54 arrived from server while idle
message type 0x44 arrived from server while idle
message type 0x43 arrived from server while idle
message type 0x5a arrived from server while idle
message type 0x44 arrived from server while idle
message type 0x54 arrived from server while idle
message type 0x54 arrived from server while idle
message type 0x44 arrived from server while idle
message type 0x43 arrived from server while idle
message type 0x5a arrived from server while idle
message type 0x54 arrived from server while idle
message type 0x44 arrived from server while idle
message type 0x43 arrived from server while idle
message type 0x5a arrived from server while idle
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
π Thread 1232 executed query on connection
π¨ DOUBLE CLOSE: Thread 1232 closing connection
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
another command is already in progress
another command is already in progress
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
π Thread 1256 executed query on connection
π¨ DOUBLE CLOSE: Thread 1256 closing connection
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
another command is already in progress
π§Ή Thread 1272 closed connection (3)
π Thread 1168 executed query on connection
π¨ DOUBLE CLOSE: Thread 1168 closing connection
π¨ SENT SIGNAL USR1 during double close!
π Thread 1192 executed query on connection
π¨ DOUBLE CLOSE: Thread 1192 closing connection
π¨ SENT SIGNAL USR2 during double close!
π Thread 1216 executed query on connection
π¨ DOUBLE CLOSE: Thread 1216 closing connection
π¨ SENT SIGNAL USR2 during double close!
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
π§Ή Thread 1288 closed connection (1)
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR1 during close attempt!
β Error in ultra nuclear race condition thread: IOError: stream closed in another thread
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
another command is already in progress
another command is already in progress
π§Ή Thread 1240 closed connection (6)
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
another command is already in progress
another command is already in progress
π Thread 1248 executed query on connection
π¨ DOUBLE CLOSE: Thread 1248 closing connection
π Thread 1264 executed query on connection
π¨ DOUBLE CLOSE: Thread 1264 closing connection
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
another command is already in progress
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
another command is already in progress
π Thread 1176 executed query on connection
π¨ DOUBLE CLOSE: Thread 1176 closing connection
π¨ SENT SIGNAL USR1 during double close!
π¨ SENT SIGNAL USR2 during close attempt!
β
Created 20 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
π Thread 1200 executed query on connection
π¨ DOUBLE CLOSE: Thread 1200 closing connection
π¨ SENT SIGNAL USR1 during double close!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
π Thread 1224 executed query on connection
π¨ DOUBLE CLOSE: Thread 1224 closing connection
π¨ SENT SIGNAL USR2 during double close!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
another command is already in progress
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π Thread 1184 executed query on connection
π¨ DOUBLE CLOSE: Thread 1184 closing connection
π¨ SENT SIGNAL USR1 during double close!
π¨ SENT SIGNAL USR1 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β
Created 30 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π Thread 1208 executed query on connection
π¨ DOUBLE CLOSE: Thread 1208 closing connection
π¨ SENT SIGNAL USR1 during double close!
π¨ SENT SIGNAL USR2 during double close!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
π§Ή Thread 1280 closed connection (4)
β Error closing connection: PG::ConnectionBad: connection is closed
β Error in ultra nuclear race condition thread: PG::UnableToSend: PQsendQuery another command is already in progress
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR1 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
π¨ SENT SIGNAL USR2 during close attempt!
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β
Created 40 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β Error closing connection: PG::ConnectionBad: connection is closed
β
Created 50 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 60 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 70 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 80 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 90 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 100 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 110 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 120 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 130 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 140 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 150 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 160 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 170 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 180 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 190 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 200 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 210 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 220 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 230 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 240 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 250 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 260 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 270 corrupted memory mappings
π¨ SIGNAL USR1 received during race condition!
πΎ Forced garbage collection during signal!
πΊοΈ Creating memory mapping corruption...
β
Created 280 corrupted memory mappings
π¨ SIGNAL USR2 received during double close!
πΎ Created ultra memory pressure during signal!
π₯ Triggering process-level chaos...
π¨ FORK BOMB 1 created during signal!
crash_test.rb:268: [BUG] Segmentation fault at 0x00000000000025f1SEGV received in SEGV handler
SEGV received in SEGV handler
ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [x86_64-linux-musl]
-- Control frame information -----------------------------------------------
Aborted
2e31df89eed2:/app#