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

fix: Remove the pipe file before starting the ipc server #459

Merged
merged 3 commits into from
Feb 10, 2024

Conversation

louislam
Copy link
Contributor

Fix #457

@horvbalint might suggest uuid for avoiding the issue.

But I think the solution can be simpler. Since the pid is unique, which means there are no running processes with the same pid at the same time. If the pipe file exists, it must be a dead process. So we can delete it directly to fix the issue.

I can another branch to prove the fix:
https://github.com/louislam/tsx-issue-reproduce/tree/test-fix

Here is the docker logs:
https://github.com/louislam/tsx-issue-reproduce/actions/runs/7596779067/job/20690886488

@privatenumber
Copy link
Owner

Thanks @louislam! I appreciate the fix.

I'm happy to merge this if it resolves your current issue. But as I understand, it's won't be a full fix since the assumption that the pipe file based on PID won't collide isn't necessarily true when multiple containers share the same disk: #457 (comment)

Would like to wait for a response on #457 (comment) in case there's a quick way to namespace the PIDs.

@marcoreni
Copy link

I'm also affected by this. Even if PR may not be a complete fix, I think it would solve many issues for common scenarios (where /tmp is not shared).

Any chance of getting it merged?

@privatenumber privatenumber merged commit 0ed0097 into privatenumber:develop Feb 10, 2024
2 checks passed
@privatenumber
Copy link
Owner

🎉 This issue has been resolved in v4.7.1

If you appreciate this project, please consider supporting this project by sponsoring ❤️ 🙏

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inside a docker container, tsx is no longer working after the container restarted
3 participants