Skip to content

Conversation

@jorgecuesta
Copy link
Contributor

Summary

  • Fix data races in parallel relay handling by using shared pond worker pool with channel-based observation collection
  • Fix nil pointer dereferences in metrics processing functions with proper nil checks
  • Fix array bounds panic in qos/evm/context.go with defensive bounds checking
  • Fix copylocks issue by passing archivalState by pointer instead of value
  • Add race detection infrastructure (Dockerfile.race, make e2e_test_race)

Test plan

  • Unit tests pass (make test_unit)
  • Linter passes (make go_lint)
  • E2E tests pass (make e2e_test eth)
  • E2E tests with race detection pass (make e2e_test_race eth)

Release 1 of quality review - addresses critical runtime panics:

1. Data Race Fixes (parallel relay handling):
   - Replace per-request worker pools with single shared pond pool
   - Use channel-based observation collection for thread-safety
   - Add proper mutex protection for concurrent map access

2. Nil Pointer Dereference Fixes:
   - Add nil checks in metrics processing functions
   - Add safe type assertions with ok checks
   - Add defensive nil checks for archival state config

3. Array Bounds Panic Fix:
   - Add bounds check in qos/evm/context.go before array access
   - Add getGenericResponseNoEndpointResponse error handler

4. Copylocks Fix:
   - Change archivalState parameter to pointer to avoid mutex copy

5. Race Detection Infrastructure:
   - Add Dockerfile.race for race detection builds
   - Add make e2e_test_race target
   - E2E tests pass with -race flag
@jorgecuesta jorgecuesta self-assigned this Nov 27, 2025
@jorgecuesta jorgecuesta requested a review from oten91 November 27, 2025 21:59
@jorgecuesta jorgecuesta added the bug Something isn't working label Nov 27, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Shannon Nov 27, 2025
@jorgecuesta jorgecuesta moved this from 📋 Backlog to 🔖 Ready in Shannon Nov 27, 2025
@oten91 oten91 merged commit 3e061f4 into main Nov 27, 2025
17 of 19 checks passed
@oten91 oten91 deleted the fix/critical-panic-fixes branch November 27, 2025 22:49
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in Shannon Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants