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

Linking fails with "command substitution: ignored null byte in input" #1517

Closed
chrisburr opened this issue Feb 21, 2022 · 9 comments
Closed

Comments

@chrisburr
Copy link
Contributor

Running micromamba create --name test python on a ppc64le machine is failing with a bunch of messages of the form:

Linking _libgcc_mutex-0.1-conda_forge
/tmp/mambafdkxcsXRzEe: line 44: warning: command substitution: ignored null byte in input
/tmp/mambafdkxcsXRzEe: line 5: /m100/home/userexternal/cburr000/micromamba/envs/test//._libgcc_mutex-post-link.sh: No such file or directory

Linking ld_impl_linux-ppc64le-2.36.1-ha35d02b_2
/tmp/mambafbjLq9OjFa4: line 44: warning: command substitution: ignored null byte in input
/tmp/mambafbjLq9OjFa4: line 5: /m100/home/userexternal/cburr000/micromamba/envs/test//.ld_impl_linux-ppc64le-post-link.sh: No such file or directory

before eventually ending with:

Linking wheel-0.37.1-pyhd8ed1ab_0
Clobberwarning: $CONDA_PREFIX//python3.10/site-packages/wheel-0.37.1-py3.8.egg-info/PKG-INFO
warning  Clobberwarning: $CONDA_PREFIX/
critical Directory not empty: '/m100/home/userexternal/cburr000/micromamba/envs/test/

So far when debugging I've found that the PATH variable from micromamba shell is having three null bytes inserted (at approximately position 0x49):

$ micromamba shell --shell bash activate /m100/home/userexternal/cburr000/envs/test1 | hexdump -C
00000000  50 53 31 3d 27 28 74 65  73 74 31 29 20 27 0a 65  |PS1='(test1) '.e|
00000010  78 70 6f 72 74 20 50 41  54 48 3d 27 2f 6d 31 30  |xport PATH='/m10|
00000020  30 2f 68 6f 6d 65 2f 75  73 65 72 65 78 74 65 72  |0/home/userexter|
00000030  6e 61 6c 2f 63 62 75 72  72 30 30 30 2f 65 6e 76  |nal/cburr000/env|
00000040  73 2f 74 65 73 74 31 2f  00 00 00 3a 2f 6d 31 30  |s/test1/...:/m10|
00000050  30 2f 68 6f 6d 65 2f 75  73 65 72 65 78 74 65 72  |0/home/userexter|
00000060  6e 61 6c 2f 63 62 75 72  72 30 30 30 2f 6d 69 63  |nal/cburr000/mic|
00000070  72 6f 6d 61 6d 62 61 2f  63 6f 6e 64 61 62 69 6e  |romamba/condabin|
00000080  3a 2f 6d 31 30 30 2f 68  6f 6d 65 2f 75 73 65 72  |:/m100/home/user|

I see the same if I use a different directory or --name test.

Any ideas?

@wolfv
Copy link
Member

wolfv commented Feb 21, 2022

can you post what you have in $MAMBA_ROOT_PREFIX and $HOME

Also I am wondering -- did you install micromamba using conda or mamba? -- i.e. was the prefix replaced?

And maybe you can show thte output of micromamba info?

@chrisburr
Copy link
Contributor Author

Changing $HOME to be an empty directory and cleaning the environment doesn't help.

Also I am wondering -- did you install micromamba using conda or mamba? -- i.e. was the prefix replaced?

Indeed it was installed with mamba. https://micromamba.snakepit.net/api/micromamba/linux-ppc64le/latest works without issue.

From mamba

[cburr000@login01 ~]$ /m100/home/userexternal/cburr000/.local/bin/micromamba info

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/


            environment : None (not found)
           env location : -
      user config files : /tmp/cburr/.mambarc
 populated config files :
       libmamba version : 0.21.2
     micromamba version : 0.21.2
           curl version : libcurl/7.81.0 OpenSSL/1.1.1l zlib/1.2.11 libssh2/1.10.0 nghttp2/1.46.0
     libarchive version : libarchive 3.3.3 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 liblz4/1.9.2 libzstd/1.4.5
       virtual packages : __unix=0=0
                          __linux=4.18.0=0
                          __glibc=2.28=0
                          __archspec=1=ppc64le
                          __cuda=11.0=0
               channels :
       base environment : /tmp/cburr/micromamba
               platform : linux-ppc64le
