From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D7EE720A1E for ; Sun, 9 Dec 2018 08:49:57 +0000 (UTC) Received: by mail-ed1-x542.google.com with SMTP id h50so7017818ede.5 for ; Sun, 09 Dec 2018 00:49:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=godfat.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xrYw2r/CRnY3HmX4kIdGrqYKrJzpo13Wk7wtXCt5Oi4=; b=AhGcfCTNSOuzNCdOSjUcrsAREG9I6kh92oYFmlSW5zmEDVZLTAJme8jZ3K/om2X0th ARnwefN3HYwuMm+qxxACcC94vdq+g1TZ8JkhzLQOhRBDXb4HiRFAD+K4dpEPLdfGBfu6 ojbYSP44Nps/FjiOe9rRpxT3xhcUAw70gb9w0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xrYw2r/CRnY3HmX4kIdGrqYKrJzpo13Wk7wtXCt5Oi4=; b=hp3J98hB1fTUOaZtg523DSUYY3FHiGJDkqg1B47Ykn79d/yos+QG84EX/SLPzGx1K4 trfKpmwJ3UiFjOr6kbfl+w5oFoCp89q++YBH1AcOlJesGYYsurj5cikjFuW87UOmohDS MX7+4zqDmH0b2VolV1NWAkb24QeCdgqwotCDPycEevlNKNggP0gSxkgaHIJ/ubF7ezIh mlW18YJy8MC2Tn32gqImLFHJiwE4UTLz1liDuZmhL56dVbZlYN4ZRbq2+d+PIGWSl/ug GHswqJ6FJ+3GU/LqQrg1Ivxkg1vYxyurn9Kcg68cHjLl4iNn0zZdn+5bDAICLv9RKhOz YVQQ== X-Gm-Message-State: AA+aEWYGHnLDP92mf/2QB0I5z1ULdnhBbv9raiHHaCZubmUcNZtW77fo twDeXGSUnR+Vz5K2LDDcxYrOhufNtzz03+EsFYAZkw== X-Google-Smtp-Source: AFSGD/Xd1BTibJ7lP0WTJtcgs4Z6N07gr9y9qq2X9rxRZ2JAGoJUhEd8B4E9vQNzGbG9CwPobAzq+0TxKGqH4GMawEM= X-Received: by 2002:a17:906:7a9c:: with SMTP id f28-v6mr6600111ejo.135.1544345394219; Sun, 09 Dec 2018 00:49:54 -0800 (PST) MIME-Version: 1.0 References: <20181208083019.4374-1-godfat@godfat.org> <20181208113616.juj2wng2eyelheed@dcvr> <20181208172037.6ccjk4jv3mb5x7il@dcvr> In-Reply-To: <20181208172037.6ccjk4jv3mb5x7il@dcvr> From: "Lin Jen-Shin (godfat)" Date: Sun, 9 Dec 2018 16:49:27 +0800 Message-ID: Subject: Re: [PATCH 1/2] Add QueueQuitter#closed? to queue_quitter_pipe.rb To: e@80x24.org Cc: yahns-public@yhbt.net Content-Type: text/plain; charset="UTF-8" List-Id: On Sun, Dec 9, 2018 at 1:20 AM Eric Wong wrote: > > Previously I have no idea why but sleepy_penguin has some compile > > error which I can't figure out how to fix, and it really looks like > > it's Ruby's bug. They probably fixed it on one of the recent Ruby > > patch releases, and it works fine after the `closed?` patch. > > Is it this? > https://bogomips.org/sleepy-penguin/20170415002501.19627-1-e@80x24.org/ > > Totally forgot about it, and I've even been using a FreeBSD a > bunch, just not with 3rd-party gems. It could be related. It was around RSTRUCT_PTR indeed. Looking at the Ruby header file (ruby.h), I can't remember the detail but it's rather weird. However if I just fix the header file, it did pass compilation, yet crashed at runtime. I stopped there. The thing is, the same version of sleepy_penguin now compiles and working properly :) The only thing changed was Ruby version. However indeed sleepy_penguin was actually working on MacOSX in some older versions, not sure older Ruby or older sleepy_penguin though. Since then I just swapped to Unicorn locally and didn't really bother more after failing to fix it. > One downside with graceful-shutdown-by-default and the generous > timeouts is I've had it cause rebooting a machine to take way > longer than expected, which increased downtime :x That's sad, but if the default doesn't work great, we can always tweak it? :) I think it's really nice to be shutting down gracefully by default, since it's much easier to forcefully quit, but not the other way around. I see that we can still use SIGQUIT for Unicorn, but ctrl+c is easier to use, and double SIGINT could still shut it down very quickly anyway. > Btw, which versions of Ruby are you using? I'm pretty sure > Ruby 2.0 support compatibility is no longer necessary, these > days; so we can rely on "exception: false" in more places > and slowly remove kgio dependencies. A few months ago one of the apps was still on 2.3.x, but now it caught up with 2.5.x. I think Ubuntu default is a good measurement, which seems to be 2.3 now? To extend support perhaps 2.2 will be safe enough. > Fwiw, I'm prepping a fork of yahns to demo Thread::Light > , too > working on lib/yahns/proxy_pass.rb was too much of a nightmare; > so I wanted to keep all the Ruby parts synchronous. Wow that thread is really long and I am still reading it, because I think it's very interesting. I didn't touch this kind of things for awhile now, but it's still nice to play with them. What I don't quite get is why people hate green thread yet keeping GVL. I thought that's somehow contradicting. I would love to see improvement over Fiber or just Thread::Light, whatever it'll end up with. I really think this is one of the missing pieces. I don't know why this is related to proxy_pass though. Would love to see when you have done something with that.