Thanks a lot for merging #611 (74a2232). It fixes a production crash we have been hitting, and we would love to pick it up from RubyGems.
What we see
- tiny_tds 3.4.0 (precompiled
x86_64-linux-gnu), Ruby 4.0.7, Rails 8.1, Puma in cluster mode with preload_app!.
- Our
before_fork hook calls Process.warmup, which compacts the heap in the Puma master before the workers fork.
- On some deploys, compaction moves
TinyTds::Error. Every forked worker then inherits the stale cTinyTdsError pointer and crashes with SIGSEGV (SEGV_MAPERR) on its first connection to Azure SQL:
rb_class_new_instance_kw (object.c:2299)
rb_exc_new (error.c:1473)
rb_tinytds_raise_error
tinytds_msg_handler
_dblib_handle_info_message
tds_process_info
tds_process_login_tokens
tds_connect
tds_connect_and_login
tdsdbopen
Request
Could you publish a release (3.4.1?) that contains #611, including the precompiled native gems? Until then we will skip heap compaction before forking.
Thanks for maintaining tiny_tds!
Thanks a lot for merging #611 (74a2232). It fixes a production crash we have been hitting, and we would love to pick it up from RubyGems.
What we see
x86_64-linux-gnu), Ruby 4.0.7, Rails 8.1, Puma in cluster mode withpreload_app!.before_forkhook callsProcess.warmup, which compacts the heap in the Puma master before the workers fork.TinyTds::Error. Every forked worker then inherits the stalecTinyTdsErrorpointer and crashes withSIGSEGV (SEGV_MAPERR)on its first connection to Azure SQL:Request
Could you publish a release (3.4.1?) that contains #611, including the precompiled native gems? Until then we will skip heap compaction before forking.
Thanks for maintaining tiny_tds!