zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: [BUG?] Very strange behavior, execution of a function is interrupted
Date: Sat, 1 Sep 2018 00:01:58 +0200	[thread overview]
Message-ID: <CAKc7PVCfFXZuEVd510JJLKQ6g0kDC7KRDBmR+=36CcOUceDquQ@mail.gmail.com> (raw)

Hello,
it's quite a lost game to explain this, but I'll try:

- there is a scheduler called from sched +1 and once from zle -F
- it detects timed-out tasks, moves them to ZPLG_RUN, then executes
them reading them from this array

Problem: sometimes execution never reaches this line and beyond:
https://github.com/zdharma/zplugin/blob/7a24478e5862a1359b6cfb2887a792213be07e3a/zplugin.zsh#L1485

Some cycles of the preceding loop are then also skipped.

I feel very helpless in explaining this, maybe there's standard
questions sheet for situation where bug in exec.c is suspected?

I know `break 2' inside a function will break out of loop that
contains the function call. But I don't know what could exit a
function. I have debug prints and observe this clearly. At the
mentioned line, no execution occurs, ZPLG_RUN isn't cleared, I get to
run some tasks twice.

Twice when I checked, it was happening when zle -F was called so near
next second, that timeout'd tasks detection included two time slots:
"0" (0 seconds after first precmd, handled by zle -F) and "1" (1
second after first precmd, handled by sched +1).
-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org


             reply	other threads:[~2018-08-31 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 22:01 Sebastian Gniazdowski [this message]
2018-09-01 19:12 ` Sebastian Gniazdowski
2018-09-02 11:53   ` Sebastian Gniazdowski
2018-09-03  8:16     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVCfFXZuEVd510JJLKQ6g0kDC7KRDBmR+=36CcOUceDquQ@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).