Skip to content

Commit

Permalink
rootless: fix hang on s390x
Browse files Browse the repository at this point in the history
avoid using the glibc fork() function after using directly the clone()
syscall, as it confuses glibc causing the fork() to hang in some
cases.

The issue has been observed only on s390x, and the fix was confirmed
in the issue discussion.

Closes: #25184

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Feb 6, 2025
1 parent 757c621 commit c06dba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rootless/rootless_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
if (pipe (p) < 0)
return -1;

pid = fork ();
pid = syscall_clone (SIGCHLD, NULL);
if (pid < 0)
{
close (p[0]);
Expand Down Expand Up @@ -689,7 +689,7 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
close (p[0]);

setsid ();
pid = fork ();
pid = syscall_clone (SIGCHLD, NULL);
if (pid < 0)
_exit (EXIT_FAILURE);

Expand Down

0 comments on commit c06dba4

Please sign in to comment.