Bug 528199

Summary: Calling Bug.get is being stuck in an endless loop and never returns dues to ExternalBugs
Product: [Community] Bugzilla Reporter: David Lawrence <dkl>
Component: WebServiceAssignee: Noura El hawary <nelhawar>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-28 20:37:41 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: 514793    
Attachments:
Description Flags
v1 for fixing problem with endless loop in Bug.get nelhawar: review? (dkl)

Description David Lawrence 2009-10-09 18:13:11 UTC
Description of problem:
When calling Bug.get via XMLRPC it never returns and causes httpd on the test server to consume large amount of resources. Somewhere it is getting stuck in endless loop of some kind. If I comment out the following line in extensions/external_bugs/code/get_bug_data.pl it works fine:

#$bugref->{'external_bugs'} = extensions::external_bugs::lib::ExternalBugs->new( { bug => $bugref } );

I have temporarily added extensions/external_bugs/disabled to allow us to continue testing. Will need to be removed when we figure out what is wrong.

Dave

Comment 1 Noura El hawary 2009-10-26 12:46:01 UTC
Created attachment 366097 [details]
v1 for fixing problem with endless loop in Bug.get

Hi Dave,

I was able to fix the problem with the endless loop of Bug.get by adding the line 
$bug->{external_bugs} = $bug->external_bugs->{bugs}; 

to Bugzilla/WebService/Bug.pm 

similar to what we have in bugzilla.getBugs and also in our 3.2 code we had it for Bug.get.

Thanks,
Noura

Comment 2 David Lawrence 2009-10-26 21:16:08 UTC
Thanks Noura. I am going to hold off on this review as I got the idea to rewrite the External Bugs code completely today as I was never really happy with my old implementation. The new one is more clean and more compliant with normal Bugzilla objects. I am almost done and will show what I have tomorrow. So the patch 
you made will probably need changing as well.

Also as a side note. I am making quite a bit of changes to the hook naming that we currently use which will touch quite a few files. I am also removing hooks that we created ourselves that are not longer needed as upstream has added more.

Thanks
Dave

Comment 3 Noura El hawary 2009-10-28 12:07:59 UTC
Hey Dave,

This seems to be working with your new external_bugs code. and the testcase t/400_webservice_bug_get_bugs.t passes successfully.

Thanks,
Noura

Comment 4 David Lawrence 2009-10-28 20:37:41 UTC
Closing as this should be better now.