Skip to content

LLDB Crashes When Following the Steps in Puzzle 9 #62

@isuckatcs

Description

@isuckatcs

uv/pixi CLI Version

pixi 0.52.0

Mojo Version

Mojo 25.6.0.dev2025081505 (b13372f2)

GPU Information

Tesla T4 (Google Colab)

Operating System

Ubuntu 22.04.4 LTS

Related Puzzle

Puzzle 9: GPU Debugging Workflow

What happened?

The compiler/JIT compiler in LLDB crashes with the following error:

/content/mojo-gpu-puzzles/solutions/p01/p01.mojo:1:1: error: ptxas application ptx input, line 78; error   : Feature 'Defining labels in .section' requires PTX ISA .version 7.0 or later
ptxas fatal   : Ptx assembly aborted due to errors

from memory import UnsafePointer
^
/content/mojo-gpu-puzzles/.pixi/envs/default/bin/mojo: error: failed to run the pass manager

IIUC for PTX ISA 7.0 we need at least CUDA 11.0, but running pixi run nvcc --version says CUDA 12 is installed.

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Tue_May_27_02:21:03_PDT_2025
Cuda compilation tools, release 12.9, V12.9.86
Build cuda_12.9.r12.9/compiler.36037853_0

Apparently running the compiler without using the -O0 and the -g flags simultaneously works, so both of the following commands execute fine:

  • pixi run mojo build -O0 solutions/p01/p01.mojo -o solutions/p01/p01_debug
  • pixi run mojo build -g solutions/p01/p01.mojo -o solutions/p01/p01_debug

The latter can be used to proceed with the Binary + LLDB and the Binary + CUDA-GDB approaches with some limitations and for some files.

pixi run mojo build -g problems/p09/p09.mojo -o problems/p09/p09_debug crashes as well, but after deleting the elif argv()[1] == "--second-case": and elif argv()[1] == "--third-case": branches from the source code makes it compile. For the other 2 branches I couldn't find a workaround that makes them compile.

Steps to Reproduce

(Option 1)

  1. Complet the prerequisits in the README
  2. Go to https://puzzles.modular.com/puzzle_09/essentials.html#your-first-debugging-commands
  3. Proceed all the way to step 4 in the guide.

(Option 2)

  1. Run pixi run mojo build -O0 -g solutions/p01/p01.mojo -o solutions/p01/p01_debug

Relevant Log Output

Additional Context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions