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] crash when first trying to debug a mojo app in VSCode using WSL VS Code Server: "free(): invalid pointer" #3035

Open
micklat opened this issue Jun 13, 2024 · 0 comments
Labels
bug Something isn't working mojo-repo Tag all issues with this label

Comments

@micklat
Copy link

micklat commented Jun 13, 2024

Bug description

I'm trying mojo using Windows 11, VSCode, and WSL (Ubuntu).

VSCode is running outside WSL, and is communicating with mojo which is in the Ubuntu WSL via VS Code Server for Linux, and the VS Code WSL extension.

It seems like mojo crashed the LLVM debugger.

Steps to reproduce

  • open bash (in WSL)
  • cd to some directory
  • code .
  • make a new file called hello.mojo, with these contents:
fn main():
    print("Yeah this is in WSL!")
  • Pressed F5 to debug it, chose the mojo debugger (the mojo extension is installed in VS Code and enabled in the Remote Extension).
  • got this output in "DEBUG CONSOLE"
Welcome to Mojo debugging! 🔥
Inputs prefixed with a colon are treated as LLDB commands, e.g. `:thread list`. Other inputs are treated as expressions, e.g. `my_struct.some_field`.
Yeah this is in WSL!
Process 10976 exited with status = 0 (0x00000000)
free(): invalid pointer
[10956:10956:20240613,054725.176421:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[10956:10956:20240613,054725.176508:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
pure virtual method called
terminate called without an active exception
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
[10956:10957:20240613,054725.178349:ERROR directory_reader_posix.cc:42] opendir /home/michael/.modular/crashdb/attachments/c0635b22-5ba3-4131-8159-f2dfa9737562: No such file or directory (2)

Some files I found under .modular/crashdb/completed:
c0635b22-5ba3-4131-8159-f2dfa9737562.zip

System information

- What OS did you do install Mojo on ?
Ubuntu 22.04.03 inside WSL, itself running within Windows 11 23H2.
 
- 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)
@micklat micklat added bug Something isn't working mojo-repo Tag all issues with this label labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

1 participant