Bug 695743

Summary: Multiple concurrent calls to util.get_repo_packages() results in Segmentation fault
Product: [Retired] Pulp Reporter: John Matthews <jmatthew>
Component: z_otherAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedKeywords: Triaged
Target Milestone: ---   
Target Release: Sprint 22   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:09:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    
Attachments:
Description Flags
Backtrace from segmentation fault none

Description John Matthews 2011-04-12 14:59:23 UTC
Description of problem:

Pulp's usage of yum to determine the rpms available in a repository (after grinder has synced the repo) has a potential problem if it is invoked multiple times concurrently.

A test is created, but disabled in test/unit/test_util.py:test_get_repo_packages_multi_repo to demonstrate an segmentation fault will occur

$ nosetests test_util.py:TestUtil.test_get_repo_packages_multi_repo
Segmentation fault (core dumped)

Version of pulp:
0.162

Comment 1 John Matthews 2011-04-12 15:01:08 UTC
Created attachment 491508 [details]
Backtrace from segmentation fault


.....
#0  file_done (conn=0x7f1650009fc0, status=CURLE_OK, premature=false) at file.c:283
#1  0x000000353ec26b29 in Curl_done (connp=0x7f1661ff7830, status=CURLE_OK, premature=false) at url.c:5179
#2  0x000000353ec2dda9 in Curl_do_perform (data=0x22565c0) at transfer.c:2107
#3  0x00007f166bac5843 in do_curl_perform (self=0x2255da0) at src/pycurl.c:1024

Comment 2 John Matthews 2011-04-13 18:00:39 UTC
Underlying issues with yum/urlgrabber has an issue with multiple threads.
Short term solution for pulp/grinder is to add a lock that will limit 1 thread at a time interacting with urlgrabber through yum.


Requires grinder 0.94.

http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=f4b6e9f949ec99cdd4893158210bf8dd9dbd1333


QE: Two unit tests were added which triggered this behavior.  If the below two tests pass this problem is addressed.


$ nosetests test_util.py:TestUtil.test_get_repo_packages_multi_repo
.
----------------------------------------------------------------------
Ran 1 test in 9.876s

OK



$ nosetests test_repo_sync.py:TestRepoSync.test_sync_multiple_repos
.
----------------------------------------------------------------------
Ran 1 test in 26.251s

OK

Comment 3 Jay Dobies 2011-04-13 19:22:57 UTC
Fixed in build 0.163.

Comment 4 Preethi Thomas 2011-05-24 19:00:57 UTC
verified
[root@preethi unit]# rpm -q pulp
pulp-0.0.179-1.fc14.noarch
[root@preethi unit]# 

[root@preethi unit]# python test_util.py 
......
----------------------------------------------------------------------
Ran 6 tests in 12.227s

OK

[root@preethi unit]# python test_repo_sync.py 
[root@preethi unit]#

Comment 5 Preethi Thomas 2011-08-16 12:09:38 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 6 Preethi Thomas 2011-08-16 12:22:02 UTC
Closing with Community Release 15

pulp-0.0.223-4.