Bug 695743 - Multiple concurrent calls to util.get_repo_packages() results in Segmentation fault
Summary: Multiple concurrent calls to util.get_repo_packages() results in Segmentation...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 22
Assignee: John Matthews
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-04-12 14:59 UTC by John Matthews
Modified: 2011-08-16 12:22 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:09:38 UTC
Embargoed:


Attachments (Terms of Use)
Backtrace from segmentation fault (30.03 KB, text/plain)
2011-04-12 15:01 UTC, John Matthews
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.