Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Where to start debugging zle recursive-edit? / Ctrl-C

On 27 September 2016 at 18:09, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sep 27, 12:16am, Sebastian Gniazdowski wrote:
> }
> } have unoptimized HEAD Zsh, coredumps are set up, added some stressing
> If you're not seeing the problem under these circumstances, then it's
> probably a race condition that's eliminated either by taking out the
> code optimization or by adding the other processing.

It seems so, hours after I switched to CFLAGS=-O2 compiled binary,
I've got a suspicious effect, after smoothly running no-opt binary for
few days – couldn't recall if I spotted anything suspicious. The
effect is message at shell startup:

TRAPALRM: scalar parameter abcdef created globally in function TRAPALRM"

It appeared just once, not long after switching to -O2. I don't use
warn_create_global, and did a test that Mikael suggested to ensure:

function setopt() { print -r - "$funcfiletrace[1]: $0 ${(q-)@}" >>!
/tmp/setopt_data; builtin $0 "$@" }

and only "setopt localoptions warncreateglobal" from z-sy-h was
reported. Zshrc has at the end:

TRAPALRM() { abcdef=$(( abcdef + 1 )); }
PERIODIC_HOOK() { efghij=$(( efghij + 1 )); }
add-zsh-hook periodic PERIODIC_HOOK
repeat 50; do sleep 1000000 &; done
coproc cat

My aim is .recursive-edit and Ctrl-C, but just want to hook at
something first, have any backtrace, I suspect it will be easy to
connect with problems with .recursive-edit even when not directly
related to it. Crash related to Ctrl-C appeared in uncanny situations
AFAIR like Ctrl-R, Ctrl-C multiple times, then menu search completion
with also Ctrl-C, something like this, hard to reproduce.

Best regards,
Sebastian Gniazdowski

Messages sorted by: Reverse Date, Date, Thread, Author