bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parallel cannot determine the shell on arm64 macs running emulated l


From: Ole Tange
Subject: Re: Parallel cannot determine the shell on arm64 macs running emulated linux/amd64 docker containers
Date: Tue, 16 Jul 2024 06:25:28 +0200

On Fri, Mar 1, 2024 at 10:37 PM Andrew Achkar <andrew.achkar@gmail.com> wrote:

> I believe I found a bug relating to how parallel determines the parent shell 
> when running under emulated docker containers on mac.

You have indeed.

> To reproduce this bug, run the following steps on an apple mac using M series 
> arm64 chips using Docker Desktop for Mac (4.27.2).

I do not have access to that hardware.

I need you to run:

ps -o pid,ppid,command -ax

ps -ef | perl -ane '1..1 and /^(.*)CO?MM?A?N?D/ and $s=length $1;).
s/^.{$s}//; print "@F[1,2] $_"'

> I believe this is because the way that parallel determines the parent shell 
> doesn't account for rosetta 
> https://git.savannah.gnu.org/cgit/parallel.git/tree/src/parallel#n6718

Yup.

> # reformatted output to insert \0
> cat /proc/$$/cmdline
> /run/rosetta/rosetta\0/bin/bash\0bash

Thanks.

> The leading /run/rosetta/rosetta is not accounted for in the regexp used to 
> determine the parent shell, so the determination fails and falls back to the 
> default of /bin/sh

Correct.

> This was discovered in the course of debugging an issue with running 
> super-linter docker images under emulation, for reference: 
> https://github.com/super-linter/super-linter/issues/5339

And the analysis here is correct.



/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]