Bug 672169

Summary: segfaults on GC
Product: [Fedora] Fedora Reporter: Akira TAGOH <tagoh>
Component: rubygem-hpricotAssignee: Mamoru TASAKA <mtasaka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: mtasaka, thibaut.barrere, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/hpricot/hpricot/issues/#issue/32
Whiteboard:
Fixed In Version: rubygem-hpricot-0.8.3-2.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-02 19:37:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
gdb backtrace
none
proposed patch none

Description Akira TAGOH 2011-01-24 09:47:52 UTC
Created attachment 474931 [details]
gdb backtrace

Description of problem:
ruby got segfault on GC when it happens on allocating hpricot_struct.

Version-Release number of selected component (if applicable):
rubygem-hpricot-0.8.3-1.fc14.x86_64

How reproducible:
sometimes, depends on the timing.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
ruby segfaults.

Expected results:
no segfaults.

Additional info:
See attached backtrace log from gdb, particularly:

#5  hstruct_mark (ptr=0x477f450) at hpricot_scan.rl:672

and

#9  0x00007fdbd31a8e91 in alloc_hpricot_struct8 (klass=<value optimized out>) at
 hpricot_scan.rl:692

Comment 1 Akira TAGOH 2011-01-24 09:49:21 UTC
Created attachment 474932 [details]
proposed patch

Comment 2 Mamoru TASAKA 2011-01-24 17:18:35 UTC
Seems reasonable, however anyway would you attach the reproducer
(fontconfig-template-audit.rb)?

Comment 3 Akira TAGOH 2011-01-25 02:10:21 UTC
try to access http://git.fedorahosted.org/git/?p=fontpackages.git and get rid of "[]" in _get_element from lib/fontpackages/fontconfig.rb.

I can 100% reproduce this issue with the above claim.

Comment 4 Mamoru TASAKA 2011-02-01 16:40:53 UTC
The upstream tracker (opened by other people)
https://github.com/hpricot/hpricot/issues/#issue/32

Comment 5 Fedora Update System 2011-02-01 17:15:26 UTC
rubygem-hpricot-0.8.3-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/rubygem-hpricot-0.8.3-2.fc14

Comment 6 Fedora Update System 2011-02-01 17:16:17 UTC
rubygem-hpricot-0.8.3-2.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/rubygem-hpricot-0.8.3-2.fc13

Comment 7 Thibaut Barrère 2011-02-01 17:17:23 UTC
Akira,

thanks for the patch - I'm currently testing it out so we can commit it back to Hpricot and issue a new release.

Comment 8 Fedora Update System 2011-02-01 20:55:14 UTC
rubygem-hpricot-0.8.3-2.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rubygem-hpricot'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/rubygem-hpricot-0.8.3-2.fc14

Comment 9 Fedora Update System 2011-02-02 19:37:11 UTC
rubygem-hpricot-0.8.3-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-02-09 20:21:23 UTC
rubygem-hpricot-0.8.3-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.