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

There are cases where hab sup term stops working #5783

Open
jaym opened this issue Oct 23, 2018 · 5 comments
Open

There are cases where hab sup term stops working #5783

jaym opened this issue Oct 23, 2018 · 5 comments
Labels
Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Bug Issues that describe broken functionality

Comments

@jaym
Copy link
Contributor

jaym commented Oct 23, 2018

I ran into a situation where hab sup term refuses to bring things down. It seems to be some sort of race condition with unloading a service. Here's the test script i've been using:

termtest() {
    if ! hab pkg path core/procps-ng; then
        hab pkg install --binlink core/procps-ng
    fi

    if ! hab pkg path "$HAB_ORIGIN/term-test"; then
        build .
    fi

    if ! hab svc load "$HAB_ORIGIN/term-test"; then
        echo "Failed to load term-test"
        return 1
    fi

    sleep 5

    hab svc unload "$HAB_ORIGIN/term-test" & hab sup term &

    sleep 3

    if pidof hab-launch; then
        echo "hab should have died but didn't"
        return 1
    fi

    return 0
}

You can clone https://github.com/jaym/hab-term-test and test it out by:

hab studio enter
termtest

You'll find that after running that (most of the time), hab-launch sticks around. It will not respond to hab sup term.

@stevendanna
Copy link
Contributor

@jaym Do you know what versions of hab-launcher and hab-sup were in use here?

@jaym
Copy link
Contributor Author

jaym commented Oct 24, 2018

core/hab-launcher/8744/20181016214636
hab-sup/0.59.0/20180712161546

also tried hab-sup 0.66 and had the same problem

@stale
Copy link

stale bot commented Apr 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Apr 2, 2020
@stevendanna
Copy link
Contributor

I'm running the test from @jaym and don't seem to be hitting this bug anymore. I wonder if this was fixed by the various deadlock fixes we've shipped since version 0.66. Specifically, we had the signal-handling deadlock that I think could be the cause of something like this. I'll leave my reproduction loop running, but so far it has only found false-positive (cases where the termination takes a bit more than 3 seconds)

@stale stale bot removed the Stale label Apr 3, 2020
@christophermaier christophermaier added Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Type: Bug Issues that describe broken functionality and removed A-supervisor labels Jul 24, 2020
@rahulgoel1 rahulgoel1 removed the E-hard label Jul 23, 2021
@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Bug Issues that describe broken functionality
Projects
None yet
Development

No branches or pull requests

6 participants