Skip to content
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

fix(main/ruby): fix fork panicking #23611

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mbekkomo
Copy link
Contributor

@mbekkomo mbekkomo commented Mar 5, 2025

@mbekkomo
Copy link
Contributor Author

mbekkomo commented Mar 5, 2025

@csabahenk Could you test this after the build is done?

@robertkirkman
Copy link
Contributor

It's interesting progress, but for me, this makes the error change from

-e:1: [BUG] pthread_rwlock_unlock: Operation not permitted (EPERM)

to

-e:1: [BUG] pthread_rwlock_destroy: Device or resource busy (EBUSY)

@robertkirkman
Copy link
Contributor

This is one way to work around it I guess if there is no other way to be found,

The change in ruby that caused the error to start appearing is this: ruby/ruby@63cbe3f

Since the problem bisects to that commit, reverting it like this would cause the error to stop:

Reverts https://github.com/ruby/ruby/commit/63cbe3f6ac9feb44a2e43b1f853e2ca7e049316c
which makes https://github.com/termux/termux-packages/issues/23582 go back to previous behavior (working)

--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -342,7 +342,7 @@ rb_getaddrinfo(const char *hostp, const char *portp, const struct addrinfo *hint
     arg.service = portp;
     arg.hints = hints;
     arg.res = ai;
-    return (int)(VALUE)rb_thread_call_without_gvl(fork_safe_getaddrinfo, &arg, RUBY_UBF_IO, 0);
+    return (int)(VALUE)rb_thread_call_without_gvl(nogvl_getaddrinfo, &arg, RUBY_UBF_IO, 0);
 }
 
 #elif GETADDRINFO_IMPL == 2
@@ -505,7 +505,7 @@ start:
     }
 
     pthread_t th;
-    if (raddrinfo_pthread_create(&th, fork_safe_do_getaddrinfo, arg) != 0) {
+    if (raddrinfo_pthread_create(&th, do_getaddrinfo, arg) != 0) {
         int err = errno;
         free_getaddrinfo_arg(arg);
         errno = err;
--- a/process.c
+++ b/process.c
@@ -4233,23 +4233,12 @@ rb_fork_ruby(int *status)
         prefork();
 
         before_fork_ruby();
-        rb_thread_acquire_fork_lock();
         disable_child_handler_before_fork(&old);
 
         child.pid = pid = rb_fork();
         child.error = err = errno;
 
         disable_child_handler_fork_parent(&old); /* yes, bad name */
-        if (
-#if defined(__FreeBSD__)
-            pid != 0 &&
-#endif
-            true) {
-            rb_thread_release_fork_lock();
-        }
-        if (pid == 0) {
-            rb_thread_reset_fork_lock();
-        }
         after_fork_ruby(pid);
 
         /* repeat while fork failed but retryable */
~ $ ruby -e 'puts RUBY_VERSION; fork'
3.4.1
~ $ 

however, what the ruby creators are trying to do is make the language more thread-safe, so by completely reverting their change, this still does not "fully solve" the problem because it misses out on their feature, by continuing to use the old, less-thread-safe behavior that the old version of ruby was using.

I think an ideal solution would probably be one that can properly fix the fork lock feature in a thread-safe way that does not have EPERM or EBUSY on Android.

@csabahenk
Copy link

@mbekkomo alas, wiith ruby 3.4.1-1, ruby still panics, although in different function with a different errno.

$ ruby -e 'puts RUBY_VERSION; fork'
3.4.1
-e:1: [BUG] pthread_rwlock_destroy: Device or resource busy (EBUSY)
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [aarch64-linux-android]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0010 e:000009 CFUNC  :fork
c:0002 p:0009 s:0006 e:000005 EVAL   -e:1 [FINISH]
c:0001 p:0000 s:0003 E:ffffffffffffe990 DUMMY  [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in '<main>'
-e:1:in 'fork'

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

-- C level backtrace information -------------------------------------------
/data/data/com.termux/files/usr/lib/libandroid-execinfo.so(backtrace+0x38) [0x7e94610b5c]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93e9a598) [0x7e93e9a598]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93cc8294) [0x7e93cc8294]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(rb_bug+0x64) [0x7e93cd2aa0]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(rb_bug_errno+0x70) [0x7e93cc883c]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93e2dd44) [0x7e93e2dd44]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93d96874) [0x7e93d96874]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93d96a88) [0x7e93d96a88]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93d987a8) [0x7e93d987a8]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93e8ba58) [0x7e93e8ba58]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93e6f4fc) [0x7e93e6f4fc]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93e6c10c) [0x7e93e6c10c]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7e93cd5198) [0x7e93cd5198]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(ruby_run_node+0x4c) [0x7e93cd50ac]
/data/data/com.termux/files/usr/bin/ruby(0x5bdf39ea60) [0x5bdf39ea60]
/apex/com.android.runtime/lib64/bionic/libc.so(__libc_init+0x74) [0x7e946f47b4]

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

* Loaded script: -e

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 ruby2_keywords.rb
    6 /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/encdb.so
    7 /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/trans/transdb.so
    8 /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/rbconfig.rb
    9 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/compatibility.rb
   10 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/defaults.rb
   11 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/deprecate.rb
   12 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/errors.rb
   13 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/target_rbconfig.rb
   14 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/unknown_command_spell_checker.rb
   15 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/exceptions.rb
   16 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/basic_specification.rb
   17 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/stub_specification.rb
   18 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/platform.rb
   19 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/specification_record.rb
   20 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/util/list.rb
   21 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/version.rb
   22 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/requirement.rb
   23 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/specification.rb
   24 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/util.rb
   25 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/dependency.rb
   26 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_gem.rb
   27 /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
   28 /data/data/com.termux/files/usr/lib/ruby/3.4.0/monitor.rb
   29 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems.rb
   30 /data/data/com.termux/files/usr/lib/ruby/3.4.0/bundled_gems.rb
   31 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/path_support.rb
   32 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight/version.rb
   33 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight/base.rb
   34 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight/formatter.rb
   35 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight/core_ext.rb
   36 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight.rb
   37 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/version.rb
   38 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb
   39 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/levenshtein.rb
   40 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/jaro_winkler.rb
   41 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checker.rb
   42 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   43 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   44 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers.rb
   45 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/method_name_checker.rb
   46 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/key_error_checker.rb
   47 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/null_checker.rb
   48 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/tree_spell_checker.rb
   49 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/require_path_checker.rb
   50 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/pattern_key_name_checker.rb
   51 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/formatter.rb
   52 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean.rb
   53 /data/data/com.termux/files/usr/lib/ruby/3.4.0/syntax_suggest/core_ext.rb

* Process memory map:

5bdf39d000-5bdf39e000 r--p 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
5bdf39e000-5bdf39f000 r-xp 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
5bdf39f000-5bdf3a0000 r--p 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
5bdf3a0000-5bdf3a1000 rw-p 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
7df6a08000-7df6d08000 rw-p 00000000 00:00 0                              [anon:libc_malloc]
7df6d08000-7df6d0a000 r--p 00000000 fe:32 692023                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
7df6d0a000-7df6d0b000 r-xp 00001000 fe:32 692023                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
7df6d0b000-7df6d0c000 r--p 00001000 fe:32 692023                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
7df6d0c000-7df6d0d000 rw-p 00001000 fe:32 692023                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
7df6da0000-7df6df0000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7df6df4000-7df6df5000 r--p 00000000 fe:32 692000                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/trans/transdb.so
7df6df5000-7df6df7000 r-xp 00000000 fe:32 692000                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/trans/transdb.so
7df6df7000-7df6df8000 r--p 00001000 fe:32 692000                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/trans/transdb.so
7df6e16000-7df6e17000 r--p 00000000 fe:32 691957                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/encdb.so
7df6e17000-7df6e19000 r-xp 00000000 fe:32 691957                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/encdb.so
7df6e19000-7df6e1a000 r--p 00001000 fe:32 691957                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/encdb.so
7df6e30000-7df6e70000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7df6e70000-7df6e90000 r--s 00000000 00:10 488                            /dev/__properties__/u:object_r:timezone_prop:s0
7df6e90000-7df6eb0000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7df6ebd000-7df6ebe000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df6ebe000-7df6f5f000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df6f5f000-7df6f60000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df6f60000-7df7001000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7001000-7df7002000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7002000-7df70a3000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df70a3000-7df70a4000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df70a4000-7df7145000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7145000-7df7146000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7146000-7df71e7000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df71e7000-7df71e8000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df71e8000-7df7289000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7289000-7df728a000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df728a000-7df732b000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df732b000-7df732c000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df732c000-7df73cd000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df73cd000-7df73ce000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df73ce000-7df746f000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df746f000-7df7470000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7470000-7df7511000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7511000-7df7512000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7512000-7df75b3000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df75b3000-7df75b4000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df75b4000-7df7655000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7655000-7df7656000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7656000-7df76f7000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df76f7000-7df76f8000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df76f8000-7df7799000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7799000-7df779a000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df779a000-7df783b000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df783b000-7df783c000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df783c000-7df78dd000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df78dd000-7df78de000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df78de000-7df797f000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df797f000-7df7980000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7980000-7df7a21000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7a21000-7df7a22000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7a22000-7df7ac3000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7ac3000-7df7ac4000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7ac4000-7df7b65000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7b65000-7df7b66000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7b66000-7df7c07000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7c07000-7df7c08000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7c08000-7df7ca9000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7ca9000-7df7caa000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7caa000-7df7d4b000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7d4b000-7df7d4c000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7d4c000-7df7ded000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7ded000-7df7dee000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7dee000-7df7e8f000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7e8f000-7df7e90000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7e90000-7df7f31000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7f31000-7df7f32000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7f32000-7df7fd3000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7fd3000-7df7fd4000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df7fd4000-7df8075000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df8075000-7df8076000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df8076000-7df8117000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df8117000-7df8118000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df8118000-7df81b9000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df81b9000-7df81ba000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df81ba000-7df825b000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df825b000-7df825c000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df825c000-7df82fd000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
7df8e02000-7df8f5f000 r--s 00000000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7df8f5f000-7df9400000 r--s 00000000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7df9400000-7df9a00000 rw-p 00000000 00:00 0                              [anon:libc_malloc]
7df9a10000-7df9a40000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7df9a41000-7df9cc1000 rw-p 00000000 00:00 0                              [anon:libc_malloc]
7df9cc1000-7e11cc1000 rw-p 00000000 00:00 0                              [anon:Ruby:Init_default_shapes:shape_cache]
7e11cc1000-7e130c1000 rw-p 00000000 00:00 0                              [anon:Ruby:Init_default_shapes:shape_list]
7e130c1000-7e1339f000 ---p 00000000 00:00 0                              [anon:cfi shadow]
7e1339f000-7e133a0000 r--p 00000000 00:00 0                              [anon:cfi shadow]
7e133a0000-7e134b0000 ---p 00000000 00:00 0                              [anon:cfi shadow]
7e134b0000-7e134b1000 r--p 00000000 00:00 0                              [anon:cfi shadow]
7e134b1000-7e134b5000 ---p 00000000 00:00 0                              [anon:cfi shadow]
7e134b5000-7e134b6000 r--p 00000000 00:00 0                              [anon:cfi shadow]
7e134b6000-7e930c1000 ---p 00000000 00:00 0                              [anon:cfi shadow]
7e930c1000-7e93146000 r--p 00000000 fe:06 20878537                       /system/lib64/libc++.so
7e93146000-7e93149000 ---p 00000000 00:00 0
7e93149000-7e931c4000 r-xp 00084000 fe:06 20878537                       /system/lib64/libc++.so
7e931c4000-7e931c7000 ---p 00000000 00:00 0
7e931c7000-7e931cf000 r--p 000fe000 fe:06 20878537                       /system/lib64/libc++.so
7e931cf000-7e931d2000 ---p 00000000 00:00 0
7e931d2000-7e931d3000 rw-p 00105000 fe:06 20878537                       /system/lib64/libc++.so
7e931d3000-7e931da000 rw-p 00000000 00:00 0                              [anon:.bss]
7e931f0000-7e93200000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7e93200000-7e93a00000 rw-p 00000000 00:00 0                              [anon:libc_malloc]
7e93a10000-7e93a50000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7e93a5c000-7e93a61000 r--p 00000000 fe:06 20879571                       /system/lib64/liblog.so
7e93a61000-7e93a6a000 r-xp 00005000 fe:06 20879571                       /system/lib64/liblog.so
7e93a6a000-7e93a6b000 r--p 0000e000 fe:06 20879571                       /system/lib64/liblog.so
7e93a6b000-7e93a6c000 rw-p 0000f000 fe:06 20879571                       /system/lib64/liblog.so
7e93a80000-7e93c14000 r--p 00000000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7e93c14000-7e93f15000 r-xp 00193000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7e93f15000-7e93f22000 r--p 00493000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7e93f22000-7e93f23000 rw-p 0049f000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7e93f23000-7e93f36000 rw-p 00000000 00:00 0                              [anon:.bss]
7e93f50000-7e93f90000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7e93f93000-7e93f96000 r--p 00000000 fe:06 20880019                       /system/lib64/libnetd_client.so
7e93f96000-7e93f9a000 r-xp 00003000 fe:06 20880019                       /system/lib64/libnetd_client.so
7e93f9a000-7e93f9b000 r--p 00007000 fe:06 20880019                       /system/lib64/libnetd_client.so
7e93f9b000-7e93f9c000 rw-p 00008000 fe:06 20880019                       /system/lib64/libnetd_client.so
7e93fb0000-7e93fc0000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7e93fcb000-7e93fce000 r--p 00000000 fe:32 661693                         /data/data/com.termux/files/usr/lib/libandroid-support.so
7e93fce000-7e93fd0000 r-xp 00002000 fe:32 661693                         /data/data/com.termux/files/usr/lib/libandroid-support.so
7e93fd0000-7e93fd1000 r--p 00003000 fe:32 661693                         /data/data/com.termux/files/usr/lib/libandroid-support.so
7e93fd1000-7e93fd3000 rw-p 00003000 fe:32 661693                         /data/data/com.termux/files/usr/lib/libandroid-support.so
7e93fe0000-7e94000000 r--s 00000000 00:10 109                            /dev/__properties__/u:object_r:build_prop:s0
7e94000000-7e94600000 ---p 00000000 00:00 0
7e9460d000-7e94610000 r--p 00000000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7e94610000-7e94616000 r-xp 00002000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7e94616000-7e94617000 r--p 00007000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7e94617000-7e94618000 rw-p 00007000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7e94618000-7e94619000 rw-p 00000000 00:00 0                              [anon:.bss]
7e94625000-7e94645000 r--s 00000000 00:10 231                            /dev/__properties__/u:object_r:heapprofd_prop:s0
7e94645000-7e94665000 r--s 00000000 00:10 253                            /dev/__properties__/u:object_r:libc_debug_prop:s0
7e94665000-7e946b4000 r--p 00000000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7e946b4000-7e94777000 r-xp 0004f000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7e94777000-7e9477e000 r--p 00112000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7e9477e000-7e94780000 rw-p 00119000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7e94780000-7e94991000 rw-p 00000000 00:00 0                              [anon:.bss]
7e94991000-7e94995000 r--p 00000000 00:00 0                              [anon:.bss]
7e94995000-7e9499d000 rw-p 00000000 00:00 0                              [anon:.bss]
7e949a0000-7e94a00000 rw-p 00000000 00:00 0                              [anon:linker_alloc]
7e94a00000-7e94e00000 ---p 00000000 00:00 0
7e94e06000-7e94e26000 r--s 00000000 00:10 226                            /dev/__properties__/u:object_r:gwp_asan_prop:s0
7e94e26000-7e94e46000 r--s 00000000 00:10 156                            /dev/__properties__/u:object_r:debug_prop:s0
7e94e46000-7e94e47000 r--p 00000000 fe:32 178526                         /data/data/com.termux/files/usr/lib/libtermux-exec.so
7e94e47000-7e94e49000 r-xp 00000000 fe:32 178526                         /data/data/com.termux/files/usr/lib/libtermux-exec.so
7e94e49000-7e94e4a000 r--p 00001000 fe:32 178526                         /data/data/com.termux/files/usr/lib/libtermux-exec.so
7e94e58000-7e94e78000 r--s 00000000 00:10 804                            /dev/__properties__/properties_serial
7e94e78000-7e94ea1000 r--s 00000000 00:10 71                             /dev/__properties__/property_info
7e94ea1000-7e94ea8000 r--p 00000000 fe:32 449022                         /data/data/com.termux/files/usr/lib/libz.so.1.3.1
7e94ea8000-7e94eb3000 r-xp 00006000 fe:32 449022                         /data/data/com.termux/files/usr/lib/libz.so.1.3.1
7e94eb3000-7e94eb5000 r--p 00010000 fe:32 449022                         /data/data/com.termux/files/usr/lib/libz.so.1.3.1
7e94ec7000-7e94ee9000 r--p 00000000 fe:32 1042440                        /data/data/com.termux/files/usr/lib/libgmp.so
7e94ee9000-7e94f29000 r-xp 00021000 fe:32 1042440                        /data/data/com.termux/files/usr/lib/libgmp.so
7e94f29000-7e94f2b000 r--p 00060000 fe:32 1042440                        /data/data/com.termux/files/usr/lib/libgmp.so
7e94f2b000-7e94f2c000 rw-p 00061000 fe:32 1042440                        /data/data/com.termux/files/usr/lib/libgmp.so
7e94f46000-7e94f59000 r--p 00000000 07:148 45                            /apex/com.android.runtime/lib64/bionic/libm.so
7e94f59000-7e94f7e000 r-xp 00013000 07:148 45                            /apex/com.android.runtime/lib64/bionic/libm.so
7e94f7e000-7e94f7f000 r--p 00038000 07:148 45                            /apex/com.android.runtime/lib64/bionic/libm.so
7e94f7f000-7e94f80000 rw-p 00039000 07:148 45                            /apex/com.android.runtime/lib64/bionic/libm.so
7e94f89000-7e94fa9000 r--s 00000000 00:10 172                            /dev/__properties__/u:object_r:device_config_memory_safety_native_prop:s0
7e94fa9000-7e94faa000 r--p 00000000 07:148 43                            /apex/com.android.runtime/lib64/bionic/libdl.so
7e94faa000-7e94fab000 r-xp 00001000 07:148 43                            /apex/com.android.runtime/lib64/bionic/libdl.so
7e94fab000-7e94fac000 r--p 00002000 07:148 43                            /apex/com.android.runtime/lib64/bionic/libdl.so
7e94fac000-7e94fad000 ---p 00000000 00:00 0
7e94fad000-7e94fae000 r--p 00000000 00:00 0                              [anon:.bss]
7e94fae000-7e94fb1000 rw-p 00000000 00:00 0                              [anon:.bss]
7e94fcc000-7e94fcd000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e94fd4000-7e94fdc000 rw-p 00000000 00:00 0                              [anon:System property context nodes]
7e94fdc000-7e94ffc000 r--s 00000000 00:10 85                             /dev/__properties__/u:object_r:arm64_memtag_prop:s0
7e95010000-7e95030000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7e95033000-7e9503c000 r--s 00000000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7e9503c000-7e9505c000 r--s 00000000 00:10 780                            /dev/__properties__/u:object_r:vendor_socket_hook_prop:s0
7e9505c000-7e9511c000 r--p 00000000 00:00 0                              [anon:linker_alloc]
7e9511c000-7e95120000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e95122000-7e95123000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e95126000-7e95127000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e9512b000-7e9512c000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e9512c000-7e9512e000 r--s 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
7e9512e000-7e9512f000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e95130000-7e95132000 r--s 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
7e95132000-7e95133000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e95134000-7e95138000 ---p 00000000 00:00 0
7e95138000-7e9513b000 rw-p 00000000 00:00 0                              [anon:stack_and_tls:main]
7e9513b000-7e9513f000 ---p 00000000 00:00 0
7e9513f000-7e95140000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e95141000-7e9514c000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e9514c000-7e9516c000 r--s 00000000 00:10 787                            /dev/__properties__/u:object_r:vndk_prop:s0
7e9516c000-7e95170000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e95170000-7e951d0000 r--p 00000000 00:00 0                              [anon:linker_alloc]
7e951d0000-7e951f0000 r--s 00000000 00:10 156                            /dev/__properties__/u:object_r:debug_prop:s0
7e951f0000-7e951f1000 ---p 00000000 00:00 0
7e951f1000-7e951f9000 rw-p 00000000 00:00 0
7e951f9000-7e951fa000 ---p 00000000 00:00 0
7e951fa000-7e9521a000 r--s 00000000 00:10 804                            /dev/__properties__/properties_serial
7e9521a000-7e95222000 rw-p 00000000 00:00 0                              [anon:System property context nodes]
7e95222000-7e9524b000 r--s 00000000 00:10 71                             /dev/__properties__/property_info
7e9524b000-7e952ab000 r--p 00000000 00:00 0                              [anon:linker_alloc]
7e952ab000-7e952ac000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e952ac000-7e952ad000 r--p 00000000 00:00 0                              [anon:atexit handlers]
7e952ad000-7e952af000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7e952af000-7e953c0000 ---p 00000000 00:00 0
7e953c0000-7e953c4000 rw-p 00000000 00:00 0
7e953c4000-7e962af000 ---p 00000000 00:00 0
7e962af000-7e962b3000 ---p 00000000 00:00 0
7e962b3000-7e962bb000 rw-p 00000000 00:00 0                              [anon:thread signal stack]
7e962bb000-7e962bc000 rw-p 00000000 00:00 0                              [anon:arc4random data]
7e962bd000-7e962be000 r--p 00000000 00:00 0                              [anon:atexit handlers]
7e962be000-7e962bf000 rw-p 00000000 00:00 0                              [anon:arc4random data]
7e962bf000-7e962c1000 r--p 00000000 00:00 0                              [vvar]
7e962c1000-7e962c2000 r-xp 00000000 00:00 0                              [vdso]
7e962c2000-7e9630b000 r--p 00000000 07:148 16                            /apex/com.android.runtime/bin/linker64
7e9630b000-7e96421000 r-xp 00049000 07:148 16                            /apex/com.android.runtime/bin/linker64
7e96421000-7e9642b000 r--p 0015f000 07:148 16                            /apex/com.android.runtime/bin/linker64
7e9642b000-7e9642c000 rw-p 00169000 07:148 16                            /apex/com.android.runtime/bin/linker64
7e9642c000-7e96432000 rw-p 00000000 00:00 0                              [anon:.bss]
7e96432000-7e96436000 r--p 00000000 00:00 0                              [anon:.bss]
7e96436000-7e96440000 rw-p 00000000 00:00 0                              [anon:.bss]
7fd36ac000-7fd36cf000 rw-p 00000000 00:00 0                              [stack]


