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

[BUG] modular: error: failed to run script #3068

Closed
dlasusa opened this issue Jun 17, 2024 · 3 comments
Closed

[BUG] modular: error: failed to run script #3068

dlasusa opened this issue Jun 17, 2024 · 3 comments
Assignees
Labels
mojo-repo Tag all issues with this label task

Comments

@dlasusa
Copy link

dlasusa commented Jun 17, 2024

Bug description

Mojo seems to have installed, but has the following errors/warnings (which suggests submitting an issue)
Running:

modular install mojo

Produces the following error and warnings:

(mojo-testing) zzz@kona:~/mojo-testing$ modular install mojo
# Found release for https://packages.modular.com/mojo @ 24.4.0
# Using cached archive: /home/zzz/.modular/mojo-x86_64-unknown-linux-gnu-24.4.0-14-0.tar.zst
# Extracting downloaded archives.
Extracted            [ █████████████████████████████████████████████████ ] 100% 100MiB/100MiB
# Running post-install scripts...
Mojo Interop         [ ████████████████████████░░░░░░░░                  ]  50%                               [mojo][error] Mojo SDK post-install test "`mojo build test_python.mojo`" failed:
SubprocessError: Command '/tmp/tmp1hijjrkv/test_python' died with <Signals.SIGSEGV: 11>.
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 215, in test_mojo_build
    self.run(Path(tmp) / "test_python")[0],
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 172, in run
    raise SubprocessError(
[mojo][error] Mojo SDK post-install test "`mojo test_python.mojo`" failed:
SubprocessError: Command '/home/zzz/.modular/pkg/packages.modular.com_mojo/bin/mojo /home/zzz/.modular/pkg/packages.modular.com_mojo/test/test_python.mojo' died with <Signals.SIGSEGV: 11>.
  stderr:
    [2918:2918:20240611,072703.670638:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
    [2918:2918:20240611,072703.670668:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
    Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes.
    Stack dump:
    0.  Program arguments: /home/zzz/.modular/pkg/packages.modular.com_mojo/bin/mojo /home/zzz/.modular/pkg/packages.modular.com_mojo/test/test_python.mojo
    [2918:2919:20240611,072703.671175:ERROR directory_reader_posix.cc:42] opendir /home/zzz/.modular/crashdb/attachments/3c6b2cb8-73c6-4c33-8e45-69712f5a56fe: No such file or directory (2)
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
    0  mojo      0x0000564b056b3438
    1  mojo      0x0000564b056b125e
    2  mojo      0x0000564b056b3acd
    3  libc.so.6 0x00007f7196407520
    mojo crashed!
    Please file a bug report.
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 362, in test_mojo_run
    self.run_mojo(self.test_dir / "test_python.mojo")[0],
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 184, in run_mojo
    return self.run(self.mojo, subcommand, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 172, in run
    raise SubprocessError(
[mojo][error] Some components of the Mojo SDK may have been installed successfully, but others may not work as expected.
[mojo][error] Please submit an issue to https://github.com/modularml/mojo and include the full output of the command you just ran.
Mojo Interop         [ ████████████████████████░░░░░░░░                  ]  50%
modular: error: failed to run script
==========================
Failure Information:
        - Script: `PATH=/home/zzz/mojo-testing/.venv/bin:/home/zzz/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3/libnvvp:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files/Amazon/AWSCLIV2/:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute 2023.3.1/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/gs/gs10.03.0/bin:/mnt/c/page:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/dlasu/.pixi/bin:/mnt/c/Users/dlasu/.cargo/bin:/mnt/c/Users/dlasu/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/dlasu/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/dlasu/AppData/Local/Programs/oh-my-posh/bin:/mnt/d/uv:/mnt/c/Program Files/gs:/snap/bin HOME=/home/zzz MODULAR_HOME=/home/zzz/.modular PYTHONPATH=/home/zzz/.modular/pkg/packages.modular.com_mojo/venv/lib/home/zzz/.modular/pkg/packages.modular.com_mojo/venv/bin/python /home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py --modular-home /home/zzz/.modular --modular-data /home/zzz/.modular --modular-config /home/zzz/.modular --package-path /home/zzz/.modular/pkg/packages.modular.com_mojo --mojo-config-section mojo --tests build,run`
        - Result: 1
        - Stderr:
[mojo][error] Mojo SDK post-install test "`mojo build test_python.mojo`" failed:
SubprocessError: Command '/tmp/tmp1hijjrkv/test_python' died with <Signals.SIGSEGV: 11>.
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 215, in test_mojo_build
    self.run(Path(tmp) / "test_python")[0],
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 172, in run
    raise SubprocessError(
[mojo][error] Mojo SDK post-install test "`mojo test_python.mojo`" failed:
SubprocessError: Command '/home/zzz/.modular/pkg/packages.modular.com_mojo/bin/mojo /home/zzz/.modular/pkg/packages.modular.com_mojo/test/test_python.mojo' died with <Signals.SIGSEGV: 11>.
  stderr:
    [2918:2918:20240611,072703.670638:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
    [2918:2918:20240611,072703.670668:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
    Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes.
    Stack dump:
    0.  Program arguments: /home/zzz/.modular/pkg/packages.modular.com_mojo/bin/mojo /home/zzz/.modular/pkg/packages.modular.com_mojo/test/test_python.mojo
    [2918:2919:20240611,072703.671175:ERROR directory_reader_posix.cc:42] opendir /home/zzz/.modular/crashdb/attachments/3c6b2cb8-73c6-4c33-8e45-69712f5a56fe: No such file or directory (2)
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
    0  mojo      0x0000564b056b3438
    1  mojo      0x0000564b056b125e
    2  mojo      0x0000564b056b3acd
    3  libc.so.6 0x00007f7196407520
    mojo crashed!
    Please file a bug report.
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 362, in test_mojo_run
    self.run_mojo(self.test_dir / "test_python.mojo")[0],
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 184, in run_mojo
    return self.run(self.mojo, subcommand, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zzz/.modular/pkg/packages.modular.com_mojo/scripts/checks/self-test-complex.py", line 172, in run
    raise SubprocessError(
[mojo][error] Some components of the Mojo SDK may have been installed successfully, but others may not work as expected.
[mojo][error] Please submit an issue to https://github.com/modularml/mojo and include the full output of the command you just ran.


==========================

Errors detected      [ █████████████████████████████████████████████████ ] 100%
🔥 Mojo installed! 🔥

Mojo's Python virtual environment created at /home/zzz/.modular/pkg/packages.modular.com_mojo/venv

If you are using ZSH (default on macOS), run the following commands:

echo 'export MODULAR_HOME="/home/zzz/.modular"' >> ~/.zshrc
echo 'export PATH="/home/zzz/.modular/pkg/packages.modular.com_mojo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

If you are using bash, run the following commands:

BASHRC=$( [ -f "$HOME/.bash_profile" ] && echo "$HOME/.bash_profile" || echo "$HOME/.bashrc" )
echo 'export MODULAR_HOME="/home/zzz/.modular"' >> "$BASHRC"
echo 'export PATH="/home/zzz/.modular/pkg/packages.modular.com_mojo/bin:$PATH"' >> "$BASHRC"
source "$BASHRC"

Then enter 'mojo' to start the Mojo REPL.

For tool help, enter 'mojo --help'.
For more docs, see https://docs.modular.com/mojo.

Steps to reproduce

Followed installed instructions from website. I don't remember seeing any errors/warnings prior to this step.

System information

- What OS did you do install Mojo on ? Win 11 inside of an Ubuntu WSL2 environment
- Provide version information for Mojo by pasting the output of `mojo -v`: mojo 24.4.0 (2cb57382)
- Provide Modular CLI version by pasting the output of `modular -v`: modular 0.8.0 (39a426b5)
@dlasusa dlasusa added bug Something isn't working mojo-repo Tag all issues with this label labels Jun 17, 2024
@Sophia957
Copy link

Sophia957 commented Jun 25, 2024

I had the same problem, and I have successfully installed MAX now . Maybe you can see if it works for you .

In my computer, the version of python3 is Python 3.10.12 , I ran into the same problem when I created the virtual environment with the command

 python3.11 -m venv max-venv && source max-venv/bin/activate

The version of python in virtual environment is different from the version used to install modular. So I tried to deactivate from the virtual environment and delete the "max-venv", and recreated a virtual environment with the command

python3 -m venv max-venv && source max-venv/bin/activate

In this way I can successfully install MAX.

@dlasusa
Copy link
Author

dlasusa commented Jun 25, 2024

@Sophia957 I think you nailed it! I have both the system python 3.10.12 (same as you) and I also have python 3.12 and that is what I was using for my .venv

Thank you!!

@dlasusa dlasusa closed this as completed Jun 25, 2024
@Sophia957
Copy link

@JoeLoser
We are not sure what version of python is on the installer's computer in the first step,

Should we change the command in MAX install guide?

python3.11 -m venv max-venv && source max-venv/bin/activate

Could we use the following command instead of the specific python3.11 version

python3 -m venv max-venv && source max-venv/bin/activate

@walter-erquinigo walter-erquinigo self-assigned this Sep 16, 2024
@walter-erquinigo walter-erquinigo added the task label Nov 8, 2024 — with Linear
@walter-erquinigo walter-erquinigo removed the bug Something isn't working label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mojo-repo Tag all issues with this label task
Projects
None yet
Development

No branches or pull requests

3 participants