Hi I'm seeing an issue with mutt built with slang. It happens very rarely but I can get it to happen if I try. This could easily be something with my environment, as I don't think it's a typical one. But I'm curious if anybody else can make it happen and if so, can understand it ;)
Mini-background: I always build two versions, one with slang and one without. This is because ages ago it made a difference in display behavior, and one person might prefer the manner with slang and another person not. I have no idea if it makes a difference any more, but I keep offering the choice of with vs not with slang. The problem only happens with the slang build. This is on FreeBSD 12.4 accessed via ssh in terminal windows. I'll post the configuration as given by mutt -v below, after telling about the issue. The person who first noticed it uses tmux but I was able to duplicate it running a plain old terminal window (lxterminal, if it matters). [Incidentally: I posted some stuff with patches here about a month ago. We noticed this problem right after that. I kinda wondered if it had something to do with my patches, but I built without applying any private patches, for testing, and it still happens.] The main symptom: mutt locks up and starts using 100% cpu. Mutt will still notice mailbox changes in this mode, just won't take any input. To recreate: get into mutt, and expand/contract the terminal window horizontally while in the index display. If you play with this long enough and move the border rapidly enough, it locks up. Once I found this method, the person who uses it in tmux confirms that window resizing was probably involved, something apparently he rarely does. [I do it sometimes, but I guess I get away with it] I looked at it in gdb and using .muttdebug0 output and I can see a place where this lockup seems to be happening, but: maybe treat this as coming from a kibitzer (don't you hate it when somebody thinks they know an answer or part of an answer and tells you before you can look?) (no?). In mutt_getch() in curs_lib.c there's a call to ncurses' getch(). When mutt is locked up in this way, this call always returns instantly, and with errno set to 9. I verified that errno is not set to 9 before the call is made. At one point I forced it to 0 before the call just to be sure. (BTW there's a bunch of times when it returns immediately and differently, but that's during normal operation and not when it's locked up). But when locked up, mutt continues in its big loop where part of it comes around to do the getch here and again return immediately. Because it's doing it's main loop it will notice changes to the mailbox and etc. But it's unusable. I ran it with truss (a FreeBSD thing similar to strace on linux) to see what system calls it was making but.. no elucidation there. There may be some interaction between truss and shared libraries that inhibits some logging.. I dunno. I could probably ramble on with other observations but this is the bulk of it. Does this ring any bells with anyone? Is anybody else actually using slang mode? I tried digging into slang and ncurses some but that hurt my head. mutt -v output: Mutt 2.2.10 (2023-03-25) Copyright (C) 1996-2023 Michael R. Elkins and others. Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'. Mutt is free software, and you are welcome to redistribute it under certain conditions; type `mutt -vv' for details. System: FreeBSD 12.4-RELEASE-p1 (amd64) slang: 20303 libiconv: 1.17 libidn: 1.38 (compiled with 1.38) Compiler: FreeBSD clang version 13.0.0 (g...@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303) Target: x86_64-unknown-freebsd12.4 Thread model: posix InstalledDir: /usr/bin Configure options: --with-slang --enable-pop --enable-imap --with-homespool=Mailbox --with-ssl LDFLAGS=-L/usr/local/lib 'CPPFLAGS=-I/usr/local/ssl/include -I/usr/local/include -DDEBUG' Compilation CFLAGS: -Wall -pedantic -Wno-long-long -g -O2 Compile options: -DOMAIN +DEBUG +HOMESPOOL -USE_SETGID +USE_DOTLOCK -DL_STANDALONE +USE_FCNTL -USE_FLOCK +USE_POP +USE_IMAP -USE_SMTP +USE_SSL_OPENSSL -USE_SSL_GNUTLS -USE_SASL -USE_GSASL -USE_GSS +HAVE_GETADDRINFO +HAVE_REGCOMP -USE_GNU_REGEX +HAVE_COLOR -HAVE_START_COLOR -HAVE_TYPEAHEAD -HAVE_BKGDSET -HAVE_CURS_SET -HAVE_META -HAVE_RESIZETERM +HAVE_FUTIMENS +CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME -EXACT_ADDRESS -SUN_ATTACHMENT +ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR +HAVE_ICONV -ICONV_NONTRANS +HAVE_LIBIDN -HAVE_LIBIDN2 +HAVE_GETSID -USE_HCACHE -USE_SIDEBAR -USE_COMPRESSED -USE_INOTIFY ISPELL="/usr/local/bin/ispell" SENDMAIL="/usr/sbin/sendmail" MAILPATH="Mailbox" PKGDATADIR="/usr/local/share/mutt" SYSCONFDIR="/usr/local/etc" EXECSHELL="/bin/sh" -MIXMASTER To contact the developers, please mail to <mutt-...@mutt.org>. To report a bug, please contact the Mutt maintainers via gitlab: https://gitlab.com/muttmua/mutt/issues -mm-