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

Add tini to container to fix build #66

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Add tini to container to fix build #66

merged 2 commits into from
Jan 14, 2025

Conversation

tomtrafford
Copy link
Contributor

After make zpkg commands fail after Synthesis I found this post on stack overflow:
https://stackoverflow.com/questions/55733058/vivado-synthesis-hangs-in-docker-container-spawned-by-jenkins

which seemed to match the problem we have been encountering. When run in docker there is no PID 1 process which automatically cleans up zombie processes. This adds tini to the CI container which will clean up zombie processes.

I have found adding this to the container and running the make zpkg command with tini running as a process subreaper fixes the problem.

@tomtrafford tomtrafford requested a review from coretl January 6, 2025 13:07
@coretl
Copy link
Contributor

coretl commented Jan 6, 2025

@tomtrafford
Copy link
Contributor Author

I tried adding the --init flag there but it didn't seem to fix the problem. I will run another test job on the FPGA repo to see what it changes.

@tomtrafford
Copy link
Contributor Author

When passing '--init' or without I find that there is another proccess running with PID 1:

2025-01-06T13:09:16.8087839Z     PID TTY          TIME CMD
2025-01-06T13:09:16.8088270Z       1 ?        00:00:00 tail

When I use tini I found that this process interfered with it and it wouldn't run with PID 1. I therefore had to pass the -s argument with tini around the 'make zpkg' command. This registers Tini as a process subreaper for that process, without it running on PID 1.

I don't know where the tail process is coming from. Locally I get this within the container:

    PID TTY          TIME CMD
      1 pts/0    00:00:00 bash

@coretl
Copy link
Contributor

coretl commented Jan 6, 2025

I don't know where the tail process is coming from. Locally I get this within the container:

https://github.com/orgs/community/discussions/41644

When passing '--init' or without I find that there is another proccess running with PID 1:

I guess that makes sense if GitHub actions always wants to run tail as PID 1 to keep the container alive. Your solution is probably the only one that will work then, unless @gilesknap has any ideas

@tomtrafford tomtrafford merged commit f085683 into master Jan 14, 2025
18 checks passed
@tomtrafford tomtrafford deleted the init_container branch January 14, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants