core/web: support pprof for loop plugins#21120
Conversation
2e8574a to
1d98288
Compare
1d98288 to
7d9b33c
Compare
5c707fe to
94d235a
Compare
94d235a to
850ea66
Compare
850ea66 to
82fe2c3
Compare
82fe2c3 to
fe61307
Compare
a650a13 to
27dece7
Compare
4d81260 to
dc27de1
Compare
|
✅ No conflicts with other open PRs targeting |
dc27de1 to
0d16149
Compare
There was a problem hiding this comment.
This test ensures that the command is successful, and that it creates the expected directories
|
There was a problem hiding this comment.
🔴 Test Results: Mailbox Monitor Startup Timeout
Affected failures:
- Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_Solana2EVM_LOOPP
- 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 KOncmaLlto generate a stacked PR with the proposed fixes. - Use MCP in your IDE to fix the issue. Try
Help me fix CI failures from KOncmaLlto 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.
There was a problem hiding this comment.
🔴 Test Results: Pprof Collection Failure
Affected failures:
- 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.
\t"net/http"
\t"net/url"
\t"os"
+ \t"net"
\t"strconv"
\t"time"
\tlogger logger.SugaredLogger
\tpromClient *http.Client
+ \tpprofClient *http.Client // New field for pprof requests
\tjsonMarshalFn func(any) ([]byte, error)
}
\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}
}
- \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 TWKxfG9Wto generate a stacked PR with the proposed fixes. - Use MCP in your IDE to fix the issue. Try
Help me fix CI failures from TWKxfG9Wto get started.




https://smartcontract-it.atlassian.net/browse/BCF-3493
This PR expands the
admin profilecommand to collect PPROF profiles from LOOP Plugins, in addition to the host process. It also adds a-vitalsflag.Requires: