Skip to content

[Bug]: Status of the strand is not shown in the strand dump tool output #44386

@rdulmina

Description

@rdulmina

Description

Consider the below ballerina program

import ballerina/lang.runtime;
import ballerina/log;

Payment[] payments = [];

class Payment {
    int amount = 0;
    string currency = "";

    public function init(int amount, string currency) {
        self.amount = amount;
        self.currency = currency;
    }
}

function postplaceOrder(json orderReq) {
    log:printInfo("Received order: " + orderReq.toJsonString());

    // Simulate payment gateway call
    _ = start simulatePayment(orderReq);

    // Simulate heavy write / processing
    simulateDatabaseWrite(orderReq);
    log:printInfo("Order placed successfully");
}

function simulatePayment(json orderJson) {
    // e.g., wait 3s
    runtime:sleep(300);
    return;
}

function simulateDatabaseWrite(json orderJson) {
    // heavy computation
    int sum = 0;
    foreach int i in 1 ... 5000000 {
        sum += i;
        payments.push(new Payment(sum, "USD"));
    }
    runtime:sleep(1000);
    return;
}

public function main() {
    postplaceOrder({orderId: "12345", item: "Laptop", quantity: 1, price: 1500});
}

when you get the strand dump of the above program using U10 or earlier it gives the status of the each strand as below

Image

But when u execute that using U11 or higher, that information is missing

Image

Steps to Reproduce

No response

Affected Version(s)

11.x and higher

OS, DB, other environment details and versions

No response

Related area

-> Debugger

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area/DebuggerIssues related to the ballerina debugging toolsOS/LinuxReason/RegressionThe issue has introduced a regression.Team/DevToolsBallerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs )Team/jBallerinaAll the issues related to BIR, JVM backend code generation and runtimeType/Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions