modularml / max

A collection of sample programs, notebooks, and tools which highlight the power of the MAX Platform
https://www.modular.com
Other
201 stars 31 forks source link

[Modular CLI]: modular segfaults when used #179

Closed OffensiverHase closed 1 week ago

OffensiverHase commented 1 week ago

Issue description

I tried to install mojo following the online tutorial. When getting to the step modular install mojo modular segfaults if I am not root. Output:

modular install mojo
modular: /__w/modular/modular/Support/lib/Configuration.cpp:555: auto M::findModularFile(StringRef)::(anonymous class)::operator()(const std::filesystem::path &) const: Assertion `!ec && "error checking for path existence"' failed.
Please submit a bug report to https://github.com/modularml/max/issues and include the crash backtrace along with all the relevant source codes.
Stack dump:
0.  Program arguments: modular install mojo
 #0 0x000056359f6b0327 (/usr/bin/modular+0x1552327)
 #1 0x000056359f6adfde (/usr/bin/modular+0x154ffde)
 #2 0x000056359f6b09af (/usr/bin/modular+0x15529af)
 #3 0x00007f114caf8520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007f114cb4c9fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x00007f114cb4c9fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x00007f114cb4c9fc pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x00007f114caf8476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x00007f114cade7f3 abort ./stdlib/abort.c:81:7
 #9 0x00007f114cade71b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x00007f114caefe96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x000056359fb1c567 (/usr/bin/modular+0x19be567)
#12 0x000056359fb1978f (/usr/bin/modular+0x19bb78f)
#13 0x000056359fb1682f (/usr/bin/modular+0x19b882f)
#14 0x000056359fb15f33 (/usr/bin/modular+0x19b7f33)
#15 0x000056359fae7f37 (/usr/bin/modular+0x1989f37)
#16 0x000056359f5fc7c4 (/usr/bin/modular+0x149e7c4)
#17 0x000056359f5fb6ba (/usr/bin/modular+0x149d6ba)
#18 0x00007f114cadfd90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#19 0x00007f114cadfe40 call_init ./csu/../csu/libc-start.c:128:20
#20 0x00007f114cadfe40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#21 0x000056359f5fae2e (/usr/bin/modular+0x149ce2e)
Aborted (core dumped)

When running modular install mojo as root it works, but installs into /root/.modular, so I can't access it as normal user.

Steps to reproduce

the steps I took were

Version Info

modular --version:
modular 0.8.0 (39a426b5)

cat /etc/*release*
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=21.3
DISTRIB_CODENAME=virginia
DISTRIB_DESCRIPTION="Linux Mint 21.3 Virginia"
NAME="Linux Mint"
VERSION="21.3 (Virginia)"
ID=linuxmint
ID_LIKE="ubuntu debian"
PRETTY_NAME="Linux Mint 21.3"
VERSION_ID="21.3"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=virginia
UBUNTU_CODENAME=jammy
OffensiverHase commented 1 week ago

Fixed it by removing the $MODULAR_HOME variable, then rm -rf /root/.modular and after that doing the instalation process all over without root.

ehsanmok commented 6 days ago

Thanks! yes, the CLI doesn't need root access.