Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: yemaney/devbox

Tags

0.0.0-edge.2025-10-09

Toggle 0.0.0-edge.2025-10-09's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).

0.0.0-edge.2025-09-11

Toggle 0.0.0-edge.2025-09-11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).

0.0.0-edge.2025-08-28

Toggle 0.0.0-edge.2025-08-28's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).

0.0.0-edge.2025-08-21

Toggle 0.0.0-edge.2025-08-21's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).

0.0.0-edge.2025-08-14

Toggle 0.0.0-edge.2025-08-14's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).

0.0.0-edge.2025-08-07

Toggle 0.0.0-edge.2025-08-07's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).

0.0.0-edge.2025-07-31

Toggle 0.0.0-edge.2025-07-31's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).

0.0.0-edge.2025-07-24

Toggle 0.0.0-edge.2025-07-24's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).

0.0.0-edge.2025-07-17

Toggle 0.0.0-edge.2025-07-17's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release lock on global process-compose before attaching (jetify-com#2645

)

## Summary
After running `devbox services attach` all other `devbox services ...`
commands hang until the attached UI is exited. This is because there's a
lock put on the global process-compose file while it's being read and
it's not released until the program exits.

You can see in `devbox services up` the lockfile is released, looks like
it was just missed in attach.


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L188-L189



## How was it tested? (repro steps, hangs without this PR, works as
expected with it)

In one terminal, in a devbox repo with process(es)
```sh
devbox services up -b
devbox services attach
```
In another terminal, in the same dir or any other devbox repo>
```sh
devbox services ls # or any services ... sub command
# will hang until <ctrl-c> in above terminal
```

## Other note

The `lock()` function has a timeout and error handling, why doesn't it
work?


https://github.com/jetify-com/devbox/blob/dd069a42b8cae746d93e2cd7ad5665b722a1973f/internal/services/manager.go#L374-L394

The line that hangs is 391, when we're trying to close the file after
the timeout, the file can't be closed because another process has it
open and/or locked. I did investigate adding a timeout `file.Close()`
but could not get it to work reliably for myself.

## Community Contribution License

All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).

By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).