From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id F1AF51F542 for ; Wed, 7 Jun 2023 00:14:12 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=JXERBGP9; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=cWiLm+fb; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id B21A87F869; Wed, 7 Jun 2023 00:14:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1686096845; bh=xbaozT2x21NoC1XuPs8AOWw9wgh/Uf3yXlSwHkVUXFs=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=JXERBGP9eQT/TP8/nybH5VfR0gEucGpZSE5CbuP/ZFALh6PnXuT0d4szqqh/CSVJg N/BjeMxsmsiMfIj1DNi/mYuoRxITNrNM44Faj6Oe2PXBhEw2Gv1dvx5J+NmiegPgsh 4r7LIYv3P8XIt7c6pLgkN1QcB8nHuEKXGeyD2Ie4= Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by nue.mailmanlists.eu (Postfix) with ESMTPS id CD42D7F7FA for ; Wed, 7 Jun 2023 00:14:01 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=cWiLm+fb; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=m75Y0tKUri7RgkJSFi63F4t2F+1LdlGXxMhS99YIemw=; b=cWiLm+fb7iay2/g3IM48VvnprDjKY9Q0OlfJnFTvnjc8VDVwTWBrxO84vqTj3iG5Wmnl P9iYtekcp6n+/AGIru2gnd5ndbPlWD3zMxxhvaybtwYZWGF/uZCXW8NVV+fnY4TiSA0J8p e2m6X++PLb590zH0bCoG1LDB+C1wg5yMc/k6S1pb9VHq1BfXMn4X/ah/qXbflILvFvvh5w OvsvzrGdki9gslyEi7UMvPnPH9MKN8glo/ZZnwiivyzmgASzjNlElTCY1TXQvuhRM/coc8 jsQbT98yfoUozKXGhmgFNxLXstAUWFUIxgECcWH1kRHrr6pYZZCcIflrU15MGYfQ== Received: by filterdrecv-77869f68cc-lcgp6 with SMTP id filterdrecv-77869f68cc-lcgp6-1-647FCBC7-36 2023-06-07 00:13:59.829524494 +0000 UTC m=+2335082.022930923 Received: from herokuapp.com (unknown) by geopod-ismtpd-1 (SG) with ESMTP id YKOJLS_wSSSVsKIEmW7ZvQ for ; Wed, 07 Jun 2023 00:13:59.768 +0000 (UTC) Date: Wed, 07 Jun 2023 00:13:59 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 19716 X-Redmine-Issue-Author: alexdowad X-Redmine-Sender: alexdowad X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 90249 X-SG-EID: =?us-ascii?Q?kJSc3Ga1Q7LmjnIrbL1RVtFVwqKuftn8qdf6Kgl9daUCjuMiNYoj1we7dak8=2Fx?= =?us-ascii?Q?PdmvPFLHxQwW7F=2FVgX=2FifrPEx63xNemekmtCj2B?= =?us-ascii?Q?fcXoMM33V8TRJd3vrRAUBqUBKxZR=2FunxFgKj4BF?= =?us-ascii?Q?Iri997eJhqfh1Gbt6PI3jnKvYBDqABkY9z22vzy?= =?us-ascii?Q?hN3BJ3V0tIJ2+vhtTm0bCCEUu2DiVAO8X8Dq5g5?= =?us-ascii?Q?DgaCGTAR508MXR6kQMfmdNEu0QuaQbl7yUqnwN7?= =?us-ascii?Q?U6efpI1st84bwlsWkNh9A=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: NW7GXXSOKUIS3QJSY2AFZR4YUIEPADMC X-Message-ID-Hash: NW7GXXSOKUIS3QJSY2AFZR4YUIEPADMC X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:113782] [Ruby master Bug#19716] SystemStackError occurs too easily on Alpine Linux (due to small stack size reported by pthread_attr_getstacksize on musl libc) List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "alexdowad (Alex Dowad) via ruby-core" Cc: "alexdowad (Alex Dowad)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #19716 has been reported by alexdowad (Alex Dowad). ---------------------------------------- Bug #19716: SystemStackError occurs too easily on Alpine Linux (due to small stack size reported by pthread_attr_getstacksize on musl libc) https://bugs.ruby-lang.org/issues/19716 * Author: alexdowad (Alex Dowad) * Status: Open * Priority: Normal * ruby -v: ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux-musl] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- This is the same problem previously reported against Ruby 2.5 in https://bugs.ruby-lang.org/issues/14387. I just ran into the same problem on Ruby 3.1.4, built on Alpine Linux 3.16. @hsbt stated in the previous thread (https://bugs.ruby-lang.org/issues/14387#note-28): > If you have this issue with Ruby 3.2, please file it with another issue. I hacked `stack_check` in gc.c to print the values of `STACK_START` and `STACK_END` on stack overflow; on the Alpine 3.16 host where this problem just occurred, the values printed were: > Start=0x7ffd0bf4f000, End=0x7ffd0bf32530 ...which shows that Ruby thinks the stack size is only 131072 bytes. On the other hand, `ulimit -s` shows a stack size limit of 8192kb. This Ruby 3.1.4 was built from unmodified source code downloaded from https://cache.ruby-lang.org; the build was configured using `CFLAGS='-march=native' ./configure --disable-install-doc`. The invocation of Ruby which blew the stack was `bundle exec rake db:migrate`, on a mid-sized Rails project. Regarding @ncopa's patch from #14387, @wanabe listed some things which should be done before it is merged into mainline Ruby: > Okay, The patch needs one or more proofs of its behaviour, like that: > > Original issue [ruby-dev:50421] has gone away. > Standard test codes run well. > test-all > ruby/spec > getrlimit works on some situations like: > on single thread > with multiple threads > with RLIMIT_STACK environment variable > getrlimit code of musl is implemented correctly as expected. > (But It's doubtful whether it can be. I guess that a proof of code soundness is very difficult.) > Some "real world" applications can work. > I think it is better example that that application(s) can't work without the patch. I am happy to help cover some of these points if the Ruby development team is still interested in merging @ncopa's patch. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/