Skip to content

Oracle Linux 8 Upgrade#12

Open
calh wants to merge 4 commits intomikeowens:masterfrom
calh:ol8_upgrade
Open

Oracle Linux 8 Upgrade#12
calh wants to merge 4 commits intomikeowens:masterfrom
calh:ol8_upgrade

Conversation

@calh
Copy link

@calh calh commented Sep 22, 2025

This is the best I could do on upgrading the build system to OL8. Upgrading Ruby past the 3.x line gives a segfault:

#0  0x00007f668f7cc015 in rb_protect (proc=0x7f668fcfa27d <ruby::require_protect(unsigned long)>, data=140077606931360, pstate=0x7f666b33c3dc) at eval.c:1110
#1  0x00007f668fcfa448 in ruby::require (filename=0x7f665c008ba0 "/var/www/html/access_test.rb") at /usr/src/mod_ruby/src/ruby.cpp:549
#2  0x00007f668fced37d in ruby_request_load_handler (r=0x7f665c002c10, module=0x56373db30818 "/var/www/html/access_test.rb", cls=0x56373db30870 "AccessTest::Handler", method=0x56373db308c0 "check_access") at /usr/src/mod_ruby/src/module.cpp:426
#3  0x00007f668fceddfb in ruby_request_get_access_handler (r=0x7f665c002c10) at /usr/src/mod_ruby/src/module.cpp:602
#4  0x00007f668fceeb07 in ruby_request_access_handler (r=0x7f665c002c10) at /usr/src/mod_ruby/src/module.cpp:877
#5  0x00007f668fceb40a in ruby_access_handler (r=0x7f665c002c10) at /usr/src/mod_ruby/src/mod_ruby.c:70
#6  0x000056373d1af408 in ap_run_access_checker_ex ()
#7  0x000056373d1b19a9 in ap_process_request_internal ()
#8  0x000056373d1d0b90 in ap_process_async_request ()
#9  0x000056373d1ccf60 in ap_process_http_connection ()
#10 0x000056373d1c3348 in ap_run_process_connection ()
#11 0x00007f6692f1aa47 in process_socket () from /etc/httpd/modules/mod_mpm_event.so
#12 0x00007f6692f1b3ea in worker_thread () from /etc/httpd/modules/mod_mpm_event.so
#13 0x00007f669e20e1da in start_thread () from /lib64/libpthread.so.0
#14 0x00007f669dc648d3 in clone () from /lib64/libc.so.6

More details:

Thread 56 "httpd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f666b33d700 (LWP 67)]
0x00007f668f7cc015 in rb_protect (proc=0x7f668fcfa27d <ruby::require_protect(unsigned long)>, data=140077606931360, pstate=0x7f666b33c3dc) at eval.c:1110
1110        rb_control_frame_t *volatile cfp = ec->cfp;
#0  0x00007f668f7cc015 in rb_protect (proc=0x7f668fcfa27d <ruby::require_protect(unsigned long)>, data=140077606931360, pstate=0x7f666b33c3dc) at eval.c:1110
        result = 8
        state = RUBY_TAG_NONE
        ec = 0x0
        cfp = 0x0
        protect_tag = {prev = 0x0}
        org_jmpbuf = {0x0, 0x0, 0x0, 0x0, 0x0}
#1  0x00007f668fcfa448 in ruby::require (filename=0x7f665c008ba0 "/var/www/html/access_test.rb") at /usr/src/mod_ruby/src/ruby.cpp:549
        error = 0
#2  0x00007f668fced37d in ruby_request_load_handler (r=0x7f665c002c10, module=0x56373db30818 "/var/www/html/access_test.rb", cls=0x56373db30870 "AccessTest::Handler", method=0x56373db308c0 "check_access") at /usr/src/mod_ruby/src/module.cpp:426
        handler = {_vptr.Handler = 0x7f668ff15c00 <vtable for modruby::Handler+16>, _module = "/var/www/html/access_test.rb", _klass = "AccessTest::Handler", _method = "check_access", _id = "", object = 0x0}
        i = {first = <error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.>, second = 0x56373db30818}
#3  0x00007f668fceddfb in ruby_request_get_access_handler (r=0x7f665c002c10) at /usr/src/mod_ruby/src/module.cpp:602
        h_config = 0x56373db30710
        req = {_req = 0x7f665c002c10, _server = 0x0, _form_data = 0x0, _queries = 0x0, _error = "", _content = std::vector of length 0, capacity 0, has_read_content = false, _has_setup_client_read = false, _module_config = 0x0, static max_content_length = 20971520}
        notes = {handle = 0x7f665c003d50}
        cfg = 0x56373db1aaa0
        module = 0x56373db30818 "/var/www/html/access_test.rb"
        cls = 0x56373db30870 "AccessTest::Handler"
        method = 0x56373db308c0 "check_access"
#4  0x00007f668fceeb07 in ruby_request_access_handler (r=0x7f665c002c10) at /usr/src/mod_ruby/src/module.cpp:877
        handler = {_vptr.Handler = 0x7f668ff15c00 <vtable for modruby::Handler+16>, _module = "/var/www/html/access_test.rb", _klass = "AccessTest::Handler", _method = "check_access", _id = "", object = 0x0}
        result = 0
        req = {_req = 0x7f665c002c10, _server = 0x0, _form_data = 0x0, _queries = 0x0, _error = "", _content = std::vector of length 0, capacity 0, has_read_content = false, _has_setup_client_read = false, _module_config = 0x0, static max_content_length = 20971520}
        rc = 200

But downgrading down to 2.7.5 seems to work okay:

$ ./script/docker_run
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f61824157b4 in read () from /lib64/libpthread.so.0
$ curl localhost:8080
ModRuby FATAL ERROR: Ruby Exception: Error creating Ruby class 'AccessTest::Handler'
Module  : /var/www/html/access_test.rb
Class   : AccessTest::Handler
Method  : check_access
Type    : SystemStackError
SystemStackErrorMessage : stack level too deep

$ curl localhost:8080
Ruby check_access()
Hi there from ruby

@mikeowens, do you have any experience with the Ruby C API changes from the 2.x line to 3.x?

@calh calh mentioned this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant