# Verification Mantic

root@ruby31-segfault-fix:~# dpkg -l ruby3.1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version          Architecture Description
+++-==============-================-============-======================================================
ii  ruby3.1        3.1.2-7ubuntu3.1 amd64        Interpreter of object-oriented 
scripting language Ruby
root@ruby31-segfault-fix:~# cat reproducer.rb 
require 'nokogiri'

# must have an error in it to cause pthread_setspecific to be called
html = "<div foo='asdf>asdf</div>"

Thread.new { Nokogiri::HTML4::Document.parse(html) }
sleep 3 # THREAD_CACHE_TIME

exit 0
root@ruby31-segfault-fix:~# time while true; do ruby reproducer.rb; done
^Creproducer.rb:7:in `sleep': Interrupt
        from reproducer.rb:7:in `<main>'


real    8m5.499s
user    0m10.297s
sys     0m4.874s


More than 8 minutes running the script without any segfault.

# Verification Jammy

root@ruby30-segfault-fix:~# dpkg -l ruby3.0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version          Architecture Description
+++-==============-================-============-======================================================
ii  ruby3.0        3.0.2-7ubuntu2.5 amd64        Interpreter of object-oriented 
scripting language Ruby
root@ruby30-segfault-fix:~# cat reproducer.rb 
require 'nokogiri'

# must have an error in it to cause pthread_setspecific to be called
html = "<div foo='asdf>asdf</div>"

Thread.new { Nokogiri::HTML4::Document.parse(html) }
sleep 3 # THREAD_CACHE_TIME

exit 0
root@ruby30-segfault-fix:~# time while true; do ruby reproducer.rb; done
^Creproducer.rb:7:in `sleep': Interrupt
        from reproducer.rb:7:in `<main>'


real    8m4.811s
user    0m10.094s
sys     0m4.370s


More than 8 minutes running the script without any segfault.

** Tags removed: verification-needed verification-needed-jammy 
verification-needed-mantic
** Tags added: verification-done verification-done-jammy 
verification-done-mantic

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2049197

Title:
  ruby_xfree segmentation fault

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ruby3.0/+bug/2049197/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to