notcurses icon indicating copy to clipboard operation
notcurses copied to clipboard

notcurses segfaults on github codespaces on arch container

Open Kreijstal opened this issue 9 months ago • 7 comments

Please include the following data:

  • export | egrep 'LANG|LC_CTYPE|TERM'
[codespace@codespaces-a076fe mariadbsqlindexer]$ export | egrep 'LANG|LC_CTYPE|TERM' 
egrep: warning: egrep is obsolescent; using grep -E
declare -x COLORTERM="truecolor"
declare -x LANG="C.UTF-8"
declare -x TERM="xterm-256color"
declare -x TERM_PROGRAM="vscode"
declare -x TERM_PROGRAM_VERSION="1.100.0"
  • notcurses version (available from notcurses-demo i)
[codespace@codespaces-a076fe mariadbsqlindexer]$ notcurses-demo i
^[]4;1;rgb:ffff/7b7b/7272^[\^[]4;2;rgb:3f3f/b9b9/5050^[\^[]4;3;rgb:d2d2/9999/2222^[\^[]4;4;rgb:5858/a6a6/ffff^[\^[]4;5;rgb:bcbc/8c8c/ffff^[\^[]4;6;rgb:3939/c5c5/cfcf^[\^[]4;7;rgb:b1b1/baba/c4c4^[\^[]4;8;rgb:6e6e/7676/8181^[\^[]4;9;rgb:ffff/a1a1/9898^[\^[]4;10;rgb:5656/d3d3/6464^[\Aborted (core dumped)

ok jk

[codespace@codespaces-a076fe mariadbsqlindexer]$ pacman -Q notcurses
notcurses 3.0.16-1
  • terminal name + version vscode @ github codespaces, they ship a pretty recent version

.devcontainer/Dockerfile

FROM archlinux:latest


RUN pacman -Syu --noconfirm && \
    pacman -S --noconfirm bash sudo git github-cli which less openssh vim && \
    # Clean up pacman cache
    pacman -Scc --noconfirm

RUN useradd -m -G wheel -s /bin/bash codespace && \
    # Setup passwordless sudo for the codespace user
    echo 'codespace ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/codespace && \
    chmod 0440 /etc/sudoers.d/codespace

.devcontainer/decontainer.json

{
  "name": "Arch Linux Codespace with Dockerfile",
  "build": {
    "dockerfile": "Dockerfile"
  },
  "remoteUser": "codespace",
   "containerEnv": {
    "GIT_EDITOR": "code --wait"
  },
  "postStartCommand": "echo \"Attempting to configure Git. GIT_COMMITTER_NAME='${GIT_COMMITTER_NAME}', GIT_COMMITTER_EMAIL='${GIT_COMMITTER_EMAIL}'\"\nCURRENT_GIT_USER=$(git config --global --get user.name)\nCURRENT_GIT_EMAIL=$(git config --global --get user.email)\necho \"Current git config user.name='${CURRENT_GIT_USER}', user.email='${CURRENT_GIT_EMAIL}'\"\nif [ -z \"${GIT_COMMITTER_NAME}\" ] || [ -z \"${GIT_COMMITTER_EMAIL}\" ]; then\n  echo 'Warning: GIT_COMMITTER_NAME or GIT_COMMITTER_EMAIL is empty. Cannot automatically configure Git identity from these. Attempting gh auth setup-git.'\n  if command -v gh >/dev/null && gh auth status >/dev/null 2>&1; then\n    echo 'GitHub CLI is installed and authenticated. Running gh auth setup-git...'\n    gh auth setup-git\n    echo \"Git config after gh auth setup-git: user.name='$(git config --global user.name)', user.email='$(git config --global user.email)'\"\n  else\n    echo 'Warning: GitHub CLI not available or not authenticated. Please configure git manually: git config --global user.name \\\"Your Name\\\" && git config --global user.email \\\"[email protected]\\\"'\n  fi\nelif [ -z \"${CURRENT_GIT_USER}\" ] || [ -z \"${CURRENT_GIT_EMAIL}\" ] || [ \"${CURRENT_GIT_USER}\" != \"${GIT_COMMITTER_NAME}\" ] || [ \"${CURRENT_GIT_EMAIL}\" != \"${GIT_COMMITTER_EMAIL}\" ]; then\n  echo 'Configuring Git user name and email using Codespaces environment variables...'\n  git config --global user.name \"${GIT_COMMITTER_NAME}\"\n  git config --global user.email \"${GIT_COMMITTER_EMAIL}\"\n  echo \"Git configured with user: $(git config --global user.name), email: $(git config --global user.email)\"\nelse\n  echo 'Git user name and email already configured and match GIT_COMMITTER variables.'\nfi\necho 'Final git config:'\ngit config --global --list | grep user",

  "customizations": {
    "vscode": {
      "settings": {
        "terminal.integrated.defaultProfile.linux": "bash",
        "terminal.integrated.profiles.linux": {
          "bash": {
            "path": "/bin/bash"
          }
        }
      }
    }
  }
}

Kreijstal avatar May 09 '25 08:05 Kreijstal

thank you for the report! i'll look into this shortly.

dankamongmen avatar May 13 '25 18:05 dankamongmen

do you know whether this is glibc or musl? i'm assuming the former

dankamongmen avatar May 13 '25 18:05 dankamongmen

arch uses glibc

Kreijstal avatar May 13 '25 19:05 Kreijstal

there's no way you can get me a valgrind run on this, is there?

dankamongmen avatar May 14 '25 02:05 dankamongmen

so i'm not familiar with github codespaces. your TERM is xterm-blah; is there a an actual XTerm involved here, or is this some browser deal? we oughtn't be dropping core either way, but that's going to have a major impact on what we can do.

dankamongmen avatar May 14 '25 02:05 dankamongmen

there's no way you can get me a valgrind run on this, is there?

I think you can do that, I don't know how to use valgrind however in a repository, you can simply click on where you usually get the link to clone stuff, but instead click on codespace feature, it is free for public repositories.. You will get ubuntu 20, not arch, therefore you copy/create the files .devcontainer/decontainer.json and .devcontainer/Dockerfile, you click on the search bar on top in the middle, and look for action called, "rebuild container", this will trigger a full rebuild with an arch container, where you can install whichever packages you want. Image

Kreijstal avatar May 14 '25 04:05 Kreijstal

awesome, i'll play around with this tomorrow and see what can be seen, thanks!

dankamongmen avatar May 14 '25 05:05 dankamongmen