/data/data/com.termux/files/home/ruby/scratch [u0_a347@localhost] [17:40]
> ruby -e 'puts RUBY_VERSION; fork'
3.4.1
-e:1: [BUG] pthread_rwlock_destroy: Device or resource busy (EBUSY)
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [aarch64-linux-android]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0010 e:000009 CFUNC  :fork
c:0002 p:0009 s:0006 e:000005 EVAL   -e:1 [FINISH]
c:0001 p:0000 s:0003 E:fffffffffffffbc0 DUMMY  [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in '<main>'
-e:1:in 'fork'

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

-- C level backtrace information -------------------------------------------
/data/data/com.termux/files/usr/lib/libandroid-execinfo.so(backtrace+0x38) [0x7086c77b5c]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082c8b598) [0x7082c8b598]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082ab9294) [0x7082ab9294]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(rb_bug+0x64) [0x7082ac3aa0]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(rb_bug_errno+0x70) [0x7082ab983c]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082c1ed44) [0x7082c1ed44]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082b87874) [0x7082b87874]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082b87a88) [0x7082b87a88]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082b897a8) [0x7082b897a8]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082c7ca58) [0x7082c7ca58]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082c604fc) [0x7082c604fc]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082c5d10c) [0x7082c5d10c]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(0x7082ac6198) [0x7082ac6198]
/data/data/com.termux/files/usr/lib/libruby.so.3.4.1(ruby_run_node+0x4c) [0x7082ac60ac]
/data/data/com.termux/files/usr/bin/ruby(0x5f194dfa60) [0x5f194dfa60]
/apex/com.android.runtime/lib64/bionic/libc.so(__libc_init+0x74) [0x7085efc7b4]

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

