ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

March 2023

  • 3 participants
  • 225 discussions
[ruby-core:112731] [Ruby master Bug#18808] Cannot compile ruby 3.1.2 on powerpc64le-linux without disabling the jit features
by k0kubun (Takashi Kokubun) 08 Mar '23

08 Mar '23
Issue #18808 has been updated by k0kubun (Takashi Kokubun). Status changed from Assigned to Closed I replaced the build process in [Feature #19420], and this issue seems irrelevant to today's build system. Closing. ---------------------------------------- Bug #18808: Cannot compile ruby 3.1.2 on powerpc64le-linux without disabling the jit features https://bugs.ruby-lang.org/issues/18808#change-102187 * Author: npn (John Davis) * Status: Closed * Priority: Normal * Assignee: k0kubun (Takashi Kokubun) * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- The system I am trying to compile on is a ppc64el system running RedHat 7 (3.10.0-1160.62.1.el7.ppc64le). I can successfully compile on a x86_64 system running the same version RedHat 7 (3.10.0-1160.62.1.el7.x86_64) When I configure with the following, make completes fine, but if I remove the `--disable-jit-support` it fails with the following error. ./configure --enable-shared --enable-load-relative --disable-install-doc --prefix=$RUBY_PREFIX --exec-prefix=$RUBY_PREFIX/rh_ppc --disable-jit-support building rb_mjit_header.h rb_mjit_header.h updated building .ext/include/powerpc64le-linux/rb_mjit_min_header-3.1.2.h error in final header file: In file included from /tmp/20220525-12786-q2ndz2.c:1:0: /tmp/20220525-12786-vf3xbh.h:16627:1: error: multiple storage classes in declaration specifiers __attribute__ ((__visibility__("default"))) extern ^ compilation terminated due to -Wfatal-errors. make: *** [.ext/include/powerpc64le-linux/rb_mjit_min_header-3.1.2.h] Error 1 ---Files-------------------------------- config.log (1.45 MB) rb_mjit_min_header-3.2.0.h (1000 KB) rb_mjit_header.h (1010 KB) rb_mjit_header.h (1010 KB) config.log (1.37 MB) -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:112730] [Ruby master Bug#18058] 3.1.0-dev with MJIT enabled Zlib::BufError during `gem install`
by k0kubun (Takashi Kokubun) 08 Mar '23

08 Mar '23
Issue #18058 has been updated by k0kubun (Takashi Kokubun). Status changed from Assigned to Closed I replaced the entire implementation in [Feature #19420], and I haven't seen this issue with today's implementation. ---------------------------------------- Bug #18058: 3.1.0-dev with MJIT enabled Zlib::BufError during `gem install` https://bugs.ruby-lang.org/issues/18058#change-102186 * Author: byroot (Jean Boussier) * Status: Closed * Priority: Normal * Assignee: k0kubun (Takashi Kokubun) * ruby -v: ruby 3.1.0dev (2021-08-01T00:54:36Z master 605421f4eb) +JIT [x86_64-linux] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- It doesn't always happen (maybe 5-10% of the cases), but since I added MJIT to our CI builds I've been seeing this error a lot. I was able to reproduce it in `docker run -it rubylang/ruby:master-nightly-bionic` after 15 or so tries: ``` # ruby -v ruby 3.1.0dev (2021-08-01T00:54:36Z master 605421f4eb) [x86_64-linux] # gem uninstall bundler -v 2.2.21; env RUBYOPT="--enable-jit --jit-max-cache=10000 --jit-min-calls=10 $RUBYOPT" gem install --no-document --user-install bundler -v 2.2.21 Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Exception while verifying /usr/local/lib/ruby/gems/3.1.0/cache/bundler-2.2.21.gem ERROR: While executing gem ... (Zlib::BufError) buffer error ``` e.g. ``` $ docker run -it rubylang/ruby:master-nightly-bionic bash -c 'while env RUBYOPT="--enable-jit --jit-max-cache=10000 --jit-min-calls=10 $RUBYOPT" gem install --no-document --user-install bundler -v 2.2.21; do gem uninstall bundler -v 2.2.21; done' Fetching bundler-2.2.21.gem WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.21 1 gem installed Successfully uninstalled bundler-2.2.21 WARNING: You don't have /root/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run. Exception while verifying /usr/local/lib/ruby/gems/3.1.0/cache/bundler-2.2.21.gem ERROR: While executing gem ... (Zlib::BufError) buffer error ``` -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:112560] [Ruby master Bug#19462] MJIT not enabled with universal macOS x86_64 + arm64 build
by benhamilton (Ben Hamilton) 08 Mar '23

08 Mar '23
Issue #19462 has been reported by benhamilton (Ben Hamilton). ---------------------------------------- Bug #19462: MJIT not enabled with universal macOS x86_64 + arm64 build https://bugs.ruby-lang.org/issues/19462 * Author: benhamilton (Ben Hamilton) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-02-21T21:59:54Z master ae9e1aee59) [universal.x86_64-darwin22] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I'm trying to build a universal macOS x86_64 + arm64 ruby from upstream @ ae9e1aee59b0db1e61aa0473556165f9fd719cde on x86_64 macOS Ventura 13.2, Xcode 14.2, Apple clang version 14.0.0 (clang-1400.0.29.202). When I run `autoconf && ./configure --with-arch=x86_64,arm64`, MJIT support is `yes` and YJIT support is `no` (I assume YJIT is disabled because I'm building for arm64): ``` Configuration summary for ruby version 3.3.0 * Installation prefix: /usr/local * exec prefix: ${prefix} * arch: universal-darwin22 * site arch: ${arch} * RUBY_BASE_NAME: ruby * ruby lib prefix: ${libdir}/${RUBY_BASE_NAME} * site libraries path: ${rubylibprefix}/${sitearch} * vendor path: ${rubylibprefix}/vendor_ruby * target OS: darwin22 * compiler: clang * with thread: pthread * with coroutine: universal * enable shared libs: no * dynamic library ext: bundle * CFLAGS: -fdeclspec ${optflags} ${debugflags} ${warnflags} * LDFLAGS: -L. -fstack-protector-strong * DLDFLAGS: -Wl,-multiply_defined,suppress * optflags: -O3 -fno-fast-math * debugflags: -ggdb3 * warnflags: -Wall -Wextra -Wextra-tokens \ -Wdeprecated-declarations -Wdivision-by-zero \ -Wdiv-by-zero -Wimplicit-function-declaration \ -Wimplicit-int -Wmisleading-indentation \ -Wpointer-arith -Wshorten-64-to-32 \ -Wwrite-strings -Wold-style-definition \ -Wmissing-noreturn -Wno-cast-function-type \ -Wno-constant-logical-operand -Wno-long-long \ -Wno-missing-field-initializers \ -Wno-overlength-strings -Wno-parentheses-equality \ -Wno-self-assign -Wno-tautological-compare \ -Wno-unused-parameter -Wno-unused-value \ -Wunused-variable -Wundef * strip command: strip -A -n * install doc: rdoc * MJIT support: yes * YJIT support: no * man page type: doc * BASERUBY -v: ruby 2.6.10p210 (2022-04-12 revision 67958) \ [universal.x86_64-darwin22] ``` However, when I compile with `make -j2`, I see that it's disabled: ``` % make -j2 BASERUBY = /usr/bin/ruby --disable=gems CC = clang LD = ld LDSHARED = clang -dynamiclib CFLAGS = -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wundef -pipe -arch x86_64 -arch arm64 XCFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE -I. -I.ext/include/universal-darwin22 -I./include -I. -I./enc/unicode/15.0.0 CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT DLDFLAGS = -Wl,-multiply_defined,suppress -fstack-protector-strong -Wl,-pie -framework CoreFoundation -arch x86_64 -arch arm64 SOLIBS = -ldl -lobjc -lpthread LANG = en_US.UTF-8 LC_ALL = LC_CTYPE = MFLAGS = - --jobserver-fds=3,4 -j RUSTC = rustc YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C lto=thin -C opt-level=3 -C overflow-checks=on '--out-dir=/Users/benhamilton/Developer/OpenSource/ruby/yjit/target/release/' ./yjit/src/lib.rs Apple clang version 14.0.0 (clang-1400.0.29.202) Target: x86_64-apple-darwin22.3.0 Thread model: posix InstalledDir: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin [snip] building .ext/include/universal-darwin22/rb_mjit_min_header-3.3.0-x86_64.h building .ext/include/universal-darwin22/rb_mjit_min_header-3.3.0-arm64.h This compiler (clang -fdeclspec -g -pipe -arch arm64 -w) looks not supported for MJIT. Giving up to generate MJIT header. This compiler (clang -fdeclspec -g -pipe -arch x86_64 -w) looks not supported for MJIT. Giving up to generate MJIT header. ``` The problem is here: * https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/… * https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/… * https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/… This logic runs `vm.c` through the C preprocessor and looks through the output for the `__clang__` preprocessor macro. However, `clang`'s C preprocessor only prints macro values with the `-dM` flag. We can add this flag, but it won't work with the MSVC compiler, so we need to only add it for gcc/clang. -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:112710] [Ruby master Bug#19481] make: *** No rule to make target 'defs/universal.mk'. Stop.
by duerst 08 Mar '23

08 Mar '23
Issue #19481 has been reported by duerst (Martin Dürst). ---------------------------------------- Bug #19481: make: *** No rule to make target 'defs/universal.mk'. Stop. https://bugs.ruby-lang.org/issues/19481 * Author: duerst (Martin Dürst) * Status: Open * Priority: Normal * ruby -v: ruby 3.1.0dev (2021-06-03T06:59:33Z master 7e14762159) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- When I tried to compile Ruby with `make up; make`, I got the message in the Subject. The line before said: `GNUmakefile:30: defs/universal.mk: No such file or directory` Below is the start of the output. git seems to correctly download new stuff. But apparently something is missing. I hope this problem can be fixed soon. ``` duerst@Kloentalersee:~/15ruby$ make up; make remote: Enumerating objects: 4839, done. remote: Counting objects: 100% (4839/4839), done. remote: Compressing objects: 100% (2467/2467), done. remote: Total 4839 (delta 3132), reused 2965 (delta 2049), pack-reused 0 Receiving objects: 100% (4839/4839), 3.20 MiB | 2.53 MiB/s, done. Resolving deltas: 100% (3132/3132), completed with 391 local objects. From git.ruby-lang.org:ruby cb40432c74..f68580890f master -> origin/master a4ab9921a1..0602df301c ruby_3_1 -> origin/ruby_3_1 31819e82c8..f93c7b9f58 ruby_3_2 -> origin/ruby_3_2 8f9b896b51..926b22ef5c refs/notes/commits -> refs/notes/commits Updating cb40432c74..f68580890f Fast-forward ``` -- https://bugs.ruby-lang.org/
4 3
0 0
[ruby-core:112458] [Ruby master Bug#19444] YJIT String#+@ miscompilations
by alanwu (Alan Wu) 08 Mar '23

08 Mar '23
Issue #19444 has been reported by alanwu (Alan Wu). ---------------------------------------- Bug #19444: YJIT String#+@ miscompilations https://bugs.ruby-lang.org/issues/19444 * Author: alanwu (Alan Wu) * Status: Open * Priority: Normal * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: REQUIRED ---------------------------------------- We noticed two issues with YJIT's `String#+@` (String unary plus) implementation. 1. It has issues with GC allocation tracing. We saw it SEGV with the `Stackprof` gem 2. It has a type confusion issue from assuming that the method always return an `::String` instance. It can return subclass instances The YJIT override does not exist on the 3.1 series. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:112726] [Ruby master Bug#18604] [BUG] ERROR(VpDivd): space for remainder too small
by Hombre2014 (Yuriy Chamkoriyski) 07 Mar '23

07 Mar '23
Issue #18604 has been updated by Hombre2014 (Yuriy Chamkoriyski). I had the same problem with ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21]. It crashed my app. It seems that ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21] as reported by Joe Ruth still has the problem. What is the status of this bug? Has it been fixed? If so, in which version? Thanks. ---------------------------------------- Bug #18604: [BUG] ERROR(VpDivd): space for remainder too small https://bugs.ruby-lang.org/issues/18604#change-102182 * Author: mentalizer (Jakob Skjerning) * Status: Third Party's Issue * Priority: Normal * ruby -v: ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- After upgrading to Ruby 3.1 one of our statistical dashboards started crashing with a message saying [BUG] ERROR(VpDivd): space for remainder too small ### How to reproduce This can be reproduced in irb (reproduction script is attached containing the below code): ``` ruby $ irb 3.1.1 :001 > require "bigdecimal" => true 3.1.1 :002 > 1.0 / BigDecimal("0.9652409267836026803310997240835632636973e2") ``` ### Actual result ```ruby (irb):2: [BUG] ERROR(VpDivd): space for remainder too small. ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21] -- Crash Report log information -------------------------------------------- ... ``` Full output from running reproduction script has been attached. ### Expected results The result of division, which is roughly: ``` => 0.10360107743589181177761764314914637186293143963577706371029263e-1 ``` ### Affected Rubies So far I've been able to reproduce this on... - ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21] - ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux] - ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21] The following seem to work just fine: - ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [arm64-darwin21] ### Notes Admittedly, the precision here is way higher that we actually need it to be, and our workaround has been to simply convert the BigDecimal to Float before dividing. ```ruby 1.0 / BigDecimal("0.9652409267836026803310997240835632636973e2").to_f # => 0.010360107743589182 ``` ---Files-------------------------------- repro.rb (86 Bytes) ruby-2022-02-24-161721.ips (96 KB) crash.log (469 KB) -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:112041] [Ruby master Feature#19377] Rename Fiber#storage to Fiber.storage
by zverok (Victor Shepelev) 07 Mar '23

07 Mar '23
Issue #19377 has been reported by zverok (Victor Shepelev). ---------------------------------------- Feature #19377: Rename Fiber#storage to Fiber.storage https://bugs.ruby-lang.org/issues/19377 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal ---------------------------------------- Justification: * `#storage`, which pretends to be an instance method, is always available only on `Fiber.current`, which is [problematic to document](https://github.com/ruby/ruby/pull/6985#discussion_r1055796069), and needs special handling when `storage` is called for non-current Fiber; * with class method + docs "storage of the current fiber" it all will be self-evident; * Most of the time, when we declare methods that are available only in the current {something}, they are class methods. (like storage's itself interface of `Fiber::[]` and `Fiber::[]=`, or `Module.used_modules`, which is modules and refinements of the _current context_, but it is not `self.used_modules`, for example) * Code like ```ruby Fiber.current.storage = {foo: 'bar'} Fiber[:foo] ``` ...looks like it is two unrelated things (storage of the _current_ fiber vs some "global" key getter/setter?) I don't see much discussion of this in #19078. Matz in 19078#note-22, while accepting the interface, describes it as homogenous: > (1) fiber[key]/fiber[key]=val - accepted. > (2) fiber.storage => hash - accepted > (3) fiber.storage=hash - should be experimental > ... So I believe it should be either `Fiber.current[]` and `Fiber.current.storage`, or `Fiber[]`, and `Fiber.storage`. The latter is preferable to underline it is only one, related to the current fiber, interface, not "every fiber instance has one (but actually you can use only `current`'s) -- https://bugs.ruby-lang.org/
5 7
0 0
[ruby-core:112706] [Ruby master Bug#19480] invalid keeping_mutexes: Attempt to unlock a mutex which is not locked with fiber scheduler.
by ioquatix (Samuel Williams) 07 Mar '23

07 Mar '23
Issue #19480 has been reported by ioquatix (Samuel Williams). ---------------------------------------- Bug #19480: invalid keeping_mutexes: Attempt to unlock a mutex which is not locked with fiber scheduler. https://bugs.ruby-lang.org/issues/19480 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Assignee: ioquatix (Samuel Williams) * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- The following program has a race condition due to IO write locks: ```ruby #!/usr/bin/env ruby require_relative 'lib/async' def wait_for_interrupt(thread_index, repeat) sequence = [] events = Thread::Queue.new reactor = Async::Reactor.new thread = Thread.new do if events.pop puts "#{thread_index}+#{repeat} Sending Interrupt!" reactor.interrupt end end reactor.async do events << true puts "#{thread_index}+#{repeat} Reactor ready!" # Wait to be interrupted: sleep(1) puts "#{thread_index}+#{repeat} Missing interrupt!" end reactor.run thread.join end 64.times.map do |thread_index| Thread.new do 1000.times do |repeat| wait_for_interrupt(thread_index, repeat) end end end.each(&:join) ``` The error manifests: ``` 58+407 Reactor ready! 58+407 Sending Interrupt! 46+396 Sending Interrupt! 58+408 Sending Interrupt! 46+397 Reactor ready! #<Thread:0x00007f9f681ca8e0 ./test-segfault.rb:11 run> terminated with exception (report_on_exception is true): 52+425 Sending Interrupt! /home/samuel/Projects/socketry/async/lib/async/scheduler.rb:131:in `unblock': undefined method `wakeup' for nil:NilClass (NoMethodError) @selector.wakeup ^^^^^^^ from ./test-segfault.rb:13:in `write' from ./test-segfault.rb:13:in `puts' from ./test-segfault.rb:13:in `puts' from ./test-segfault.rb:13:in `block in wait_for_interrupt' [BUG] invalid keeping_mutexes: Attempt to unlock a mutex which is not locked ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux] -- Control frame information ----------------------------------------------- c:0001 p:---- s:0003 e:000002 DUMMY [FINISH] -- C level backtrace information ------------------------------------------- /home/samuel/.rubies/ruby-3.2.1/bin/ruby(rb_print_backtrace+0xd) [0x560fabaeff41] /home/samuel/src/ruby-3.2.1/vm_dump.c:785 /home/samuel/.rubies/ruby-3.2.1/bin/ruby(rb_vm_bugreport) /home/samuel/src/ruby-3.2.1/vm_dump.c:1080 /home/samuel/.rubies/ruby-3.2.1/bin/ruby(bug_report_end+0x0) [0x560fabca13ab] /home/samuel/src/ruby-3.2.1/error.c:790 /home/samuel/.rubies/ruby-3.2.1/bin/ruby(rb_bug_without_die) /home/samuel/src/ruby-3.2.1/error.c:790 /home/samuel/.rubies/ruby-3.2.1/bin/ruby(die+0x0) [0x560fab8d73b8] /home/samuel/src/ruby-3.2.1/error.c:798 /home/samuel/.rubies/ruby-3.2.1/bin/ruby(rb_bug) /home/samuel/src/ruby-3.2.1/error.c:800 /home/samuel/.rubies/ruby-3.2.1/bin/ruby(thread_start_func_2+0x630) [0x560faba84fa0] /home/samuel/src/ruby-3.2.1/thread.c:434 /home/samuel/.rubies/ruby-3.2.1/bin/ruby(thread_start_func_1+0xdb) [0x560faba857ab] /home/samuel/src/ruby-3.2.1/thread_pthread.c:1170 /usr/lib/libc.so.6(0x7f9f78321bb5) [0x7f9f78321bb5] /usr/lib/libc.so.6(0x7f9f783a3d90) [0x7f9f783a3d90] ``` -- https://bugs.ruby-lang.org/
1 2
0 0
[ruby-core:112638] [Ruby master Bug#19470] Frequent small range-reads from and then writes to a large array are very slow
by giner (Stanislav German-Evtushenko) 07 Mar '23

07 Mar '23
Issue #19470 has been reported by giner (Stanislav German-Evtushenko). ---------------------------------------- Bug #19470: Frequent small range-reads from and then writes to a large array are very slow https://bugs.ruby-lang.org/issues/19470 * Author: giner (Stanislav German-Evtushenko) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- Write to a large array gets very slow when done after range-reading more than 3 items. In such case the original array gets marked as shared which triggers CoW on a small change afterwards. This leads to a significant performance impact and high memory utilization in cases when we need to range-read/write from/to the same array many times. While this issue can be avoided by reading <= 3 elements at a time the main problem is that this behaviour is not obvious and hard to catch on on-trivial projects. ```ruby times = [] arr = [0] * 100000 times.push 0 100000.times do time_start = Time.now arr[5] = 100 # takes 0.01662315899999512 times[-1] += Time.now - time_start end times.push 0 100000.times do arr[0..2] time_start = Time.now arr[5] = 100 # takes 0.01826406799999659 times[-1] += Time.now - time_start end times.push 0 100000.times do arr[0..3] time_start = Time.now arr[5] = 100 # takes 7.757753919000069 times[-1] += Time.now - time_start end times.push 0 100000.times do arr.dup time_start = Time.now arr[5] = 100 # takes 7.626929300999957 times[-1] += Time.now - time_start end times.push 0 100000.times do arr.clone time_start = Time.now arr[5] = 100 # takes 8.216933763000046 times[-1] += Time.now - time_start end p times ``` -- https://bugs.ruby-lang.org/
5 7
0 0
[ruby-core:112503] [Ruby master Feature#19451] Extract path and line number from SyntaxError?
by ioquatix (Samuel Williams) 07 Mar '23

07 Mar '23
Issue #19451 has been reported by ioquatix (Samuel Williams). ---------------------------------------- Feature #19451: Extract path and line number from SyntaxError? https://bugs.ruby-lang.org/issues/19451 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal ---------------------------------------- There doesn't seem to be any official way to extract the path and line number from a syntax error. There are two ways I can see us dong this: - Provide explicit `path` and `line_number` attributes. - Prepend them to `backtrace_locations`. The nice thing about the latter approach is that it will just work with existing tools which understand how to highlight code based on backtrace locations. Maybe we should do both? -- https://bugs.ruby-lang.org/
7 8
0 0
  • ← Newer
  • 1
  • ...
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.