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.9 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_HELO_NONE,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 E557B1F4C0 for ; Sun, 20 Oct 2019 22:51:17 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id EA98912096B; Mon, 21 Oct 2019 07:51:08 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id D9CD712095D for ; Mon, 21 Oct 2019 07:51:06 +0900 (JST) Received: by filter0034p3iad2.sendgrid.net with SMTP id filter0034p3iad2-13494-5DACE4DD-89 2019-10-20 22:51:10.020485397 +0000 UTC m=+245635.168181270 Received: from herokuapp.com (unknown [54.159.77.90]) by ismtpd0058p1iad1.sendgrid.net (SG) with ESMTP id fENPqCirSNqkNit0YKZKtA for ; Sun, 20 Oct 2019 22:51:09.932 +0000 (UTC) Date: Sun, 20 Oct 2019 22:51:10 +0000 (UTC) From: Greg.mpls@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 71034 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16265 X-Redmine-Issue-Author: MSP-Greg X-Redmine-Sender: MSP-Greg 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?M4W5dkI32Qt1AHWPzmUKqncwpr1RYzW=2Fh5io+QGCFbrE53gkWMOmwsNNNO8Ivh?= =?us-ascii?Q?k8eNWEoV8YwY63BSyNs=2FjVEFHZLzCtUJSCSEBzr?= =?us-ascii?Q?hyr3paw5HZK69C6Mh1vvDNcsM8Kw=2F6Wi=2Fc2hyp2?= =?us-ascii?Q?Q9FQAitL4F9Pp6ofw3Ho8RkHeeEqTWRjE8u=2FVCE?= =?us-ascii?Q?6jbnVkAIdbCHjJ=2FnhnGvgbfSIfVknsT+q5g=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 95443 Subject: [ruby-core:95443] [Ruby master Bug#16265] Test (spec) failure using current MSYS2 tools, related to -fstack-protector and possibly D_FORTIFY_SOURCE=2 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 #16265 has been updated by MSP-Greg (Greg L). I bypassed the spec mentioned above: ``` C-API Thread function rb_thread_call_without_gvl - runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO ``` and with it bypassed, all tests/specs reliably pass on MinGW. Since most of the CI that uses gcc is done on versions older than the current MSYS2 version (9.2.0), I don't know whether it's a general problem or just Windows related. Either way, anyone doing a fresh MSYS2 install and then building Ruby will have issues without changes to flags and the above test/spec. ---------------------------------------- Bug #16265: Test (spec) failure using current MSYS2 tools, related to -fstack-protector and possibly D_FORTIFY_SOURCE=2 https://bugs.ruby-lang.org/issues/16265#change-82194 * Author: MSP-Greg (Greg L) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.7.0dev (2019-10-19T08:19:27Z master 1d435bd51a) [x64-mingw32] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- GH PR https://github.com/ruby/ruby/pull/2573 was a work-around that forced using some non-current MSYS2 packages libraries for building. These libraries are only available on Appveyor because their images are out-of-date, a new MSYS2 install would not have them. Using current MSYS2 libraries requires adding '-fstack-protector' to LDFLAGS. I also experimented with adding 'D_FORTIFY_SOURCE=2' to CFLAGS. Ruby build/compiles with those flags added. test-all passes. But spec tests always lock up when running: ``` C-API Thread function rb_thread_call_without_gvl - runs a C function with the global lock unlocked - runs a C function with the global lock unlocked amd unlocks IO with the generic RUBY_UBF_IO ``` The tests are in spec/ruby/optional/capi/thread_spec.rb, as shown: https://github.com/ruby/ruby/blob/1d435bd51aeca75f6e437bc92de2271a716a1ced/spec/ruby/optional/capi/thread_spec.rb#L124-L141 and the freeze occurs on line 137. I've run this once in ruby-loco, twice in my ruby fork, and several times locally. In all runs, test-all passed, and spec stopped at the test above. This uses gcc 9.2.0, and the problem would occur with anyone doing a 'fresh' install of MSYS2. Not being a c type, this is way beyond what I can fix. Happy to try patches, etc. Thanks, Greg -- https://bugs.ruby-lang.org/