From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29023 invoked by alias); 19 Jun 2017 20:13:01 -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: X-Seq: 41323 Received: (qmail 22947 invoked from network); 19 Jun 2017 20:13:01 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f181.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.216.181):SA:0(-0.7/5.0):. Processed in 0.797091 secs); 19 Jun 2017 20:13:01 -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=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.181 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DcXBMLnB3mhei7zPaBkQgkdmx5sRkr3ebOhy59SbkC0=; b=PnvEj8kd4KVL0/+1X9c1sh9RYtdwkkizG+I2XUhYB9g7G4vSkS7qdpm5Yl73pl8MsT RxEJuoSD0q0v9Ofh7+OI1crXhBhzBg/iy9iR2MQsNwDe6S5EH+XCIr+Ug7kb1fIkZyOR eyrxlUJBY2ewuL1KyiDXG+DPouKChKDmWO1waXooaHta/NYtXiUfekmWaWYjkKiGnr/0 UVarKfu9/1fue7yJUrYqChD6e/bM7KdzVl6Ub39+hmRwBPNpwn/SKxw43tggbz5PUtvK eLQm8dGJUBKKtVEk36e1CsInesOPSo1FgOXlunFw4K7pU6b3yeA0fM+E0A6mT1E45R6u MpFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DcXBMLnB3mhei7zPaBkQgkdmx5sRkr3ebOhy59SbkC0=; b=B8/365r7VmqvR8lCDsuLIfO1YoXsxU5ehCAJLvPK3QSsPINscX0SSwSc+hntQqIEKe uaa+MFzgRW5Hav7uDyKOCKFmPkoKYrUomYrrF1KwhGUuEBZDtoOomNRn6KYUZ+fhywNp WeceeBQsqJre8tafeacP5J0AcacTRcABZ2WEkL4bLHSDqEL0vR2Fb5jy14vq877BVjyt JHGzUqF2mGbzDeYeCUI0HBVMpIz6g8h72xNXLVAqPrFud0iuLEUa8f82HiUudUQ+qOVG D40Ck5Z1yCpwEKSUb+HrZCzuTQFSbEuklUboD05nmdbqHemzxSIZs03z41lQp51YD3V6 ggQw== X-Gm-Message-State: AKS2vOysaG0F6+h9qiYnnl/F4Vs38q85hVY6vYWgZlSOvdRJT8/71Sbf YYc5A8ZnfM42oU/rbHoPyLOEIEu8hzQj X-Received: by 10.200.40.169 with SMTP id i38mr30278184qti.59.1497903174236; Mon, 19 Jun 2017 13:12:54 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Bart Schaefer Date: Mon, 19 Jun 2017 13:12:53 -0700 Message-ID: Subject: Re: Loading Eprog in other thread doesn't work To: Sebastian Gniazdowski Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" On Mon, Jun 19, 2017 at 7:37 AM, Sebastian Gniazdowski wrote: > > But it looks like state of Zsh gets disrupted. Single run of source_prepare / source_load often works, the code is executed fine. However the longer I repeat this, the weirder things happen. Example backtraces at the end. > Neither signal handling (which includes reaping child processes when they exit) nor memory management is thread-safe, and there may be shared memory issues with threads and traditional process forking as well. The more threads you try to have the more likely you're going to be to wander into one of these areas. I'd be very skeptical that you can just plop threading into one part of zsh without at least some serious semaphore work on the rest of it.