From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 379A41A009C4 for ; Tue, 29 Mar 2016 01:45:09 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id E0FE5B5D916 for ; Tue, 29 Mar 2016 02:21:55 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id C2E8F18CC7B2 for ; Tue, 29 Mar 2016 02:21:55 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 8BD7712048D; Tue, 29 Mar 2016 02:21:54 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 1666B120477 for ; Tue, 29 Mar 2016 02:21:50 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=MwvP0sw4S3lNEkNOfZieG99UJdE=; b=h+KqDYRXn7yTQvSk9+ 83QFoTqyVaA1CWP+u9mfMXeuQ3KOZD9nXWOP6ju7ltqJaoPAzCTladaRN57qoqhj aQvGOyO+/QgTkvwBEthH4YYeDS5iv+Tq38EsPG2+YU3UDaE50f1WdpV9osRBpiqR /OkKCpACA8csLYgOye54lmtiA= Received: by filter0498p1mdw1.sendgrid.net with SMTP id filter0498p1mdw1.12055.56F9682922 2016-03-28 17:21:45.4001435 +0000 UTC Received: from herokuapp.com (ec2-54-226-244-234.compute-1.amazonaws.com [54.226.244.234]) by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id t0iwb6iTREejTOC6J-EMbw Mon, 28 Mar 2016 17:21:45.541 +0000 (UTC) Date: Mon, 28 Mar 2016 17:21:45 +0000 From: nagachika00@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 49262 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11692 X-Redmine-Issue-Author: gazay X-Redmine-Issue-Assignee: ko1 X-Redmine-Sender: nagachika 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS5ylJkNrX84iAoUcJ85c1H7xgjZzhO1goFXK/ 6fHILMIRQ2MfhhP6CGaQ5KS4UDEPI8O5oB5VSR4kZod+FHjg08rEbQekgkJU9yexfcbJJwx68ogq0p qCs7YXo0BSJKqd5nMlp10WPJoRVeTSVlM9SGcaZXou5DjwHt3GyRoIc07w== X-ML-Name: ruby-core X-Mail-Count: 74642 Subject: [ruby-core:74642] [Ruby trunk Bug#11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler 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 #11692 has been updated by Tomoyuki Chikanaga. Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE Backported into `ruby_2_2` branch at r54340. ---------------------------------------- Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler https://bugs.ruby-lang.org/issues/11692#change-57769 * Author: Alex Gaziev * Status: Closed * Priority: Normal * Assignee: Koichi Sasada * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE ---------------------------------------- We got ruby application running on our production server and noticed that it regularly crashes with out of memory errors. After months of investigation, I narrowed the case to the examples (1/2). After digging ruby sources and running test code, I found out that GC stopped working after recovering from native stack overflow error. Probably the relevant code appeared in 2.2 https://github.com/ruby/ruby/commit/0c391a55d3ed4637e17462d9b9b8aa21e64e2340 where ruby_disable_gc_stress became ruby_disable_gc. Patches for trunk and 2.2 branches below. ---Files-------------------------------- example1.rb (311 Bytes) example2.rb (333 Bytes) re-enable-gc-after-stackoverflow-trunk.patch (985 Bytes) re-enable-gc-after-stackoverflow-ruby-2-2.patch (985 Bytes) gc_threads_issue.rb (1.53 KB) re-enable-GC-if-stack-overflow-was-caught-from.patch (1.5 KB) -- https://bugs.ruby-lang.org/