* Loaded script: -e

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 ruby2_keywords.rb
    6 /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/encdb.so
    7 /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/trans/transdb.so
    8 /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/rbconfig.rb
    9 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/compatibility.rb
   10 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/defaults.rb
   11 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/deprecate.rb
   12 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/errors.rb
   13 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/target_rbconfig.rb
   14 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/unknown_command_spell_checker.rb
   15 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/exceptions.rb
   16 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/basic_specification.rb
   17 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/stub_specification.rb
   18 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/platform.rb
   19 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/specification_record.rb
   20 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/util/list.rb
   21 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/version.rb
   22 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/requirement.rb
   23 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/specification.rb
   24 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/util.rb
   25 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/dependency.rb
   26 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_gem.rb
   27 /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
   28 /data/data/com.termux/files/usr/lib/ruby/3.4.0/monitor.rb
   29 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems.rb
   30 /data/data/com.termux/files/usr/lib/ruby/3.4.0/bundled_gems.rb
   31 /data/data/com.termux/files/usr/lib/ruby/3.4.0/rubygems/path_support.rb
   32 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight/version.rb
   33 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight/base.rb
   34 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight/formatter.rb
   35 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight/core_ext.rb
   36 /data/data/com.termux/files/usr/lib/ruby/3.4.0/error_highlight.rb
   37 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/version.rb
   38 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb
   39 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/levenshtein.rb
   40 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/jaro_winkler.rb
   41 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checker.rb
   42 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   43 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   44 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers.rb
   45 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/method_name_checker.rb
   46 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/key_error_checker.rb
   47 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/null_checker.rb
   48 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/tree_spell_checker.rb
   49 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/require_path_checker.rb
   50 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/spell_checkers/pattern_key_name_checker.rb
   51 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean/formatter.rb
   52 /data/data/com.termux/files/usr/lib/ruby/3.4.0/did_you_mean.rb
   53 /data/data/com.termux/files/usr/lib/ruby/3.4.0/syntax_suggest/core_ext.rb

