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: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-2.1 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id DA4EF20248 for ; Sat, 20 Apr 2019 12:40:24 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 7E83B120B26; Sat, 20 Apr 2019 21:40:19 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 2A962120A73 for ; Sat, 20 Apr 2019 21:40:16 +0900 (JST) Received: by filter0104p3iad2.sendgrid.net with SMTP id filter0104p3iad2-2330-5CBB1330-21 2019-04-20 12:40:17.023492651 +0000 UTC m=+412664.558187096 Received: from herokuapp.com (unknown [52.54.141.15]) by ismtpd0031p1mdw1.sendgrid.net (SG) with ESMTP id Y_hgcQZMRoqGCxZhHvWqEQ for ; Sat, 20 Apr 2019 12:40:16.615 +0000 (UTC) Date: Sat, 20 Apr 2019 12:40:16 +0000 (UTC) From: buzz.taiki@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 67827 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15779 X-Redmine-Issue-Author: buzztaiki X-Redmine-Sender: buzztaiki 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-SG-EID: =?us-ascii?Q?dpOKcU6=2F2RbGuJESXLpbn4HQdUt2DSk5xWhjgb5xtiimceQNyFTlbgenclF=2FAt?= =?us-ascii?Q?=2Fhy2p0kVyOMEgfJhZH16She9muxxXSLCE+gEQ6r?= =?us-ascii?Q?X7gENy7q+a4IfYkY8oMxRyyD0qErlMGlFxoC8aS?= =?us-ascii?Q?a5QILuWu+4EGMRlIyye=2FrSFI2wXRCXXPzvDWOFZ?= =?us-ascii?Q?ZGFqCAnUR4YIkNgeb3DvqZ5lNDUG5=2FpUNnA=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 92344 Subject: [ruby-core:92344] [Ruby trunk Bug#15779] After NoMemoryError, ruby freezes and takes 100% CPU X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #15779 has been updated by buzztaiki (Taiki Sugawara). I rewrote this issue to English. ---------------------------------------- Bug #15779: After NoMemoryError, ruby freezes and takes 100% CPU https://bugs.ruby-lang.org/issues/15779#change-77690 * Author: buzztaiki (Taiki Sugawara) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- Run following reproduce code, ruby freezes and takes 100% CPU. ``` require 'open-uri' begin "a" * 10000000000 ensure p open('https://www.ruby-lang.org/') end ``` But interestingly, the following code does not reproduce this issue. ``` require 'open-uri' begin begin "a" * 10000000000 rescue NoMemoryError raise end ensure p open('https://www.ruby-lang.org/') end ``` It was also reproduced when put `sleep 100` in ensure clause, run it and hit Ctrl-C. But `puts 'XXX'` does not reproduce it. -- https://bugs.ruby-lang.org/