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=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no 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) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 6E9B51F50E for ; Fri, 14 Feb 2025 04:34:33 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=ARXThgfg; 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=gcolo3ag; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1739507640; bh=eoTv/tYKLnsF2Ts7WgPO1kjcLeTbKGeml933+8jwsc0=; 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=ARXThgfgpNZ4+7KTXStK41zrqBOqC79N0PixBAAb/1jm3bBHiNiRD6+3n/Bl0dZfl rYsPiR8jMKcowAxOOl4kEh018kn9vSOXv2lekdmWMiMiNcjuUVz503dCqSHpYvIpYH TWiyTuLgA8joEMRKZdHo0PuxNLgfHlF89sBiFi+c= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 558D34697A for ; Fri, 14 Feb 2025 04:34:00 +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=gcolo3ag; dkim-atps=neutral Received: from s.wrqvwxzv.outbound-mail.sendgrid.net (s.wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) by nue.mailmanlists.eu (Postfix) with ESMTPS id E1B1E4621B for ; Fri, 14 Feb 2025 04:33:52 +0000 (UTC) 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=9zIrm1f6PpK9MGkAKf21nLcvqBii35uy/mOrdbhdBa0=; b=gcolo3agwx3V958bbjwmHVmKvgMZk8OH9sWO0HbJAGg88V7/2ywGPSFV2wuDUym5PEHG /P1tXuR5wtH4qBD4Q+65TxRvaLpygUzWo83VjeAziZcSE102a7OmDNXYitBNiY4Zo81XXO zHwNcVhxVhWAedcTN59oPBP52Y/A2nFqyfj+PCIRtzxf5vcQAQ2M2zdH4Pp5crGDXhZEYa D+gf82p8TxRZQDGi3QOzrUV0flvAeYcSP9JRcSOs7Yoy/3Vz6Ejs0lIawKa491fDtGAhnX 64UNroVHLUX1C2nySXZFd1UC33FhXVHXyprZsQnHHdUP1kTW3lEQtEmFapeYcMVw== Received: by recvd-5f54b5d587-9frct with SMTP id recvd-5f54b5d587-9frct-1-67AEC7AF-6 2025-02-14 04:33:51.267463138 +0000 UTC m=+7888229.397801199 Received: from herokuapp.com (unknown) by geopod-ismtpd-17 (SG) with ESMTP id PAPZnelNT--C0Gu-C4Zopw for ; Fri, 14 Feb 2025 04:33:51.183 +0000 (UTC) Date: Fri, 14 Feb 2025 04:33:51 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 21096 X-Redmine-Issue-Author: midnight X-Redmine-Issue-Priority: Normal X-Redmine-Sender: midnight 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: 97735 X-SG-EID: =?us-ascii?Q?u001=2EpnePcC4Dw0O3PstV7mV8jIAQ0ZEZIZdb8ktbfxWmySoS+3Gb=2FZDcSRyDv?= =?us-ascii?Q?FmlWTx2OMRa4gj3AZYQ0i9v6T3fU01McSc+8yAj?= =?us-ascii?Q?8juh19vSSPZ6MZbSiNsCYW263UmIUkD5p13pgmQ?= =?us-ascii?Q?RsA0HVMH7LZsecS0MpMt9lON86BNoqr=2FkZi1aeJ?= =?us-ascii?Q?bEUqtg1pJDBEVd7sQdh26gRdAPUbA3gcEHkeZtQ?= =?us-ascii?Q?upEk7g3nthQ8smBnnNmx7ol391D6=2FI0vZVS9hI5?= =?us-ascii?Q?WfWX?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 4B7UQZLC6BMKBZ5B2UTC2QVZPY6H7OPW X-Message-ID-Hash: 4B7UQZLC6BMKBZ5B2UTC2QVZPY6H7OPW 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.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:121015] [Ruby master Bug#21096] `Process.fork` hangs up on QEMU when called multiple times. List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "midnight (Sarun R) via ruby-core" Cc: "midnight (Sarun R)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #21096 has been updated by midnight (Sarun R). Subject changed from Ruby hangs up when compiling for bytecode on AArch64 emulated by QEMU to `Process.fork` hangs up on QEMU when called multiple times. Hello, I made progress somehow and the issue has been isolated. Here is the minimal reproduction code without projects, 3rd party gems, or external dependencies apart from MRI on Linux/QEMU. ~~~Ruby $stdout.sync = true pid_list = 4.times.map do Process.fork do puts 'success!' exit!(true) end end pid_list.each do |pid| Process.wait2(pid) end ~~~ On QEMU, you'll get only one `success!` printed and the Ruby interpreter hangs. ---------------------------------------- Bug #21096: `Process.fork` hangs up on QEMU when called multiple times. https://bugs.ruby-lang.org/issues/21096#change-111923 * Author: midnight (Sarun R) * Status: Open * ruby -v: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- Hello, We are experiencing issues when using [Bootsnap](https://github.com/Shopify/bootsnap) for production container image building, specifically when running `bundle exec bootsnap precompile --gemfile` on an emulated ARM64 environment on AMD64 hosts. Here are more details: * Bootsnap is a Ruby gem for bytecode caching, which speeds up loading times. It achieves this by calling `RubyVM::InstructionSequence.compile_file` and `RubyVM::InstructionSequence.load_from_binary`. * When running `bundle exec bootsnap precompile --gemfile` in the environment described (using QEMU to emulate the AArch64 instruction set), the process can compile and generate some bytecode but eventually hangs. * The hang seems random, occurring at different points during the process. * According to [a Rails GitHub issue](https://github.com/rails/rails/issues/54039), the issue affects both `Docker` and `containerd`, as well as native Linux and macOS environments. * From [a Bootsnap GitHub issue](https://github.com/Shopify/bootsnap/issues/495), the problem likely doesn't occur in Ruby `3.2.6` but appears in later versions. * So far, the common factors observed are: * Emulated ARM64 on AMD64 CPUs (likely using QEMU) * Newer Ruby versions (e.g., 3.3 and 3.4) As a user, I don't have the expertise to debug the issue but am willing to gather more information if provided with sufficient instructions. -- 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/lists/ruby-core.ml.ruby-lang.org/