* Process memory map:

5f194de000-5f194df000 r--p 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
5f194df000-5f194e0000 r-xp 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
5f194e0000-5f194e1000 r--p 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
5f194e1000-5f194e2000 rw-p 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
6fe5a35000-6fe5d35000 rw-p 00000000 00:00 0                              [anon:libc_malloc]
6fe5d35000-6fe5d37000 r--p 00000000 fe:32 692023                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
6fe5d37000-6fe5d38000 r-xp 00001000 fe:32 692023                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
6fe5d38000-6fe5d39000 r--p 00001000 fe:32 692023                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
6fe5d39000-6fe5d3a000 rw-p 00001000 fe:32 692023                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/monitor.so
6fe5d5b000-6fe5d5c000 r--p 00000000 fe:32 692000                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/trans/transdb.so
6fe5d5c000-6fe5d5e000 r-xp 00000000 fe:32 692000                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/trans/transdb.so
6fe5d5e000-6fe5d5f000 r--p 00001000 fe:32 692000                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/trans/transdb.so
6fe5d8d000-6fe5d8e000 r--p 00000000 fe:32 691957                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/encdb.so
6fe5d8e000-6fe5d90000 r-xp 00000000 fe:32 691957                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/encdb.so
6fe5d90000-6fe5d91000 r--p 00001000 fe:32 691957                         /data/data/com.termux/files/usr/lib/ruby/3.4.0/aarch64-linux-android/enc/encdb.so
6fe5dc0000-6fe5dc1000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe5dc1000-6fe5e62000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe5e62000-6fe5e63000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe5e63000-6fe5f04000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe5f04000-6fe5f05000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe5f05000-6fe5fa6000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe5fa6000-6fe5fa7000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe5fa7000-6fe6048000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6048000-6fe6049000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6049000-6fe60ea000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe60ea000-6fe60eb000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe60eb000-6fe618c000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe618c000-6fe618d000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe618d000-6fe622e000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe622e000-6fe622f000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe622f000-6fe62d0000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe62d0000-6fe62d1000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe62d1000-6fe6372000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6372000-6fe6373000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6373000-6fe6414000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6414000-6fe6415000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6415000-6fe64b6000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe64b6000-6fe64b7000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe64b7000-6fe6558000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6558000-6fe6559000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6559000-6fe65fa000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe65fa000-6fe65fb000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe65fb000-6fe669c000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe669c000-6fe669d000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe669d000-6fe673e000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe673e000-6fe673f000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe673f000-6fe67e0000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe67e0000-6fe67e1000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe67e1000-6fe6882000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6882000-6fe6883000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6883000-6fe6924000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6924000-6fe6925000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6925000-6fe69c6000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe69c6000-6fe69c7000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe69c7000-6fe6a68000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6a68000-6fe6a69000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6a69000-6fe6b0a000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6b0a000-6fe6b0b000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6b0b000-6fe6bac000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6bac000-6fe6bad000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6bad000-6fe6c4e000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6c4e000-6fe6c4f000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6c4f000-6fe6cf0000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6cf0000-6fe6cf1000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6cf1000-6fe6d92000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6d92000-6fe6d93000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6d93000-6fe6e34000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6e34000-6fe6e35000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6e35000-6fe6ed6000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6ed6000-6fe6ed7000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6ed7000-6fe6f78000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6f78000-6fe6f79000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe6f79000-6fe701a000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe701a000-6fe701b000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe701b000-6fe70bc000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe70bc000-6fe70bd000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe70bd000-6fe715e000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe715e000-6fe715f000 ---p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe715f000-6fe7200000 rw-p 00000000 00:00 0                              [anon:Ruby:fiber_pool_allocate_memory]
6fe7c02000-6fe7d5f000 r--s 00000000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
6fe7d5f000-6fe8200000 r--s 00000000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
6fe8200000-6fe8800000 rw-p 00000000 00:00 0                              [anon:libc_malloc]
6fe8840000-6fe8870000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
6fe8980000-6fe8c00000 rw-p 00000000 00:00 0                              [anon:libc_malloc]
6fe8c00000-7000c00000 rw-p 00000000 00:00 0                              [anon:Ruby:Init_default_shapes:shape_cache]
7000c00000-7002000000 rw-p 00000000 00:00 0                              [anon:Ruby:Init_default_shapes:shape_list]
7002000000-70022f8000 ---p 00000000 00:00 0                              [anon:cfi shadow]
70022f8000-70022f9000 r--p 00000000 00:00 0                              [anon:cfi shadow]
70022f9000-700237f000 ---p 00000000 00:00 0                              [anon:cfi shadow]
700237f000-7002380000 r--p 00000000 00:00 0                              [anon:cfi shadow]
7002380000-7002384000 ---p 00000000 00:00 0                              [anon:cfi shadow]
7002384000-7002385000 r--p 00000000 00:00 0                              [anon:cfi shadow]
7002385000-7082000000 ---p 00000000 00:00 0                              [anon:cfi shadow]
7082000000-7082800000 rw-p 00000000 00:00 0                              [anon:libc_malloc]
7082810000-7082870000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7082871000-7082a05000 r--p 00000000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7082a05000-7082d06000 r-xp 00193000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7082d06000-7082d13000 r--p 00493000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7082d13000-7082d14000 rw-p 0049f000 fe:32 691939                         /data/data/com.termux/files/usr/lib/libruby.so.3.4.1
7082d14000-7082d27000 rw-p 00000000 00:00 0                              [anon:.bss]
7082d30000-7082d50000 r--s 00000000 00:10 488                            /dev/__properties__/u:object_r:timezone_prop:s0
7082d50000-7082dc0000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7082dc9000-7082dce000 r--p 00000000 fe:06 20879571                       /system/lib64/liblog.so
7082dce000-7082dd7000 r-xp 00005000 fe:06 20879571                       /system/lib64/liblog.so
7082dd7000-7082dd8000 r--p 0000e000 fe:06 20879571                       /system/lib64/liblog.so
7082dd8000-7082dd9000 rw-p 0000f000 fe:06 20879571                       /system/lib64/liblog.so
7082df0000-7082e00000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7082e00000-7085c00000 ---p 00000000 00:00 0
7085c10000-7085c40000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7085c40000-7085cc5000 r--p 00000000 fe:06 20878537                       /system/lib64/libc++.so
7085cc5000-7085cc8000 ---p 00000000 00:00 0
7085cc8000-7085d43000 r-xp 00084000 fe:06 20878537                       /system/lib64/libc++.so
7085d43000-7085d46000 ---p 00000000 00:00 0
7085d46000-7085d4e000 r--p 000fe000 fe:06 20878537                       /system/lib64/libc++.so
7085d4e000-7085d51000 ---p 00000000 00:00 0
7085d51000-7085d52000 rw-p 00105000 fe:06 20878537                       /system/lib64/libc++.so
7085d52000-7085d59000 rw-p 00000000 00:00 0                              [anon:.bss]
7085d70000-7085d80000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7085d86000-7085d89000 r--p 00000000 fe:06 20880019                       /system/lib64/libnetd_client.so
7085d89000-7085d8d000 r-xp 00003000 fe:06 20880019                       /system/lib64/libnetd_client.so
7085d8d000-7085d8e000 r--p 00007000 fe:06 20880019                       /system/lib64/libnetd_client.so
7085d8e000-7085d8f000 rw-p 00008000 fe:06 20880019                       /system/lib64/libnetd_client.so
7085da0000-7085dd0000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7085dd5000-7085ddc000 r--p 00000000 fe:32 449022                         /data/data/com.termux/files/usr/lib/libz.so.1.3.1
7085ddc000-7085de7000 r-xp 00006000 fe:32 449022                         /data/data/com.termux/files/usr/lib/libz.so.1.3.1
7085de7000-7085de9000 r--p 00010000 fe:32 449022                         /data/data/com.termux/files/usr/lib/libz.so.1.3.1
7085e05000-7085e25000 r--s 00000000 00:10 109                            /dev/__properties__/u:object_r:build_prop:s0
7085e25000-7085e26000 r--p 00000000 fe:32 178526                         /data/data/com.termux/files/usr/lib/libtermux-exec.so
7085e26000-7085e28000 r-xp 00000000 fe:32 178526                         /data/data/com.termux/files/usr/lib/libtermux-exec.so
7085e28000-7085e29000 r--p 00001000 fe:32 178526                         /data/data/com.termux/files/usr/lib/libtermux-exec.so
7085e2d000-7085e4d000 r--s 00000000 00:10 231                            /dev/__properties__/u:object_r:heapprofd_prop:s0
7085e4d000-7085e6d000 r--s 00000000 00:10 253                            /dev/__properties__/u:object_r:libc_debug_prop:s0
7085e6d000-7085ebc000 r--p 00000000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7085ebc000-7085f7f000 r-xp 0004f000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7085f7f000-7085f86000 r--p 00112000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7085f86000-7085f88000 rw-p 00119000 07:148 41                            /apex/com.android.runtime/lib64/bionic/libc.so
7085f88000-7086199000 rw-p 00000000 00:00 0                              [anon:.bss]
7086199000-708619d000 r--p 00000000 00:00 0                              [anon:.bss]
708619d000-70861a5000 rw-p 00000000 00:00 0                              [anon:.bss]
70861c0000-70861e0000 r--s 00000000 00:10 226                            /dev/__properties__/u:object_r:gwp_asan_prop:s0
70861e0000-7086200000 r--s 00000000 00:10 156                            /dev/__properties__/u:object_r:debug_prop:s0
7086200000-7086c00000 ---p 00000000 00:00 0
7086c14000-7086c74000 rw-p 00000000 00:00 0                              [anon:linker_alloc]
7086c74000-7086c77000 r--p 00000000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7086c77000-7086c7d000 r-xp 00002000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7086c7d000-7086c7e000 r--p 00007000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7086c7e000-7086c7f000 rw-p 00007000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7086c7f000-7086c80000 rw-p 00000000 00:00 0                              [anon:.bss]
7086c93000-7086c94000 r--p 00000000 07:148 43                            /apex/com.android.runtime/lib64/bionic/libdl.so
7086c94000-7086c95000 r-xp 00001000 07:148 43                            /apex/com.android.runtime/lib64/bionic/libdl.so
7086c95000-7086c96000 r--p 00002000 07:148 43                            /apex/com.android.runtime/lib64/bionic/libdl.so
7086c96000-7086c97000 ---p 00000000 00:00 0
7086c97000-7086c98000 r--p 00000000 00:00 0                              [anon:.bss]
7086c98000-7086c9b000 rw-p 00000000 00:00 0                              [anon:.bss]
7086cac000-7086ccc000 r--s 00000000 00:10 804                            /dev/__properties__/properties_serial
7086ccc000-7086ccf000 r--p 00000000 fe:32 661693                         /data/data/com.termux/files/usr/lib/libandroid-support.so
7086ccf000-7086cd1000 r-xp 00002000 fe:32 661693                         /data/data/com.termux/files/usr/lib/libandroid-support.so
7086cd1000-7086cd2000 r--p 00003000 fe:32 661693                         /data/data/com.termux/files/usr/lib/libandroid-support.so
7086cd2000-7086cd4000 rw-p 00003000 fe:32 661693                         /data/data/com.termux/files/usr/lib/libandroid-support.so
7086cda000-7086d03000 r--s 00000000 00:10 71                             /dev/__properties__/property_info
7086d03000-7086d16000 r--p 00000000 07:148 45                            /apex/com.android.runtime/lib64/bionic/libm.so
7086d16000-7086d3b000 r-xp 00013000 07:148 45                            /apex/com.android.runtime/lib64/bionic/libm.so
7086d3b000-7086d3c000 r--p 00038000 07:148 45                            /apex/com.android.runtime/lib64/bionic/libm.so
7086d3c000-7086d3d000 rw-p 00039000 07:148 45                            /apex/com.android.runtime/lib64/bionic/libm.so
7086d55000-7086d77000 r--p 00000000 fe:32 1042440                        /data/data/com.termux/files/usr/lib/libgmp.so
7086d77000-7086db7000 r-xp 00021000 fe:32 1042440                        /data/data/com.termux/files/usr/lib/libgmp.so
7086db7000-7086db9000 r--p 00060000 fe:32 1042440                        /data/data/com.termux/files/usr/lib/libgmp.so
7086db9000-7086dba000 rw-p 00061000 fe:32 1042440                        /data/data/com.termux/files/usr/lib/libgmp.so
7086dd4000-7086df4000 r--s 00000000 00:10 172                            /dev/__properties__/u:object_r:device_config_memory_safety_native_prop:s0
7086df4000-7086df5000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086dfc000-7086e04000 rw-p 00000000 00:00 0                              [anon:System property context nodes]
7086e04000-7086e24000 r--s 00000000 00:10 85                             /dev/__properties__/u:object_r:arm64_memtag_prop:s0
7086e37000-7086e40000 r--s 00000000 fe:32 219682                         /data/data/com.termux/files/usr/lib/libandroid-execinfo.so
7086e40000-7086e60000 rw-p 00000000 00:00 0                              [anon:Ruby:GC:default:heap_page_body_allocate]
7086e64000-7086e84000 r--s 00000000 00:10 780                            /dev/__properties__/u:object_r:vendor_socket_hook_prop:s0
7086e84000-7086f44000 r--p 00000000 00:00 0                              [anon:linker_alloc]
7086f44000-7086f48000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f4a000-7086f4b000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f4e000-7086f4f000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f53000-7086f54000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f54000-7086f56000 r--s 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
7086f56000-7086f57000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f58000-7086f5a000 r--s 00000000 fe:32 691744                         /data/data/com.termux/files/usr/bin/ruby
7086f5a000-7086f5b000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f5c000-7086f60000 ---p 00000000 00:00 0
7086f60000-7086f63000 rw-p 00000000 00:00 0                              [anon:stack_and_tls:main]
7086f63000-7086f67000 ---p 00000000 00:00 0
7086f67000-7086f68000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f69000-7086f74000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f74000-7086f94000 r--s 00000000 00:10 787                            /dev/__properties__/u:object_r:vndk_prop:s0
7086f94000-7086f98000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
7086f98000-7086ff8000 r--p 00000000 00:00 0                              [anon:linker_alloc]
7086ff8000-7087018000 r--s 00000000 00:10 156                            /dev/__properties__/u:object_r:debug_prop:s0
7087018000-7087019000 ---p 00000000 00:00 0
7087019000-7087021000 rw-p 00000000 00:00 0
7087021000-7087022000 ---p 00000000 00:00 0
7087022000-7087042000 r--s 00000000 00:10 804                            /dev/__properties__/properties_serial
7087042000-708704a000 rw-p 00000000 00:00 0                              [anon:System property context nodes]
708704a000-7087073000 r--s 00000000 00:10 71                             /dev/__properties__/property_info
7087073000-70870d3000 r--p 00000000 00:00 0                              [anon:linker_alloc]
70870d3000-70870d4000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
70870d4000-70870d5000 r--p 00000000 00:00 0                              [anon:atexit handlers]
70870d5000-70870d7000 rw-p 00000000 00:00 0                              [anon:bionic_alloc_small_objects]
70870d7000-70871f4000 ---p 00000000 00:00 0
70871f4000-70871f8000 rw-p 00000000 00:00 0
70871f8000-70880d7000 ---p 00000000 00:00 0
70880d7000-70880db000 ---p 00000000 00:00 0
70880db000-70880e3000 rw-p 00000000 00:00 0                              [anon:thread signal stack]
70880e3000-70880e4000 rw-p 00000000 00:00 0                              [anon:arc4random data]
70880e5000-70880e6000 r--p 00000000 00:00 0                              [anon:atexit handlers]
70880e6000-70880e7000 rw-p 00000000 00:00 0                              [anon:arc4random data]
70880e7000-70880e9000 r--p 00000000 00:00 0                              [vvar]
70880e9000-70880ea000 r-xp 00000000 00:00 0                              [vdso]
70880ea000-7088133000 r--p 00000000 07:148 16                            /apex/com.android.runtime/bin/linker64
7088133000-7088249000 r-xp 00049000 07:148 16                            /apex/com.android.runtime/bin/linker64
7088249000-7088253000 r--p 0015f000 07:148 16                            /apex/com.android.runtime/bin/linker64
7088253000-7088254000 rw-p 00169000 07:148 16                            /apex/com.android.runtime/bin/linker64
7088254000-708825a000 rw-p 00000000 00:00 0                              [anon:.bss]
708825a000-708825e000 r--p 00000000 00:00 0                              [anon:.bss]
708825e000-7088268000 rw-p 00000000 00:00 0                              [anon:.bss]
7ff2947000-7ff296a000 rw-p 00000000 00:00 0                              [stack]

