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 -----
  • 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

July 2024

  • 5 participants
  • 254 discussions
[ruby-core:118399] [Ruby master Bug#20598] Corruption of internal encoding string
by peterzhu2118 (Peter Zhu) 08 Jul '24

08 Jul '24
Issue #20598 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20598: Corruption of internal encoding string https://bugs.ruby-lang.org/issues/20598 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/11068 Just like #20595, Encoding#name_list and Encoding#aliases can have their strings corrupted when Encoding.default_internal is set to nil. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118391] [Ruby master Bug#20595] Corruption of encoding name string
by peterzhu2118 (Peter Zhu) 08 Jul '24

08 Jul '24
Issue #20595 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20595: Corruption of encoding name string https://bugs.ruby-lang.org/issues/20595 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/11062 enc_set_default_encoding will free the C string if the encoding is nil, but the C string can be used by the encoding name string. This will cause the encoding name string to be corrupted. Consider the following code: ```ruby Encoding.default_internal = Encoding::ASCII_8BIT names = Encoding.default_internal.names p names Encoding.default_internal = nil p names ``` It outputs: ``` ["ASCII-8BIT", "BINARY", "internal"] ["ASCII-8BIT", "BINARY", "\x00\x00\x00\x00\x00\x00\x00\x00"] ``` -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:118345] [Ruby master Bug#20585] Size of memory allocated by String.new(:capacity) is different from the specified value
by os (Shigeki OHARA) 08 Jul '24

08 Jul '24
Issue #20585 has been reported by os (Shigeki OHARA). ---------------------------------------- Bug #20585: Size of memory allocated by String.new(:capacity) is different from the specified value https://bugs.ruby-lang.org/issues/20585 * Author: os (Shigeki OHARA) * Status: Open * ruby -v: ruby 3.3.2 (2024-05-30 revision e5a195edf6) [x86_64-freebsd14.0] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- IMHO, if :capacity is specified in String.new, capa will be its value. In fact, Ruby 3.2 seems to allocate the size as specified. ``` % cat string_capacity.rb unless /\A3\.[23]\./ =~ RUBY_VERSION raise NotImplementedError, 'Not Supported Ruby Version' end require 'inline' class String def super_inspect self.class.superclass.instance_method(:inspect).bind(self).call end inline do |builder| builder.include '<stdio.h>' builder.add_compile_flags '-Wall' builder.c_raw <<~CODE VALUE capacity(int argc, VALUE *argv, VALUE self) { struct RString *rstring = RSTRING(self); if (! (RBASIC(self)->flags & RSTRING_NOEMBED)) { return rb_to_symbol(rb_str_new_cstr("EMBED")); } else { if (RBASIC(self)->flags & ELTS_SHARED) { return rb_to_symbol(rb_str_new_cstr("SHARED")); } else { return LONG2NUM(rstring->as.heap.aux.capa); } } return Qnil; /* NOTREACHED */ } CODE end end ``` ``` % irb -I. -rstring_capacity irb(main):001:0> [RUBY_PLATFORM, RUBY_VERSION] => ["x86_64-freebsd14.0", "3.2.4"] irb(main):002:0> String.new('', capacity: 1024).capacity => 1024 irb(main):003:0> String.new('*'*1024, capacity: 1024).capacity => 1024 irb(main):004:0> ``` This is what I expect. However, Ruby 3.3 seems to behave differently. ``` % irb -I. -rstring_capacity irb(main):001> [RUBY_PLATFORM, RUBY_VERSION] => ["x86_64-freebsd14.0", "3.3.2"] irb(main):002> String.new('', capacity: 1024).capacity => 1023 irb(main):003> String.new('*'*1024, capacity: 1024).capacity => 2047 irb(main):004> ``` * If only :capacity is specified, one byte less is allocated. * If the initial string and its bytesize are specified, about twice the size is allocated. Is this intentional? -- https://bugs.ruby-lang.org/
4 4
0 0
[ruby-core:118320] [Ruby master Bug#20581] Ruby 3.3.3 install has missing deps for bundled net-pop gem
by MatzFan (Bruce Steedman) 08 Jul '24

08 Jul '24
Issue #20581 has been reported by MatzFan (Bruce Steedman). ---------------------------------------- Bug #20581: Ruby 3.3.3 install has missing deps for bundled net-pop gem https://bugs.ruby-lang.org/issues/20581 * Author: MatzFan (Bruce Steedman) * Status: Open * ruby -v: ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- A stackoverflow question and answer has identified an issue with the Ruby 3.3.3 install which can cause a failure when bundler installs gem dependencies. https://stackoverflow.com/a/78620570/4114896 A workaround has been described. There is a related issue with the net-pop gem here: https://github.com/ruby/net-pop/issues/26 -- https://bugs.ruby-lang.org/
3 3
0 0
[ruby-core:118226] [Ruby master Bug#20562] Categorize `RUBY_FREE_AT_EXIT` warning
by nobu (Nobuyoshi Nakada) 08 Jul '24

08 Jul '24
Issue #20562 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #20562: Categorize `RUBY_FREE_AT_EXIT` warning https://bugs.ruby-lang.org/issues/20562 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ```sh $ RUBY_FREE_AT_EXIT=1 ruby -W:no-experimental -ep ruby: warning: Free at exit is experimental and may be unstable ``` It should be categorized as experimental as its message. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118417] [Ruby master Bug#20602] RangeError: integer 128496650801200 too big to convert to 'int' without YJIT since cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce
by yahonda (Yasuo Honda) 08 Jul '24

08 Jul '24
Issue #20602 has been reported by yahonda (Yasuo Honda). ---------------------------------------- Bug #20602: RangeError: integer 128496650801200 too big to convert to 'int' without YJIT since cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce https://bugs.ruby-lang.org/issues/20602 * Author: yahonda (Yasuo Honda) * Status: Open * ruby -v: ruby 3.4.0dev (2024-07-02T11:33:48Z master cee62c6738) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I have opened https://bugs.ruby-lang.org/issues/20588 and the test case has been fixed via 4cbc41d5e5cb6793174d5964975fdb4470323ca1 , It looks like there are another test case that still reproduces against the latest master branch like cee62c6738c42ce774e96e180cf2d46afb8e9cbe since cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce ### Steps to reproduce ``` git clone https://github.com/rails/rails cd rails/activejob bundle install AJ_ADAPTER=test bin/test "test/cases/test_helper_test.rb" --seed 36347 -n "/^(?:EnqueuedJobsTest#(?:test_assert_enqueued_with_supports_matcher_procs|test_assert_no_enqueued_jobs_with_except_and_queue_option))$/" ``` ### Expected behavior It should pass. ### Actual behavior It always gets the RangeError. ``` $ AJ_ADAPTER=test bin/test "test/cases/test_helper_test.rb" --seed 36347 -n "/^(?:EnqueuedJobsTest#(?:test_assert_enqueued_with_supports_matcher_procs|test_assert_no_enqueued_jobs_with_except_and_queue_option))$/" /home/yahonda/rails/activesupport/lib/active_support/logger_thread_safe_level.rb:4: warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add logger to your Gemfile or gemspec. Using test Run options: --seed 36347 -n "/^(?:EnqueuedJobsTest#(?:test_assert_enqueued_with_supports_matcher_procs|test_assert_no_enqueued_jobs_with_except_and_queue_option))$/" # Running: .E Error: EnqueuedJobsTest#test_assert_no_enqueued_jobs_with_except_and_queue_option: RangeError: integer 136797572683520 too big to convert to 'int' lib/active_job/configured_job.rb:15:in 'ActiveJob::ConfiguredJob#perform_later' test/cases/test_helper_test.rb:496:in 'block (2 levels) in EnqueuedJobsTest#test_assert_no_enqueued_jobs_with_except_and_queue_option' /home/yahonda/rails/activesupport/lib/active_support/testing/assertions.rb:49:in 'ActiveSupport::Testing::Assertions#assert_nothing_raised' /home/yahonda/rails/activesupport/lib/active_support/testing/assertions.rb:266:in 'ActiveSupport::Testing::Assertions#_assert_nothing_raised_or_warn' lib/active_job/test_helper.rb:128:in 'ActiveJob::TestHelper#assert_enqueued_jobs' lib/active_job/test_helper.rb:189:in 'ActiveJob::TestHelper#assert_no_enqueued_jobs' test/cases/test_helper_test.rb:495:in 'block in EnqueuedJobsTest#test_assert_no_enqueued_jobs_with_except_and_queue_option' /home/yahonda/rails/activesupport/lib/active_support/testing/assertions.rb:49:in 'ActiveSupport::Testing::Assertions#assert_nothing_raised' test/cases/test_helper_test.rb:494:in 'EnqueuedJobsTest#test_assert_no_enqueued_jobs_with_except_and_queue_option' bin/test test/cases/test_helper_test.rb:493 Finished in 0.010521s, 190.0966 runs/s, 1140.5794 assertions/s. 2 runs, 12 assertions, 0 failures, 1 errors, 0 skips $ ``` -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118484] [Ruby master Bug#20616] <jemalloc>: Error in munmap(): Invalid argument
by damuz91 08 Jul '24

08 Jul '24
Issue #20616 has been reported by damuz91 (David Muñoz). ---------------------------------------- Bug #20616: <jemalloc>: Error in munmap(): Invalid argument https://bugs.ruby-lang.org/issues/20616 * Author: damuz91 (David Muñoz) * Status: Open * ruby -v: 3.3.2 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Good day! Description: I am getting the following error randomly. I run the offending code every 10 minutes and some times it crashes and some it doesn't, I am clueless. The error states: ``` <jemalloc>: Error in munmap(): Invalid argument [BUG] Segmentation fault at 0x0000ffff69bfe000 ruby 3.3.2 (2024-05-30 revision e5a195edf6) [aarch64-linux] ``` I've published the backtrace: https://gist.github.com/damuz91/429bed215c7ff13ee33e3968d52a4729 My app runs Sidekiq which runs the offending code, i've submitted the code in Sidekiq but maintainer says it's not related to Sidekiq. ``` OS: Amazon Linux 2 aarch64 Ruby version: 3.3.2 Rails version: 7.1.3.4 ``` The offending line states: ``` Jul 05 05:00:01 subsystems-sync sidekiq[11766]: c:0048 p:0049 s:0277 e:000276 METHOD /home/ec2-user/production/sync-backend/releases/370/app/services/scheduler/partial_sync_scheduler_job.rb:6 ``` and my source code looks like this: ``` class Scheduler::PartialSyncSchedulerJob include Sidekiq::Job def perform(location_ids = []) locations = location_ids.any? ? Location.where(id: location_ids) : Location.enabled.should_sync.includes(:customer).where.not(customers: {service_object: ['xxx', 'yyy']}) locations.each do |location| # <- Line 6 if location.use_workflow PartialSync::Workflow.perform_async(location.id) else queue = location.customer.service_object.underscore.to_sym Sync::PartialSyncJob.set(queue: queue).perform_later(location.id) end end end end ``` I am not sure where to start looking, I would really appreciate any insight to try to find out if this is indeed a bug in Ruby or if this is a jemalloc issue. Thanks in advance. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118482] [Ruby master Feature#20613] Implement shadow stack part of (CET) for coroutines
by vo.x (Vit Ondruch) 08 Jul '24

08 Jul '24
Issue #20613 has been reported by vo.x (Vit Ondruch). ---------------------------------------- Feature #20613: Implement shadow stack part of (CET) for coroutines https://bugs.ruby-lang.org/issues/20613 * Author: vo.x (Vit Ondruch) * Status: Open ---------------------------------------- To fully enable CET, shadow stack needs to be implemented for coroutines. The initial implementation was proposed [here](https://github.com/ruby/ruby/pull/5895) by @ioquatix as part of #18061 -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:118476] [Ruby master Bug#20611] Ruby 3.3: Tempfile.size returns 0
by jbw (Jerry W) 08 Jul '24

08 Jul '24
Issue #20611 has been reported by jbw (Jerry W). ---------------------------------------- Bug #20611: Ruby 3.3: Tempfile.size returns 0 https://bugs.ruby-lang.org/issues/20611 * Author: jbw (Jerry W) * Status: Open * ruby -v: 3.3.3 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Hi I searched to see if this was reported already, or if it was somehow intentional but I'm having an issue with Ruby 3.3.3. I run under rbenv 2.7.6 on amd64 linux (debian 6.6.13-1 kernel). For me, ruby 3.3.3 exhibits some oddness with the Tempfile class whereas Ruby 3.2 and older does not. I have only tested ruby 3.3.3 not other 3.3.x releases: ff = Tempfile.new('foo'); puts "Size now: #{ff.size}"; File.open(ff.path, "a").tap {|f|| f.write('moredata'); f.close } ; puts "Finish size: #{ff.size} vs actual: #{File.size(ff.path)}" Size now: 0 Finish size: 0 vs actual: 8 As you can see, ff.size should have returned 8. If i try the same code on ruby 3.2.2 for example it works as expected: ff = Tempfile.new('foo'); puts "Size now: #{ff.size}"; File.open(ff.path, "a").tap {|f| f.write('moredata'); f.close } ; ff.size; puts "Finish size: #{ff.size} vs actual: #{File.size(ff.path)}" Size now: 0 Finish size: 8 vs actual: 8 -- https://bugs.ruby-lang.org/
1 2
0 0
[ruby-core:116078] [Ruby master Bug#20162] Memory leak when duplicating too complex object
by peterzhu2118 (Peter Zhu) 08 Jul '24

08 Jul '24
Issue #20162 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20162: Memory leak when duplicating too complex object https://bugs.ruby-lang.org/issues/20162 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: DONTNEED, 3.2: REQUIRED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/9449 Creating a ST table then calling st_replace leaks memory because the st_replace overwrites the ST table without freeing any of the existing memory. This commit changes it to use st_copy instead. For example: ```ruby RubyVM::Shape.exhaust_shapes o = Object.new o.instance_variable_set(:@a, 0) 10.times do 100_000.times { o.dup } puts `ps -o rss= -p #{$$}` end ``` Before: ``` 23264 33600 42672 52160 61600 71728 81056 90528 100560 109840 ``` After: ``` 14752 14816 15584 15584 15664 15664 15664 15664 15664 15664 ``` -- https://bugs.ruby-lang.org/
3 2
0 0
  • ← Newer
  • 1
  • ...
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.