Skip to content

core/web: support pprof for loop plugins#21120

Merged
jmank88 merged 1 commit intodevelopfrom
BCF-3493-loopp-pprof
Mar 5, 2026
Merged

core/web: support pprof for loop plugins#21120
jmank88 merged 1 commit intodevelopfrom
BCF-3493-loopp-pprof

Conversation

trunk-io[bot]

This comment was marked as outdated.

@trunk-io
Copy link

trunk-io bot commented Feb 11, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@jmank88 jmank88 force-pushed the BCF-3493-loopp-pprof branch from 1d98288 to 7d9b33c Compare February 16, 2026 18:37
@jmank88 jmank88 requested a review from krehermann February 16, 2026 18:56
@jmank88 jmank88 force-pushed the BCF-3493-loopp-pprof branch 2 times, most recently from 5c707fe to 94d235a Compare February 16, 2026 19:07
trunk-io[bot]

This comment was marked as outdated.

@jmank88 jmank88 force-pushed the BCF-3493-loopp-pprof branch from 94d235a to 850ea66 Compare February 16, 2026 19:43
trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

@jmank88 jmank88 force-pushed the BCF-3493-loopp-pprof branch from 850ea66 to 82fe2c3 Compare February 16, 2026 20:42
trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

@jmank88 jmank88 force-pushed the BCF-3493-loopp-pprof branch from 82fe2c3 to fe61307 Compare February 16, 2026 21:14
trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

trunk-io[bot]

This comment was marked as outdated.

@jmank88 jmank88 force-pushed the BCF-3493-loopp-pprof branch 2 times, most recently from a650a13 to 27dece7 Compare February 17, 2026 14:56
@jmank88 jmank88 force-pushed the BCF-3493-loopp-pprof branch from 4d81260 to dc27de1 Compare March 4, 2026 22:01
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

✅ No conflicts with other open PRs targeting develop

@jmank88 jmank88 force-pushed the BCF-3493-loopp-pprof branch from dc27de1 to 0d16149 Compare March 4, 2026 22:13
@jmank88 jmank88 requested a review from amit-momin March 4, 2026 22:13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test ensures that the command is successful, and that it creates the expected directories

@cl-sonarqube-production
Copy link

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Test Results: Mailbox Monitor Startup Timeout

Affected failures:

  1. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_Solana2EVM_LOOPP
  2. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_token_transfer_test.go:*_LOOPP

What Broke

The explicit startup of the Mailbox.Monitor in the EVM plugin introduced a regression, causing timeouts in CCIP messaging and token transfer tests.

Proposed Fixes

Remove the explicit mailMon.Start(ctx) call from the EVM plugin's main configuration.

In main.go:119

- 	if err := mailMon.Start(ctx); err != nil {
- 		return nil, fmt.Errorf("failed to start mailbox monitor: %w", err)
- 	}
- 	c.SubService(mailMon)
+ 	c.SubService(mailMon)
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix KOncmaLl to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from KOncmaLl to get started.

Tip

Get Better Results: This CI job is not uploading test reports. Adding structured test reports enables more precise, test-level analysis with better root cause identification and more targeted fix recommendations.
👉🏻 Learn how to upload test results.

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Test Results: Pprof Collection Failure

Affected failures:

  1. Workflow Run: Integration Tests

What Broke

The new multi-chain pprof collection functionality fails to successfully collect profiles from all configured LOOP plugins.

Proposed Fixes

Introduce a dedicated HTTP client with configured transport timeouts for forwarding pprof requests to LOOP plugins in core/web/loop_registry.go. This enhances the robustness of pprof collection by preventing requests from hanging due to unconfigured default client behavior.

In loop_registry.go:10

 \t"net/http"
 \t"net/url"
 \t"os"
+ \t"net"
 \t"strconv"
 \t"time"
 

In loop_registry.go:34

 \tlogger            logger.SugaredLogger
 \tpromClient        *http.Client
+ \tpprofClient       *http.Client // New field for pprof requests
 \tjsonMarshalFn func(any) ([]byte, error)
 }
 

In loop_registry.go:48

 \t\tdiscoveryHostName: discoveryHostName,
 \t\tloopHostName:      loopHostName,
 \t\tpromClient:        &http.Client{Timeout: 1 * time.Second}, // some value much less than the prometheus poll interval will do there
+ \t\tpprofClient: &http.Client{ // Initialize pprofClient
+ \t\t\tTransport: &http.Transport{
+ \t\t\t\tDialContext:         (&net.Dialer{Timeout: 30 * time.Second}).DialContext,
+ \t\t\t\tTLSHandshakeTimeout: 10 * time.Second,
+ \t\t\t\tResponseHeaderTimeout: 30 * time.Second,
+ \t\t\t},
+ \t\t},
 \t}
 }
 

In loop_registry.go:198

- \tres, err := http.DefaultClient.Do(req)
+ \tres, err := l.pprofClient.Do(req) // Use the dedicated pprofClient
 \tif err != nil {
 \t\tmsg := "plugin pprof handler failed to post plugin url " + html.EscapeString(url)
 \t\tl.logger.Errorw(msg, "err", err)
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix TWKxfG9W to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from TWKxfG9W to get started.

View all test uploads

@jmank88 jmank88 requested a review from bolekk March 5, 2026 11:46
@jmank88 jmank88 enabled auto-merge March 5, 2026 14:42
@jmank88 jmank88 added this pull request to the merge queue Mar 5, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 5, 2026
@jmank88 jmank88 added this pull request to the merge queue Mar 5, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 5, 2026
@jmank88 jmank88 added this pull request to the merge queue Mar 5, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 5, 2026
@jmank88 jmank88 added this pull request to the merge queue Mar 5, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 5, 2026
@jmank88 jmank88 added this pull request to the merge queue Mar 5, 2026
Merged via the queue into develop with commit c9df802 Mar 5, 2026
185 of 190 checks passed
@jmank88 jmank88 deleted the BCF-3493-loopp-pprof branch March 5, 2026 18:50
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.

5 participants