[cburr000@login01 ~]$ /m100/home/userexternal/cburr000/.local/bin/micromamba shell --shell bash activate /m100/home/userexternal/cburr000/envs/test1 | hexdump -C | head -n6
00000000  50 53 31 3d 27 28 74 65  73 74 31 29 20 27 0a 65  |PS1='(test1) '.e|
00000010  78 70 6f 72 74 20 50 41  54 48 3d 27 2f 6d 31 30  |xport PATH='/m10|
00000020  30 2f 68 6f 6d 65 2f 75  73 65 72 65 78 74 65 72  |0/home/userexter|
00000030  6e 61 6c 2f 63 62 75 72  72 30 30 30 2f 65 6e 76  |nal/cburr000/env|
00000040  73 2f 74 65 73 74 31 2f  00 00 00 3a 2f 74 6d 70  |s/test1/...:/tmp|
00000050  2f 63 62 75 72 72 2f 6d  69 63 72 6f 6d 61 6d 62  |/cburr/micromamb|

From micromamba.snakepit.net

[cburr000@login01 ~]$ bin/micromamba info

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/


            environment : None (not found)
           env location : -
      user config files : /tmp/cburr/.mambarc
 populated config files :
       libmamba version : 0.21.2
     micromamba version : 0.21.2
           curl version : libcurl/7.81.0 OpenSSL/1.1.1l zlib/1.2.11 libssh2/1.10.0 nghttp2/1.46.0
     libarchive version : libarchive 3.3.3 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 liblz4/1.9.2 libzstd/1.4.5
       virtual packages : __unix=0=0
                          __linux=4.18.0=0
                          __glibc=2.28=0
                          __archspec=1=ppc64le
                          __cuda=11.0=0
               channels :
       base environment : /tmp/cburr/micromamba
               platform : linux-ppc64le
[cburr000@login01 ~]$ bin/micromamba shell --shell bash activate /m100/home/userexternal/cburr000/envs/test1 | hexdump -C | head -n6
00000000  50 53 31 3d 27 28 74 65  73 74 31 29 20 27 0a 65  |PS1='(test1) '.e|
00000010  78 70 6f 72 74 20 50 41  54 48 3d 27 2f 6d 31 30  |xport PATH='/m10|
00000020  30 2f 68 6f 6d 65 2f 75  73 65 72 65 78 74 65 72  |0/home/userexter|
00000030  6e 61 6c 2f 63 62 75 72  72 30 30 30 2f 65 6e 76  |nal/cburr000/env|
00000040  73 2f 74 65 73 74 31 2f  62 69 6e 3a 2f 74 6d 70  |s/test1/bin:/tmp|
00000050  2f 63 62 75 72 72 2f 6d  69 63 72 6f 6d 61 6d 62  |/cburr/micromamb|

@wolfv
Copy link
Member

wolfv commented Feb 21, 2022

I think we need to prevent conda/mamba to replace the prefix in the micromamba executable :/ sorry for the trouble.

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Mar 5, 2022

Do you know which package this occurs in?

@chrisburr
Copy link
Contributor Author

I've only seen it in conda-forge/linux-ppc64le/micromamba-0.21.2-0.

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Mar 6, 2022

is there somewhere in the source where string concatenatenation happens at a macro level (#define)?

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Mar 6, 2022

somewhere when the prefix is passed in as a macro duing a test?

@wolfv
Copy link
Member

wolfv commented Mar 10, 2022

@chrisburr I am assuming this is fixed now, right?

@hmaarrfk to be honest I don't really know where we have a hardcoded prefix ...

@wolfv wolfv closed this as completed Mar 10, 2022
@chrisburr
Copy link
Contributor Author

I am assuming this is fixed now, right?

Yup 👍

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

No branches or pull requests

3 participants