@mbekkomo
Copy link
Contributor Author

mbekkomo commented Mar 5, 2025

This is one way to work around it I guess if there is no other way to be found,

The change in ruby that caused the error to start appearing is this: ruby/ruby@63cbe3f

Since the problem bisects to that commit, reverting it like this would cause the error to stop:

Reverts https://github.com/ruby/ruby/commit/63cbe3f6ac9feb44a2e43b1f853e2ca7e049316c
which makes https://github.com/termux/termux-packages/issues/23582 go back to previous behavior (working)

--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -342,7 +342,7 @@ rb_getaddrinfo(const char *hostp, const char *portp, const struct addrinfo *hint
     arg.service = portp;
     arg.hints = hints;
     arg.res = ai;
-    return (int)(VALUE)rb_thread_call_without_gvl(fork_safe_getaddrinfo, &arg, RUBY_UBF_IO, 0);
+    return (int)(VALUE)rb_thread_call_without_gvl(nogvl_getaddrinfo, &arg, RUBY_UBF_IO, 0);
 }
 
 #elif GETADDRINFO_IMPL == 2
@@ -505,7 +505,7 @@ start:
     }
 
     pthread_t th;
-    if (raddrinfo_pthread_create(&th, fork_safe_do_getaddrinfo, arg) != 0) {
+    if (raddrinfo_pthread_create(&th, do_getaddrinfo, arg) != 0) {
         int err = errno;
         free_getaddrinfo_arg(arg);
         errno = err;
--- a/process.c
+++ b/process.c
@@ -4233,23 +4233,12 @@ rb_fork_ruby(int *status)
         prefork();
 
         before_fork_ruby();
-        rb_thread_acquire_fork_lock();
         disable_child_handler_before_fork(&old);
 
         child.pid = pid = rb_fork();
         child.error = err = errno;
 
         disable_child_handler_fork_parent(&old); /* yes, bad name */
-        if (
-#if defined(__FreeBSD__)
-            pid != 0 &&
-#endif
-            true) {
-            rb_thread_release_fork_lock();
-        }
-        if (pid == 0) {
-            rb_thread_reset_fork_lock();
-        }
         after_fork_ruby(pid);
 
         /* repeat while fork failed but retryable */
~ $ ruby -e 'puts RUBY_VERSION; fork'
3.4.1
~ $ 

however, what the ruby creators are trying to do is make the language more thread-safe, so by completely reverting their change, this still does not "fully solve" the problem because it misses out on their feature, by continuing to use the old, less-thread-safe behavior that the old version of ruby was using.

I think an ideal solution would probably be one that can properly fix the fork lock feature in a thread-safe way that does not have EPERM or EBUSY on Android.

It's better to check the Ruby Issue Tracker, we might find something useful there to solve this problem.

@mbekkomo mbekkomo changed the title fix(main/ruby): fix fork panicking on EPERM fix(main/ruby): fix fork panicking because of thread deadlock Mar 5, 2025
@mbekkomo mbekkomo changed the title fix(main/ruby): fix fork panicking because of thread deadlock fix(main/ruby): fix fork panicking Mar 5, 2025
@mbekkomo
Copy link
Contributor Author

mbekkomo commented Mar 5, 2025

@robertkirkman @csabahenk Can you try the latest commit build?

@mbekkomo
Copy link
Contributor Author

mbekkomo commented Mar 5, 2025

I've tried the latest build myself and met with EPERM again. I think we need to reimplement the thread locking using pthread_mutex_*.

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.

[Bug]: ruby 3.4.1 fork broken
3 participants