Skip to content

Segmentation fault CFUNC :vips_foreign_find_load #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brendon opened this issue Apr 11, 2025 · 28 comments
Closed

Segmentation fault CFUNC :vips_foreign_find_load #417

brendon opened this issue Apr 11, 2025 · 28 comments
Labels

Comments

@brendon
Copy link

brendon commented Apr 11, 2025

Describe the bug
Segfault:

/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/ruby-vips-2.2.3/lib/vips/image.rb:280: [BUG] Segmentation fault at 0x0000000121f90a68
ruby 3.3.7 (2025-01-15 revision be31f993d7) [arm64-darwin24]

-- Crash Report log information --------------------------------------------
   See Crash Report log file in one of the following locations:
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   for more details.
Don't forget to include the above Crash Report log file in bug reports.

-- Control frame information -----------------------------------------------
c:0079 p:---- s:0458 e:000457 CFUNC  :vips_foreign_find_load
c:0078 p:0044 s:0453 e:000452 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/ruby-vips-2.2.3/lib/vips/image.rb:280
c:0077 p:0011 s:0444 e:000443 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer/image_analyzer/vi
c:0076 p:0010 s:0441 e:000440 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210
c:0075 p:0027 s:0438 e:000437 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications/instrumenter
c:0074 p:0023 s:0430 e:000429 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210
c:0073 p:0012 s:0424 e:000423 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer.rb:47
c:0072 p:0007 s:0418 e:000417 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer/image_analyzer/vi
c:0071 p:0025 s:0412 E:000d58 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/downloader.rb:15
c:0070 p:0017 s:0408 E:000dc8 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/downloader.rb:24
c:0069 p:0017 s:0401 E:000d30 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/downloader.rb:12
c:0068 p:0018 s:0391 E:000e38 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/service.rb:92
c:0067 p:0042 s:0384 E:000ea8 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/app/models/active_storage/blob.rb:305
c:0066 p:0012 s:0377 E:000f08 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer.rb:35
c:0065 p:0011 s:0372 E:000cb0 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer/image_analyzer/vi
c:0064 p:0004 s:0368 E:000c60 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer/image_analyzer.rb
c:0063 p:0004 s:0364 E:000f30 METHOD /Users/brendon/Projects/SpikeAtSchool/config/initializers/active_storage.rb:6
c:0062 p:0005 s:0360 E:000f50 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/app/models/active_storage/blob/analyzable.rb:
c:0061 p:0007 s:0356 E:000f70 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/app/models/active_storage/blob/analyzable.rb:
c:0060 p:0004 s:0350 E:000f98 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/app/jobs/active_storage/analyze_job.rb:11
c:0059 p:0008 s:0345 E:000fc0 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:68
c:0058 p:0048 s:0342 E:001010 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:120
c:0057 p:0048 s:0332 E:001050 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/bugsnag-6.27.1/lib/bugsnag/integrations/rails/active_job.rb:43 [FINISH]
c:0056 p:---- s:0325 e:000324 CFUNC  :instance_exec
c:0055 p:0127 s:0319 E:0010a0 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129
c:0054 p:0026 s:0310 E:0010d0 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/i18n-1.14.7/lib/i18n.rb:353
c:0053 p:0011 s:0304 E:001100 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/translation.rb:9 [FINISH]
c:0052 p:---- s:0299 e:000298 CFUNC  :instance_exec
c:0051 p:0127 s:0293 E:001150 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129
c:0050 p:0027 s:0284 E:001188 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/core_ext/time/zones.rb:65
c:0049 p:0011 s:0277 E:0011c0 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/timezones.rb:9 [FINISH]
c:0048 p:---- s:0272 e:000271 CFUNC  :instance_exec
c:0047 p:0127 s:0266 E:001210 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129
c:0046 p:0110 s:0257 E:000030 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:140
c:0045 p:0014 s:0247 E:002370 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:67
c:0044 p:0010 s:0243 E:001230 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:32
c:0043 p:0022 s:0239 E:001260 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:51
c:0042 p:0004 s:0233 E:001280 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:26
c:0041 p:0011 s:0230 E:0012b0 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activerecord-8.0.1/lib/active_record/railties/job_runtime.rb:13
c:0040 p:0011 s:0225 E:001348 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:40
c:0039 p:0010 s:0221 E:0013d0 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210
c:0038 p:0027 s:0218 E:001440 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications/instrumenter
c:0037 p:0023 s:0210 E:0013b0 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210
c:0036 p:0039 s:0204 E:001318 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:39
c:0035 p:0025 s:0197 E:001758 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activerecord-8.0.1/lib/active_record/railties/job_runtime.rb:11
c:0034 p:0006 s:0190 E:001720 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:26
c:0033 p:0004 s:0186 E:001480 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/logging.rb:32
c:0032 p:0003 s:0183 E:001500 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/tagged_logging.rb:143
c:0031 p:0014 s:0180 E:001560 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/tagged_logging.rb:38
c:0030 p:0015 s:0174 E:0014e0 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/tagged_logging.rb:143
c:0029 p:0047 s:0168 E:0015d8 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/broadcast_logger.rb:241
c:0028 p:0034 s:0159 E:001640 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/logging.rb:39
c:0027 p:0012 s:0153 E:001460 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/logging.rb:32
c:0026 p:0011 s:0149 E:001668 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:29
c:0025 p:0048 s:0145 E:0016c0 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:120
c:0024 p:0004 s:0135 E:001710 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/railtie.rb:95
c:0023 p:0008 s:0132 E:001798 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/reloader.rb:77
c:0022 p:0016 s:0128 E:001810 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/execution_wrapper.rb:87
c:0021 p:0016 s:0120 E:001768 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/reloader.rb:74
c:0020 p:0008 s:0115 E:0016f0 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/railtie.rb:94 [FINISH]
c:0019 p:---- s:0110 e:000109 CFUNC  :instance_exec
c:0018 p:0127 s:0104 E:001860 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129
c:0017 p:0110 s:0095 E:001ee0 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:140
c:0016 p:0007 s:0085 E:001e58 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:27
c:0015 p:0020 s:0080 E:001888 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/app/models/solid_queue/claimed_execution.rb:95
c:0014 p:0003 s:0075 E:0018b8 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/app/models/solid_queue/claimed_execution.rb:61
c:0013 p:0005 s:0070 E:001910 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/lib/solid_queue/pool.rb:23
c:0012 p:0024 s:0067 E:001980 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/execution_wrapper.rb:91
c:0011 p:0018 s:0059 E:0019d8 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/lib/solid_queue/app_executor.rb:7
c:0010 p:0005 s:0054 E:0018e8 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/lib/solid_queue/pool.rb:22
c:0009 p:0011 s:0050 E:001a18 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:
c:0008 p:0012 s:0041 E:001a50 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:
c:0007 p:0008 s:0036 E:001a90 METHOD /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/rub
c:0006 p:0041 s:0028 E:001ac8 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/rub
c:0005 p:0018 s:0022 E:000e78 METHOD <internal:kernel>:187
c:0004 p:0004 s:0017 E:000b40 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/rub [FINISH]
c:0003 p:---- s:0014 e:000013 CFUNC  :catch
c:0002 p:0006 s:0009 E:000a68 BLOCK  /Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/rub [FINISH]
c:0001 p:---- s:0003 e:000002 DUMMY  [FINISH]

-- Ruby level backtrace information ----------------------------------------
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:340:in `block in create_worker'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:340:in `catch'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:341:in `block (2 levels) in create_worker'
<internal:kernel>:187:in `loop'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:350:in `block (3 levels) in create_worker'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:359:in `run_task'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:1776:in `block in on_resolvable'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:1593:in `evaluate_to'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/lib/solid_queue/pool.rb:22:in `block in post'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/lib/solid_queue/app_executor.rb:7:in `wrap_in_app_executor'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/execution_wrapper.rb:91:in `wrap'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/lib/solid_queue/pool.rb:23:in `block (2 levels) in post'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/app/models/solid_queue/claimed_execution.rb:61:in `perform'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/solid_queue-1.1.4/app/models/solid_queue/claimed_execution.rb:95:in `execute'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:27:in `execute'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:140:in `run_callbacks'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in `block in run_callbacks'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in `instance_exec'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/railtie.rb:94:in `block (3 levels) in <class:Railtie>'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/reloader.rb:74:in `wrap'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/execution_wrapper.rb:87:in `wrap'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/reloader.rb:77:in `block in wrap'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/railtie.rb:95:in `block (4 levels) in <class:Railtie>'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:120:in `block in run_callbacks'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:29:in `block in execute'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/logging.rb:32:in `perform_now'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/logging.rb:39:in `tag_logger'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/broadcast_logger.rb:241:in `method_missing'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/tagged_logging.rb:143:in `tagged'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/tagged_logging.rb:38:in `tagged'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/tagged_logging.rb:143:in `block in tagged'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/logging.rb:32:in `block in perform_now'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:26:in `perform_now'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activerecord-8.0.1/lib/active_record/railties/job_runtime.rb:11:in `instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:39:in `instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210:in `instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210:in `block in instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:40:in `block in instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activerecord-8.0.1/lib/active_record/railties/job_runtime.rb:13:in `block in instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:26:in `block in perform_now'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:51:in `perform_now'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:32:in `_perform_job'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:67:in `_perform_job'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:140:in `run_callbacks'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in `block in run_callbacks'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in `instance_exec'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/core_ext/time/zones.rb:65:in `use_zone'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in `block in run_callbacks'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in `instance_exec'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/i18n-1.14.7/lib/i18n.rb:353:in `with_locale'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in `block in run_callbacks'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in `instance_exec'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/bugsnag-6.27.1/lib/bugsnag/integrations/rails/active_job.rb:43:in `block (2 levels) in included'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:120:in `block in run_callbacks'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activejob-8.0.1/lib/active_job/execution.rb:68:in `block in _perform_job'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/app/jobs/active_storage/analyze_job.rb:11:in `perform'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/app/models/active_storage/blob/analyzable.rb:30:in `analyze'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/app/models/active_storage/blob/analyzable.rb:52:in `extract_metadata_via_analyzer'
/Users/brendon/Projects/SpikeAtSchool/config/initializers/active_storage.rb:6:in `metadata'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer/image_analyzer.rb:20:in `metadata'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer/image_analyzer/vips.rb:20:in `read_image'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer.rb:35:in `download_blob_to_tempfile'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/app/models/active_storage/blob.rb:305:in `open'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/service.rb:92:in `open'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/downloader.rb:12:in `open'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/downloader.rb:24:in `open_tempfile'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/downloader.rb:15:in `block in open'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer/image_analyzer/vips.rb:21:in `block in read_image'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer.rb:47:in `instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210:in `instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210:in `block in instrument'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/activestorage-8.0.1/lib/active_storage/analyzer/image_analyzer/vips.rb:23:in `block (2 levels) in read_image'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/ruby-vips-2.2.3/lib/vips/image.rb:280:in `new_from_file'
/Users/brendon/.rbenv/versions/3.3.7/lib/ruby/gems/3.3.0/gems/ruby-vips-2.2.3/lib/vips/image.rb:280:in `vips_foreign_find_load'

-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 16

-- Machine register context ------------------------------------------------
  x0: 0x000000016c58b0ac  x1: 0x0000000000000002  x2: 0x000000019c3facdc
  x3: 0x000000016c585a6a  x4: 0x0000000000000008  x5: 0x000000016c585dc0
  x6: 0x0000000000000000  x7: 0x00000000000003a0 x18: 0x0000000000000000
 x19: 0x0000600003956480 x20: 0x0000600003956480 x21: 0x0000000121f90a6a
 x22: 0x00000001f86a2000 x23: 0x000000013284b200 x24: 0x000000000000002d
 x25: 0x00000001f652f000 x26: 0x00000001f652f000 x27: 0x00000001f8704000
 x28: 0x00000001f63d4968  lr: 0x000000018ea7f6b8  fp: 0x000000016c5859f0
  sp: 0x000000016c5859b0

-- C level backtrace information -------------------------------------------
/Users/brendon/.rbenv/versions/3.3.7/lib/libruby.3.3.dylib(rb_vm_bugreport+0xb4c) [0x105556248]
/Users/brendon/.rbenv/versions/3.3.7/lib/libruby.3.3.dylib(rb_bug_for_fatal_signal+0x100) [0x1053976e4]
/Users/brendon/.rbenv/versions/3.3.7/lib/libruby.3.3.dylib(sig_do_nothing+0x0) [0x1054bc338]
/usr/lib/system/libsystem_platform.dylib(_sigtramp+0x38) [0x18ed66de4]
/usr/lib/system/libsystem_trace.dylib(_os_log_preferences_refresh+0x24) [0x18ea7f6b8]
[0x18ea8003c]
[0x19c3fae68]
[0x19c3f9f78]
[0x18ebc9cc0]
[0x19608de1c]
[0x19609c58c]
[0x196015264]
[0x1339fc494]
[0x133a0cf54]
[0x1339f8a54]
[0x1339f8960]
[0x13032b210]
[0x126bac078]
[0x126c9dcb0]
[0x126babd70]
[0x126babf9c]

-- Other runtime information -----------------------------------------------

[TRUNCATED]

I've attached the full segfault log and the diagnostics report.

segfault.txt

ruby-2025-04-11-180731.ips.txt

To Reproduce
Simply creating a new Blob with ActiveStorage:

    blob = ActiveStorage::Blob.create_and_upload!(
      io: file.open,
      filename: file.basename.to_s
    )

This is the file:

Image

But I don't think it's the file. There are many different images that cause this. I was initially getting [__NSCFConstantString initialize] may have been in progress in another thread when fork() was called errors but managed to work around these by requiring vips early: rails/rails#38560 (comment)

Expected behavior
It should not segfault.

Desktop (please complete the following information):

  • OS: macOS 15.3.2 (24D81)
  • Processor: Apple M1 Pro

Additional context
I've tried updating homebrew vips to the latest version.

@brendon brendon added the bug label Apr 11, 2025
@brendon
Copy link
Author

brendon commented Apr 11, 2025

I'm new to diagnosing segfaults but I can trigger this one readily so please let me know what things to try to narrow down the issue here.

@brendon
Copy link
Author

brendon commented Apr 11, 2025

Removing the require: "image_processing/vips" from the Gemfile reverts the behaviour to:

objc[4360]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[4360]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

@kleisauke
Copy link
Member

Given that Rails uses Puma (and the stack traces reference it), I wonder if this relates to #155. Does the issue still occur on macOS if you set the OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes environment variable?

Alternatively, you might try the suggestion in #155 (comment).

@brendon
Copy link
Author

brendon commented Apr 11, 2025

Thanks @kleisauke, OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes without explicitly requiring vips in the Gemfile acts the same as just requiring vips explicitly in the Gemfile without OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes, as in it segfaults. If neither things are done then we get the crash message instead.

I guess I've just found a way to reliably produce this problem on my machine.

Solid Queue is running in standalone mode bin/jobs and I don't think that invokes Puma? That's the process that's crashing. So far I am kicking off retries of the AnanlyzeLater job via Mission Control (the rails interface for Solid Queue), and that'll be running under Puma (puma-dev), so perhaps there's an issue between these two things? Will try kicking the job off using the rails console.

@brendon
Copy link
Author

brendon commented Apr 11, 2025

Kicking off analyse_later from the rails console didn't change things either. And the following in puma.rb also didn't help:

before_fork do
  # ensure native libraries are initialized before forking
  if RUBY_PLATFORM =~ /darwin/
    require 'vips'
  end
end

Such a strange one :) Could this be the year of the Linux Laptop?

@brendon
Copy link
Author

brendon commented Apr 12, 2025

I also tried completely removing Puma from the Gemfile, ran bundle and kicked off an analyze_later from the console while running bin/jobs and still got the same:

objc[21465]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[21465]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

So that rules out Puma. I think it's something deep in the guts of the Vips stack :( Might have to look at assembling a minimum example of the problem.

@kleisauke
Copy link
Member

Could you also reproduce this when setting OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES system-wide? For example:

$ echo "export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES" >> ~/.zshenv

(you might need to restart any active Zsh sessions after this)

@brendon
Copy link
Author

brendon commented Apr 12, 2025

Yes unfortunately that still results in a segfault. I think the fork safety that it bypasses actually allows the segfault to occur instead of the warning. It's just that for most people, they're just lucky and the code runs fine most of the time even though it's unsafe. My situation seems to always break. My guess is it's one of the many dependencies of vips.

@kleisauke
Copy link
Member

Ah, that's a bummer - let's re-open this.

I had a look at the ruby-ffi issues and ffi/ffi#864 looked very similar, though that might be a bit outdated now. Does the example at https://github.com/ffi/ffi#synopsis work on your end?

$ ruby -e 'require "ffi"; module MyLib; extend FFI::Library; ffi_lib "c"; attach_function :puts, [:string], :int; end; MyLib.puts "Hello, World using libc!"'
Hello, World using libc!

Also, just to rule out any fork-safety issues, does this minimal CLI test trigger those fork()-errors?

$ ruby -e 'if pid = fork; p Process.wait2(pid) else require "vips" end'

@kleisauke kleisauke reopened this Apr 13, 2025
@brendon
Copy link
Author

brendon commented Apr 13, 2025

Thanks @kleisauke, I'm usually quite self-sufficient in figuring out issues but this one has got a bit above my pay grade so I appreciate the help :)

Here's the output from those commands:

❯ ruby -e 'require "ffi"; module MyLib; extend FFI::Library; ffi_lib "c"; attach_function :puts, [:string], :int; end; MyLib.puts "Hello, World using libc!"'
Hello, World using libc!

❯ ruby -e 'if pid = fork; p Process.wait2(pid) else require "vips" end'
objc[28266]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[28266]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
[28266, #<Process::Status: pid 28266 SIGABRT (signal 6)>]

❯ OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ruby -e 'if pid = fork; p Process.wait2(pid) else require "vips" end'
[28979, #<Process::Status: pid 28979 exit 0>]

I found a thread that mentioned a project that used VIPS on startup and that was causing it to load VIPS before the fork. I wonder if I'm somehow doing that unwittingly. Definitely not processing images on boot though! :)

@kleisauke
Copy link
Member

Thanks! The output looks as expected. It's a bit odd that the segfault is happening in vips_foreign_find_load(). If it were an issue with ruby-ffi, I'd expect the crash to happen earlier - probably during the call to vips_filename_get_filename().

This might be a long shot, but could you try temporarily renaming the $(brew --prefix vips)/lib/vips-modules-x.y directory? I'm wondering if it's related to loadable modules. On Linux, we link the main library with -Wl,-z,nodelete to prevent it from being unloaded, but that linker flag doesn't work on macOS.

@kleisauke
Copy link
Member

Looking into this further, it may end up calling vips_foreign_find_load(NULL) for unknown reasons. If that happens, you can try setting the G_DEBUG=fatal-criticals environment variable to force the program to abort on criticals.

To debug the dynamic loadable modules, the G_DEBUG=bind-now-modules or the DYLD_BIND_AT_LAUNCH=YES (which is the same as LD_BIND_NOW=1 on Linux) environment variables may also be useful. Though, it's often easier to just rename the vips-modules-x.y directory to disable these modules entirely.

@brendon
Copy link
Author

brendon commented Apr 13, 2025

Ah interesting :) Renaming the vips-modules directory did the trick. It works with:

OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES bin/jobs but still issues the warning without the fork safety disabled.

Preloading vips with image_processing also works: gem "image_processing", require: "image_processing/vips"

I'll dig into the modules and try to figure out the culprit.

@brendon
Copy link
Author

brendon commented Apr 13, 2025

Ah! Found it. It's vips-poppler.dylib. I'll keep looking into this. I don't think this is a standard library to have? I think I have it for PDF previews.

@brendon
Copy link
Author

brendon commented Apr 13, 2025

So on homebrew, poppler is a hard dependency of vips. In production I don't appear to be explicitly installing it from apt but I have installed the libraries in my custom production build of vips (I needed the latest version for better HEIC support. I'm fairly certain I don't use it to generate PDF thumbnails and the files that trigger the crash are just images (JPEG etc...), so I'm wondering if the bug is just in the loading code: https://github.com/libvips/libvips/blob/master/libvips/module/poppler.c rather than deep in poppler.

Not sure where I should open an issue from here. Possibly the vips repo?

@kleisauke
Copy link
Member

Thanks for tracking that down! I suspect the issue lies somewhere in Poppler (or one of its dependencies). I also noticed Poppler depends on cURL, which also had issues with fork()-ing in the past.

Could you provide a standalone reproducer for this? I'll attempt to reproduce this on a Apple Mac mini M1 (2020) provided by Scaleway, as I currently don't have access to any other macOS device.

Not sure where I should open an issue from here. Possibly the vips repo?

I think we can track it here, given that this only occurs when using Rails (possibly due to its use of fork()).

@kleisauke kleisauke marked this as a duplicate of #412 Apr 14, 2025
@brendon
Copy link
Author

brendon commented Apr 15, 2025

Thanks @kleisauke, that's no worries at all :)

I've created a private repo here: https://github.com/brendon/poppler-test and have added you as a contributor.

It's a bare bones Rails app with an sqlite database. Interestingly when I was setting up Active Storage I couldn't produce the segfault when using the local storage engine so I had to set up a temporary R2 bucket for this. That seems to point more clearly to curl possibly being the problem as it's figured by a fetch of the file from a remote location.

Here's the steps to reproduce the segfault:

Check out the project then:

$ bundle
$ rails db:prepare

In one terminal tab:
$ bin/jobs

In another tab:
$ rails c

Then run the following in the console

file = Rails.root.join("public", "image.jpg")

blob = ActiveStorage::Blob.create_and_upload!(
  io: file.open,
  filename: file.basename.to_s
)

blob.analyze_later

analyze_later will kick off the retrieval and you'll see the segfault in the bin/jobs console.

I added , require: "image_processing/vips" to the image_processing gem call in order to load Vips early otherwise we get the fork warning instead of the segfault.

@kleisauke
Copy link
Member

I couldn't reproduce the issue with Ruby 3.3.7 or 3.4.3 installed using rbenv on a Apple Mac mini M1 provided by Scaleway, running macOS 15.2. The image was successfully uploaded to the Cloudflare R2 bucket.

The good news is that those fork-safety errors can also be resolved by using the linker flags I suggested in puma/puma#1421 (comment).

$ rbenv install 3.4.3 -- LDFLAGS="-Wl,-sectcreate,__DATA_CONST,__objc_imageinfo,/dev/null -Wl,-sectcreate,__DATA,__objc_fork_ok,/dev/null"
$ rbenv local 3.4.3
$ curl -LO https://wsrv.nl/zebra.jpg
$ ruby -e 'if pid = fork; p Process.wait2(pid) else require "vips"; p Vips.vips_foreign_find_load "zebra.jpg" end'
"VipsForeignLoadJpegFile"
[17702, #<Process::Status: pid 17702 exit 0>]

@kleisauke
Copy link
Member

kleisauke commented Apr 15, 2025

Let me try reinstalling that Mac mini with macOS Sequoia 15.3.1 (which takes around two hours to complete 😅). Here's all version info of that successful run:

Details
$ ruby --version
ruby 3.4.3 (2025-04-14 revision d0b7e5b6a0) +PRISM [arm64-darwin24]
$ rails --version
Rails 8.0.2
$ brew --version
Homebrew 4.4.30
$ brew list --installed-on-request
rbenv
vips
$ curl -V
curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.63.0
Release-Date: 2024-03-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe UnixSockets
$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 15.2 (24C101)
      Kernel Version: Darwin 24.2.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: e075e6e6-8703-4ea3-b0b8-429b5e3db09a
      User Name: m1 (m1)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 1 day, 27 minutes
$ gem list

*** LOCAL GEMS ***

actioncable (8.0.2)
actionmailbox (8.0.2)
actionmailer (8.0.2)
actionpack (8.0.2)
actiontext (8.0.2)
actionview (8.0.2)
activejob (8.0.2)
activemodel (8.0.2)
activerecord (8.0.2)
activestorage (8.0.2)
activesupport (8.0.2)
addressable (2.8.7)
ast (2.4.3)
aws-eventstream (1.3.2)
aws-partitions (1.1087.0)
aws-sdk-core (3.222.1)
aws-sdk-kms (1.99.0)
aws-sdk-s3 (1.183.0)
aws-sigv4 (1.11.0)
base64 (0.2.0)
bcrypt_pbkdf (1.1.1)
benchmark (0.4.0)
bigdecimal (3.1.9)
bindex (0.8.1)
bootsnap (1.18.4)
brakeman (7.0.2)
builder (3.3.0)
bundler (2.6.8, default: 2.6.7, 2.5.22)
capybara (3.40.0)
cgi (default: 0.4.2)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
crass (1.0.6)
date (3.4.1)
debug (1.10.0)
delegate (default: 0.4.0)
did_you_mean (default: 2.0.0)
digest (default: 3.2.0)
dotenv (3.1.8)
drb (2.2.1)
ed25519 (1.3.0)
english (default: 0.8.0)
erb (default: 4.0.4)
error_highlight (default: 0.7.0)
erubi (1.13.1)
et-orbi (1.2.11)
etc (default: 1.4.5)
fcntl (default: 1.2.0)
ffi (1.17.1 arm64-darwin)
fiddle (default: 1.1.6)
fileutils (default: 1.7.3)
find (default: 0.2.0)
forwardable (default: 1.3.3)
fugit (1.11.1)
globalid (1.2.1)
i18n (1.14.7)
image_processing (1.14.0)
importmap-rails (2.1.0)
io-console (0.8.0)
io-nonblock (default: 0.3.1)
io-wait (default: 0.3.1)
ipaddr (default: 1.2.7)
irb (1.15.2, default: 1.14.3)
jbuilder (2.13.0)
jmespath (1.6.2)
json (2.10.2, default: 2.9.1)
kamal (2.5.3)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
logger (1.7.0, default: 1.6.4)
loofah (2.24.0)
mail (2.8.1)
marcel (1.0.4)
matrix (0.4.2)
mini_magick (5.2.0)
mini_mime (1.1.5)
minitest (5.25.5)
msgpack (1.8.0)
net-http (default: 0.6.0)
net-imap (0.5.6)
net-pop (0.1.2)
net-protocol (0.2.2)
net-scp (4.1.0)
net-sftp (4.0.0)
net-smtp (0.5.1)
net-ssh (7.3.0)
nio4r (2.7.4)
nokogiri (1.18.7 arm64-darwin)
open-uri (default: 0.5.0)
open3 (default: 0.2.1)
openssl (default: 3.3.0)
optparse (default: 0.6.0)
ostruct (0.6.1)
parallel (1.27.0)
parser (3.3.8.0)
pathname (default: 0.4.0)
pp (0.6.2)
prettyprint (0.2.0)
prism (1.4.0, default: 1.2.0)
propshaft (1.1.0)
pstore (default: 0.1.4)
psych (5.2.3, default: 5.2.2)
public_suffix (6.0.1)
puma (6.6.0)
raabro (1.4.0)
racc (1.8.1)
rack (3.1.13)
rack-session (2.1.0)
rack-test (2.2.0)
rackup (2.2.1)
rails (8.0.2)
rails-dom-testing (2.2.0)
rails-html-sanitizer (1.6.2)
railties (8.0.2)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.13.1, default: 6.10.0)
readline (default: 0.0.4)
regexp_parser (2.10.0)
reline (0.6.1, default: 0.6.0)
resolv (default: 0.6.0)
rexml (3.4.1)
rubocop (1.75.2)
rubocop-ast (1.44.1)
rubocop-performance (1.25.0)
rubocop-rails (2.31.0)
rubocop-rails-omakase (1.1.0)
ruby-progressbar (1.13.0)
ruby-vips (2.2.3)
ruby2_keywords (default: 0.0.5)
rubyzip (2.4.1)
securerandom (0.4.1)
selenium-webdriver (4.31.0)
set (default: 1.1.1)
shellwords (default: 0.2.2)
singleton (default: 0.3.0)
solid_cable (3.0.7)
solid_cache (1.0.7)
solid_queue (1.1.4)
sqlite3 (2.6.0 arm64-darwin)
sshkit (1.24.0)
stimulus-rails (1.3.4)
stringio (3.1.6, default: 3.1.2)
strscan (default: 3.1.2)
syntax_suggest (default: 2.0.2)
tempfile (default: 0.3.1)
thor (1.3.2)
thruster (0.1.12 arm64-darwin)
time (default: 0.4.1)
timeout (0.4.3)
tmpdir (default: 0.3.1)
tsort (default: 0.2.0)
turbo-rails (2.0.13)
tzinfo (2.0.6)
un (default: 0.3.0)
unicode-display_width (3.1.4)
unicode-emoji (4.0.4)
uri (1.0.3)
useragent (0.16.11)
weakref (default: 0.1.3)
web-console (4.2.1)
websocket (1.2.11)
websocket-driver (0.7.7)
websocket-extensions (0.1.5)
xpath (3.2.0)
yaml (default: 0.4.0)
zeitwerk (2.7.2)
zlib (default: 3.2.1)

I'll also try to install cURL via Homebrew and override the system version in that run - perhaps that'll reproduce it.

@kleisauke
Copy link
Member

I could also not reproduce this on macOS Sequoia 15.3.1, see:

Details
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ echo >> ~/.zprofile
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"'
$ brew install vips rbenv
$ cd Downloads/poppler-test-main
$ rbenv init
$ rbenv install $(cat .ruby-version)
$ rbenv global $(cat .ruby-version)
$ <Launch new terminal instance>
$ cd Downloads/poppler-test-main
$ bundle
$ gem install rails
$ rbenv rehash
$ rails db:prepare
$ <Launch new terminal instance>
$ cd Downloads/poppler-test-main
$ bin/jobs
$ <Launch new terminal instance>
$ cd Downloads/poppler-test-main
$ rails c
Loading development environment (Rails 8.0.2)
poppler-test(dev)> file = Rails.root.join("public", "image.jpg")
poppler-test(dev)> 
poppler-test(dev)* blob = ActiveStorage::Blob.create_and_upload!(
poppler-test(dev)*   io: file.open,
poppler-test(dev)*   filename: file.basename.to_s
poppler-test(dev)* )
poppler-test(dev)> 
poppler-test(dev)> blob.analyze_later
<snip />
    byte_size: 794589,
<snip />
 @successfully_enqueued=true,
<snip />

(and the command running bin/jobs doesn't segfault)

I'll also try to install cURL via Homebrew and override the system version in that run - perhaps that'll reproduce it.

This also doesn't reproduce. I tried doing:

$ brew install curl
$ echo 'export PATH="/opt/homebrew/opt/curl/bin:$PATH"' >> ~/.zshrc
$ echo 'export PKG_CONFIG_PATH="/opt/homebrew/opt/curl/lib/pkgconfig"' >> ~/.zshrc
$ export PATH="/opt/homebrew/opt/curl/bin:$PATH"
$ export PKG_CONFIG_PATH="/opt/homebrew/opt/curl/lib/pkgconfig"
$ curl -V
curl 8.13.0 (aarch64-apple-darwin24.2.0) libcurl/8.13.0 OpenSSL/3.4.1 (SecureTransport) zlib/1.2.12 brotli/1.1.0 zstd/1.5.7 AppleIDN libssh2/1.11.1 nghttp2/1.65.0 librtmp/2.3
Release-Date: 2025-04-02
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

(and repeat the steps above)

@brendon
Copy link
Author

brendon commented Apr 15, 2025

Thank you @kleisauke, that's some great detail. Looks like I have potentially got a buggy package installed here via homebrew? I'll compare things and see what I can come up with.

@brendon
Copy link
Author

brendon commented Apr 15, 2025

I took a deep dive into what I had installed via homebrew:

brew desc $(brew list --installed-on-request)

Interestingly a lot of the dependencies that vips has were listed as 'installed on request' meaning I installed them manually. This might just mean that I was using homebrew before this feature was introduced.

Anyway, I began uninstalling things that I knew I didn't use anymore and following the dependency graphs uninstalling the packages that depended on those packages. Vips brings a lot along with it. Every now and again I'd reinstall vips and test my environment out, on about the 3rd or 4th try it worked! I suspect the problem was an out of date dependency (even though I ran brew upgrade I'm not sure it updates all the dependencies?).

Now when I uninstall vips it takes all of its dependencies with it.

It's mildly unsatisfying as I can't pinpoint which package caused the problem, but clearly the solution is to ensure all decencies of vips are up to date.

Thank you again for taking the time to verify that this wasn't a general problem in the Mac environment. I hope the thread helps anyone else that ends up in my position.

If there's a way I can "buy you a beer" or a coffee let me know :D

@brendon brendon closed this as completed Apr 15, 2025
@jcupitt
Copy link
Member

jcupitt commented Apr 16, 2025

I'm glad it's working! And good job Kleis.

Yes, I wipe and reinstall homebrew occasionally. They have a policy of always enabling all package dependencies, so things like libvips do pull a lot of things in too.

(libvips has a "donate" button on the main website, fwiw)

@brendon
Copy link
Author

brendon commented Apr 16, 2025

Thanks @jcupitt, yea it was a bit of a mess. Nice to have it tidied up now.

I don't see a donate button there?

@jcupitt
Copy link
Member

jcupitt commented Apr 16, 2025

Top right, it has a ❤️ on the button.

@brendon
Copy link
Author

brendon commented Apr 16, 2025

Oh! I see, the GitHub project not the actual libvips website :)

@jcupitt
Copy link
Member

jcupitt commented Apr 16, 2025

We're having a dev meet in London next week, on the off chance you're in the city.

libvips/libvips#4451

@brendon
Copy link
Author

brendon commented Apr 16, 2025

Oh I wish! :D I couldn't be further away in New Zealand :D

Enjoy though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants