Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goose hangs in the exiting phase #582

Open
lvn-ruby-dragon opened this issue Feb 13, 2024 · 4 comments
Open

Goose hangs in the exiting phase #582

lvn-ruby-dragon opened this issue Feb 13, 2024 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@lvn-ruby-dragon
Copy link

I have the following setup ...

pub(crate) async fn transaction1(user: &mut GooseUser) -> TransactionResult {
    user.client = Client::builder()
        .http1_only()
        .trust_dns(true)
        .build()
        .expect("Client creation failed");

    let request_builder = user
        .get_request_builder(&GooseMethod::Get, "/endpoint1")?
        .version(reqwest::Version::HTTP_11);

    let goose_request = GooseRequest::builder()
        .set_request_builder(request_builder)
        .build();

    let validation = &Validate::builder().status(200).build();

    let goose = user.request(goose_request).await?;

    validate_page(user, goose, validation).await?;

    Ok(())
}

pub(crate) async fn transaction2(user: &mut GooseUser) -> TransactionResult {
    user.client = Client::builder()
        .http1_only()
        .trust_dns(true)
        .build()
        .expect("Client creation failed");

    let request_builder = user
        .get_request_builder(&GooseMethod::Get, "/endpoint2")?
        .version(reqwest::Version::HTTP_11);

    let goose_request = GooseRequest::builder()
        .set_request_builder(request_builder)
        .build();

    let validation = &Validate::builder().status(200).build();

    let goose = user.request(goose_request).await?;

    validate_page(user, goose, validation).await?;

    Ok(())
}

pub(crate) async fn transaction3(user: &mut GooseUser) -> TransactionResult {
    user.client = Client::builder()
        .http1_only()
        .trust_dns(true)
        .build()
        .expect("Client creation failed");

    let request_builder = user
        .get_request_builder(&GooseMethod::Get, "/endpoint3")?
        .version(reqwest::Version::HTTP_11);

    let goose_request = GooseRequest::builder()
        .set_request_builder(request_builder)
        .build();

    let validation = &Validate::builder().status(200).build();

    let goose = user.request(goose_request).await?;

    validate_page(user, goose, validation).await?;

    Ok(())
}

#[tokio::main]
async fn main() -> Result<(), GooseError> {
    GooseAttack::initialize()?
        .register_scenario(
            scenario!("scenario1").register_transaction(transaction!(transaction1).set_name("tx1")),
        )
        .register_scenario(
            scenario!("scenario2")
                .register_transaction(transaction!(transaction2).set_name("tx2"))
                .register_transaction(transaction!(transaction2).set_name("tx3"))
        )
        .execute()
        .await?;

  Ok(())
}

I have 5 scenarios with a total of some 30 transactions. When I build the binary:

$ cargo build --release --target=x86_64-unknown-linux-musl

and ship the binary onto a testing machine and run it like this:

./goose-test --users 100 --startup-time 100s --host MY_HOST --report-file=report.html --run-time 2m

It successfully goes through the launching and maintain phase and then pretty much always gets stuck on exiting one of the users:

exiting user 3 from SOME_SCENARIO...

Never finishes and never produces the report. Do you see anything I'm doing wrong, please?

@jeremyandrews
Copy link
Member

Sorry for not responding to this. Is this still an issue? Were you ever able to track down what was going wrong? Nothing is immediately obvious, but I'd enable some logging to try and better understand what's happening.
https://book.goose.rs/logging/overview.html

@jeremyandrews jeremyandrews added the help wanted Extra attention is needed label Jul 28, 2024
@psibi
Copy link
Contributor

psibi commented Jul 28, 2024

I faced similar issue and I had to use this commit as an workaround for fixing it: psibi@16ea834

Unfortunately that's just an workaround and I was able to get the final output with that change.

@jeremyandrews
Copy link
Member

Then the solution is rolling a new release. I’m traveling internationally this week, I’ll aim to roll a new release next week. It’s way past due.

@psibi
Copy link
Contributor

psibi commented Jul 29, 2024

Thanks! Is this bug fixed in the upcoming new release ? Curious to know more about the details of this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants