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 autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [IPv6:2a01:4f8:1c0c:6b10::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5F86C1F44D for ; Thu, 25 Apr 2024 14:50:51 +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=BVCzlpPu; 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=pMNTmPQS; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 1422781385; Thu, 25 Apr 2024 14:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1714056643; bh=atbfB55+ZnxmnB4cSOi36zkLEsqNb60sOnhf01uLHLQ=; 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=BVCzlpPumeVThWHMaXbX9/yHxmkcwbE3U52xYOohV1jvcT+CHDnybWNKZtOfGVFfv DkOUL74LvnalxqSFttk2gXiuGAg8mzOjexOVNv0a9hRotfSUP683p7otDXEAMAOrMc 2QL6BjnoXblGVt1/3WIDt+kuU8cAsmuqnmGC21Yw= Received: from s.wfbtzhsw.outbound-mail.sendgrid.net (s.wfbtzhsw.outbound-mail.sendgrid.net [159.183.224.105]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 431788135B for ; Thu, 25 Apr 2024 14:50:39 +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=pMNTmPQS; 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=SeRDsTi9X727ny0J3m6XQyeKgHhcrE3CWIhCBdb/Pew=; b=pMNTmPQSzUjqaQhhuRAn+pqtQwvQHeDENjlsljPTBaPlxNlnqSsJkUCWEgjvHm62iqr8 fDN/a69cDW0461LTnhZTJaO308MInJHtxHKwx5oPmr59zETj6Vx7hQ3H2G2bKJKzFA0GAF AxkwxPvnuTJ5wIo+EBEUQ6hW/KpBx51jS/+IRRBQVqOmW0T/6SS+b6Q05R9TdX3jPQ6ypH hs1zKvxq/tqYkQ/Hhi+2bj7D0dIaXdmbrWRwHvCD8S67TEFQYWLjXYms2IKetLBHYiUuT1 mYFP2UZ8f3qvVXd6yjqDdYocVmpbB1UBiaiMzLWSReB+Gk7ZkEPuDm2hUmKhUlxA== Received: by filterdrecv-canary-56b5fdf567-d7wdk with SMTP id filterdrecv-canary-56b5fdf567-d7wdk-1-662A6DBE-E 2024-04-25 14:50:38.372615306 +0000 UTC m=+1098076.318932489 Received: from herokuapp.com (unknown) by geopod-ismtpd-38 (SG) with ESMTP id -alTBd-NTDaOm621_RbdMw for ; Thu, 25 Apr 2024 14:50:38.364 +0000 (UTC) Date: Thu, 25 Apr 2024 14:50:38 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20452 X-Redmine-Issue-Author: Earlopain X-Redmine-Issue-Priority: Normal X-Redmine-Sender: Earlopain 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: 94303 X-SG-EID: =?us-ascii?Q?u001=2EeN8dK4P86Am4z06GVDKdfvEyoI3WQjPfTcd7CtGb2eN1eriElpjSWp5GJ?= =?us-ascii?Q?vSR=2FvvdvOqED6rgnv4GFThyvgwcpv2Lj6XZIlXq?= =?us-ascii?Q?I8eIGBBkpGaZEKTDcWrzkEphyB67DpFHu=2F6ka9V?= =?us-ascii?Q?3yMY8ZDVnzsrj124WA+psfZPvQfJPogccFyc1w=2F?= =?us-ascii?Q?QErVU2cmyTYYnOk9qM6sD8saXw88ZZGRfqdU6eT?= =?us-ascii?Q?AMbyU0uWq4Plo0oaqHG1IKvdg6DzyeG8Ob9LSJu?= =?us-ascii?Q?ANwRjsn092j16DYSUTngfGLUag=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 2LTTF5KGV2TRDRHSZFD5WS6UAEZJ6UI2 X-Message-ID-Hash: 2LTTF5KGV2TRDRHSZFD5WS6UAEZJ6UI2 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:117707] [Ruby master Bug#20452] Ruby 3.3 on Alpine Linux results in a relatively shallow SystemStackError exception List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "Earlopain (A S) via ruby-core" Cc: "Earlopain (A S)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20452 has been updated by Earlopain (A S). nobu (Nobuyoshi Nakada) wrote in #note-5: > Does this help you? > https://github.com/nobu/ruby/tree/mainstackaddr Thank you. I tried it out with your patch but something is missing still. Building with `make DEFS=-DMAINSTACKADDR_AVAILABLE=0` from your comment above works wonderfully though. I believe `HAVE_PTHREAD_GETATTR_NP` may be defined? In `configure.log` I see `HAVE_PTHREAD_GETATTR_NP=1` a few times. https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_getattr_np.c ---------------------------------------- Bug #20452: Ruby 3.3 on Alpine Linux results in a relatively shallow SystemStackError exception https://bugs.ruby-lang.org/issues/20452#change-108118 * Author: Earlopain (A S) * Status: Feedback * ruby -v: 3.3.1 * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- This is a redo of https://bugs.ruby-lang.org/issues/14387, reported against a non-eol version. The same issue still applies on recent rubies, though I personally only have tested 3.3 and 3.2: ```rb n = 100000 res = {} 1.upto(n).to_a.inject(res) do |r, i| r[i] = {} end def f(x) x.each_value { |v| f(v) } end f(res) ``` The patch from https://bugs.ruby-lang.org/issues/14387#note-13 still works, though as per https://bugs.ruby-lang.org/issues/14387#note-16 it can't be accepted as is. With the patch applied: ``` (irb):8:in `block in f': stack level too deep (SystemStackError) from (irb):8:in `each_value' from (irb):8:in `f' from (irb):8:in `block in f' from (irb):8:in `each_value' from (irb):8:in `f' from (irb):8:in `block in f' from (irb):8:in `each_value' from (irb):8:in `f' ... 11549 levels... from /usr/local/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `' from /usr/local/bin/irb:25:in `load' from /usr/local/bin/irb:25:in `
' ``` Without the patch: ``` (irb):8:in `each_value': stack level too deep (SystemStackError) from (irb):8:in `f' from (irb):8:in `block in f' from (irb):8:in `each_value' from (irb):8:in `f' from (irb):8:in `block in f' from (irb):8:in `each_value' from (irb):8:in `f' from (irb):8:in `block in f' ... 286 levels... from /usr/local/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `' from /usr/local/bin/irb:25:in `load' from /usr/local/bin/irb:25:in `
' ``` To reproduce, I have removed lines 102-105 from https://github.com/docker-library/ruby/blob/f5753434bb23041dd9913bb7b650e7be735e03c0/3.3/alpine3.19/Dockerfile. Check out the previous ticket for more information, there are a few conversations about possible solutions. -- 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/