From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9703 invoked by alias); 31 Aug 2018 22:02:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43360 Received: (qmail 5267 invoked by uid 1010); 31 Aug 2018 22:02:14 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi0-f46.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.218.46):SA:0(-1.9/5.0):. Processed in 1.254482 secs); 31 Aug 2018 22:02:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=gbC8PR2veYppwU6zQc2w9FijpNRN3u6LI55E2BHXQPQ=; b=pOOuRAt0jkhE7ouKPeQkgDJ4A/2zd/pF8xp7sl+4WUso/GE/9rWusv91C5e7MrV3ZL bCjHdt1MOxVlZG4b6kONxHDZuK/32G+36gLmk0JMw1h2cERuEdLxtl43cVDnv5VX9/I1 zKxBpZuDtJdc6ABWbhTF4Suf71jYFhg2v8zd6aycCUrsE59F6SKNw5cWTQsOjAEhiTEq gWAqT702JvemXePLK0AIfBnoKaG7tyqyLMmv9tE5jDDwThyJc82R0vrg9XyCfEUU45Da j1tU3dTqVIu/LaOQe18yy2nX6P8hQk3Ln3YS3w9YdGKfmRJSXIVhGiK/C+BXUPs9AORp ehqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=gbC8PR2veYppwU6zQc2w9FijpNRN3u6LI55E2BHXQPQ=; b=bHIczs4RGFV2np8HTVyjQAiiJHZBoYK9kVD3jD+prOb43pAba3izYxGXeVtu9+Ndtz tZWu0bP3LOzLkOskBsbQUv4kt+A4evJ6U9aUeYjfgtBJ0EDSsESdIL4Kos8QBHJa9ESb rcuC28p8k8OH+z1GVYCZz52zSXn/YhUds4VvBli04QjfPc+HjYOFE/7gvxkhJyCQXr02 +gUSSDJ2mrOa7X4DGYHyWcEe2eM5dVZgS1A2LZeWKK5wqEVwkTTG53ij7nM0UscP8nEK ugPYv6J2EmgZxEKuiDUBUZsSjmsDeDbi3mmcVJPjxb2vscVZ+gqadxddsEQOIpW2fE9s 9JkQ== X-Gm-Message-State: APzg51BqXbwn43pzvAOvQXxxsgYtwna5qiXMRM8OOz1eLOPyCFlTAJGe FZzAwM9OFbE7fZF0mITLR5XEWBS2bl66jrYRTCBTDs45 X-Google-Smtp-Source: ANB0VdaGf1evUSBGTGyJ2/D2Yqsm/a623kH/mMA6eQq+iUt9cnytfUKXbPDkTtucguxUJ5QdST5TV4L1Ye1yllGLV0M= X-Received: by 2002:a54:4805:: with SMTP id j5-v6mr9746972oij.210.1535752929784; Fri, 31 Aug 2018 15:02:09 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Sat, 1 Sep 2018 00:01:58 +0200 Message-ID: Subject: [BUG?] Very strange behavior, execution of a function is interrupted To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" 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