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

jibri: add check for /dev/shm size #1654

Merged
merged 1 commit into from
Dec 2, 2023
Merged

jibri: add check for /dev/shm size #1654

merged 1 commit into from
Dec 2, 2023

Conversation

saghul
Copy link
Member

@saghul saghul commented Nov 30, 2023

If the container was staryed without a /dev/shm of at least 2GB (defaults to 6MB in Docker) Chrome will behave erratically or crash.

Catch this with a tiny binary and make the container fail to start.

@saghul
Copy link
Member Author

saghul commented Nov 30, 2023

Test:

shm too small:

docker run -it --rm jitsi/jibri
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-jibri: applying...
[fix-attrs.d] 10-jibri: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-set-timezone: executing...
[cont-init.d] 01-set-timezone: exited 0.
[cont-init.d] 10-config: executing...
/dev/shm must be at least 2GB in size
[cont-init.d] 10-config: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

shm ok:

docker run -it --rm --shm-size 2g jitsi/jibri
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-jibri: applying...
[fix-attrs.d] 10-jibri: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-set-timezone: executing...
[cont-init.d] 01-set-timezone: exited 0.
[cont-init.d] 10-config: executing...
FATAL ERROR: Jibri recorder password and auth password must be set
[cont-init.d] 10-config: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Ref: #1653

If the container was staryed without a /dev/shm of at least 2GB
(defaults to 6MB in Docker) Chrome will behave erratically or crash.

Catch this with a tiny binary and make the container fail to start.

Ref: #1653
@saghul saghul merged commit e6a0c04 into master Dec 2, 2023
1 check passed
@saghul saghul deleted the jibri-shm branch December 2, 2023 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.

1 participant