Project

General

Profile

Actions

Bug #18575

closed

[BUG] unsupported: T_NONE

Added by PhilCoggins (Phil Coggins) almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
[ruby-core:107504]

Description

I am seeing this error cropping up in my application, particularly when processing large CSV files. It seems to be semi-related to https://bugs.ruby-lang.org/issues/16689 (Hash#transform_values!, but this particular issue is with Hash#transform_keys!). I am unable how to get a repro script, but it would be very helpful if the one from the linked issue were still available. This seems to be an issue with an unsupported condition in the transient heap (https://github.com/ruby/ruby/blob/v3_0_1/transient_heap.c#L740). Any guidance would be much appreciated, thank you!

Below is the Control Frame Info:

/app/packages/imports-exports/app/models/import.rb:276: [BUG] unsupported: T_NONE 
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux] 
-- Control frame information ----------------------------------------------- 
c:0065 p:---- s:0356 e:000355 CFUNC  :transform_keys! 
c:0064 p:0012 s:0352 e:000351 BLOCK  /app/packages/imports-exports/app/models/import.rb:276 [FINISH] 
c:0063 p:---- s:0347 e:000346 IFUNC  
c:0062 p:---- s:0344 e:000343 CFUNC  :each 
c:0061 p:0042 s:0340 e:000339 METHOD /app/vendor/ruby-3.0.2/lib/ruby/3.0.0/csv/table.rb:539 [FINISH] 
c:0060 p:---- s:0335 e:000334 CFUNC  :map 
c:0059 p:0036 s:0331 E:000448 METHOD /app/packages/imports-exports/app/models/import.rb:274 
c:0058 p:0037 s:0326 e:000325 METHOD /app/packages/imports-exports/app/models/import.rb:200 
c:0057 p:0005 s:0322 e:000321 METHOD /app/packages/fuel/app/public/fleetcor_service/cards_importer.rb:12 
c:0056 p:0020 s:0318 e:000317 METHOD /app/packages/fuel/app/services/concerns/fuel_card_service/base_importer.rb:13 
c:0055 p:0008 s:0311 e:000310 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:196 
c:0054 p:0013 s:0305 e:000304 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:164 
c:0053 p:0009 s:0302 e:000301 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:138 
c:0052 p:0002 s:0299 e:000298 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-throttled-0.15.0/lib/sidekiq/throttled/middleware.rb:14 
c:0051 p:0023 s:0292 e:000291 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0050 p:0005 s:0289 e:000286 METHOD /app/lib/sidekiq/middleware/server_notifications.rb:5 
c:0049 p:0023 s:0279 e:000278 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0048 p:0508 s:0276 e:000275 METHOD /app/lib/sidekiq/middleware/server_metrics.rb:47 
c:0047 p:0023 s:0261 e:000260 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0046 p:0202 s:0258 e:000257 METHOD /app/lib/sidekiq/middleware/server_paper_trail.rb:21 
c:0045 p:0023 s:0251 e:000250 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0044 p:0012 s:0248 e:000247 METHOD /app/lib/sidekiq/middleware/server_current_context.rb:8 
c:0043 p:0023 s:0241 e:000240 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0042 p:0089 s:0238 e:000237 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-status-2.1.3/lib/sidekiq-status/server_middleware.rb:42 
c:0041 p:0023 s:0227 e:000226 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0040 p:0102 s:0224 e:000223 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/newrelic_rpm-8.4.0/lib/new_relic/agent/instrumentation/sidekiq.rb:35 
c:0039 p:0189 s:0221 e:000220 METHOD /app/vendor/bundle/ruby/3.0.0/gems/newrelic_rpm-8.4.0/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:377 
c:0038 p:0052 s:0206 e:000205 METHOD /app/vendor/bundle/ruby/3.0.0/gems/newrelic_rpm-8.4.0/lib/new_relic/agent/instrumentation/sidekiq.rb:30 
c:0037 p:0023 s:0196 e:000195 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0036 p:0002 s:0193 e:000192 METHOD /app/vendor/bundle/ruby/3.0.0/gems/request_store-sidekiq-0.1.0/lib/request_store/sidekiq/server_middleware.rb:5 
c:0035 p:0023 s:0186 e:000185 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0034 p:0052 s:0183 e:000182 METHOD /app/config/initializers/acts_as_tenant.rb:14 
c:0033 p:0023 s:0174 e:000173 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0032 p:0003 s:0171 e:000170 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/appsignal-3.0.20/lib/appsignal/integrations/sidekiq.rb:54 
c:0031 p:0050 s:0168 e:000167 METHOD /app/vendor/bundle/ruby/3.0.0/gems/appsignal-3.0.20/lib/appsignal/helpers/instrumentation.rb:525 
c:0030 p:0082 s:0160 e:000159 METHOD /app/vendor/bundle/ruby/3.0.0/gems/appsignal-3.0.20/lib/appsignal/integrations/sidekiq.rb:53 
c:0029 p:0023 s:0148 e:000147 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:140 
c:0028 p:0024 s:0145 E:0021d8 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/middleware/chain.rb:143 
c:0027 p:0021 s:0138 E:001ec8 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:163 
c:0026 p:0005 s:0134 e:000133 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:136 
c:0025 p:0002 s:0131 e:000130 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/job_retry.rb:114 
c:0024 p:0045 s:0120 e:000119 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:135 
c:0023 p:0003 s:0115 e:000114 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/rails.rb:14 
c:0022 p:0015 s:0112 e:000111 METHOD /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.4/lib/active_support/execution_wrapper.rb:88 
c:0021 p:0005 s:0107 e:000106 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.4/lib/active_support/reloader.rb:72 
c:0020 p:0015 s:0104 e:000103 METHOD /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.4/lib/active_support/execution_wrapper.rb:88 
c:0019 p:0006 s:0099 e:000098 METHOD /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.4/lib/active_support/reloader.rb:71 
c:0018 p:0008 s:0095 e:000094 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/rails.rb:13 
c:0017 p:0007 s:0091 e:000090 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:131 
c:0016 p:0042 s:0088 e:000087 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:257 
c:0015 p:0011 s:0082 e:000081 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:126 
c:0014 p:0042 s:0079 e:000078 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/job_logger.rb:13 
c:0013 p:0013 s:0072 e:000071 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:125 
c:0012 p:0002 s:0069 e:000068 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/job_retry.rb:81 
c:0011 p:0011 s:0059 e:000058 BLOCK  /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:124 
c:0010 p:0017 s:0056 e:000055 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/logger.rb:11 
c:0009 p:0046 s:0050 e:000049 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/job_logger.rb:33 
c:0008 p:0008 s:0043 e:000042 METHOD /app/vendor/bundle/ruby/3.0.0/gems/sidekiq-6.4.0/lib/sidekiq/processor.rb:123 

And the calling implementation that triggers it does the following:

CSV.parse(
  data,
  headers: true,
  col_sep: delimiter,
  quote_char: quote_char,
  skip_blanks: true,
  converters: converter
).map do |row|
  obj = row.to_h
  obj.transform_keys! { |k| k.strip.downcase }.with_indifferent_access # this is line /app/packages/imports-exports/app/models/import.rb:276
end
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0