Project

General

Profile

Bug #14943

ruby 2.4 doesn't work with jemalloc 5.1.0 properly.

Added by repeatedly (Masahiro Nakagawa) 12 months ago. Updated 12 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:88135]

Description

With jemalloc 5.1.0, ruby 2.4.4 failed to initalize timer thread and it causes broken runtime, e.g. signals are ignored.

  • ruby 2.4.4
$ LD_PRELOAD=~/jemalloc_lib/5.1.0/lib/libjemalloc.so.2 ruby print_version.rb 
<main>: warning: pthread_create failed for timer: Invalid argument, scheduling broken
2.4.4
  • ruby 2.5.1
$ LD_PRELOAD=~/jemalloc_lib/5.1.0/lib/libjemalloc.so.2 ruby print_version.rb 
2.5.1

This problem has been reported in jemalloc issue. See https://github.com/jemalloc/jemalloc/issues/1006

History

#1

Updated by naruse (Yui NARUSE) 12 months ago

  • Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: UNKNOWN, 2.4: REQUIRED, 2.5: DONTNEED

Updated by normalperson (Eric Wong) 12 months ago

repeatedly@gmail.com wrote:

With jemalloc 5.1.0, ruby 2.4.4 failed to initalize timer thread and it causes broken runtime, e.g. signals are ignored.

This problem has been reported in jemalloc issue. See
https://github.com/jemalloc/jemalloc/issues/1006

I think we need to backport r58874 to 2.4. Can you file a
backport ticket? (too tired to open browser, even w3m :P)

Increased TSD (aka TLS/thread-local-storage/thread-specific-data)
usage in jemalloc will be a problem with tiny stack size used by
timer thread. I made 58874 to 2.5 as a workaround for high TSD
use in libkqueue.

Also, I may have an idea to remove timer-thread completely, even
under contention...

Also available in: Atom PDF