Bug 1142532
Summary: | clear_running_commands XML-RPC call fails with MemoryError | ||
---|---|---|---|
Product: | [Retired] Beaker | Reporter: | Dan Callaghan <dcallagh> |
Component: | lab controller | Assignee: | Dan Callaghan <dcallagh> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 0.18 | CC: | aigao, asaha, dcallagh, rmancy |
Target Milestone: | 19.0 | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-11-25 07:18:41 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dan Callaghan
2014-09-17 01:17:14 UTC
When I was working on this patch <https://git.beaker-project.org/cgit/beaker/commit/?id=cbb8ecd2c24086bde7ede40e2a7e613a1c4b93e6> I realised that the large object graph causing this MemoryError was probably due to system activity records. Mainly because that is the only thing (aside from the commands themselves) that that code path even touches from the db. Some of the older regularly-used systems in our production db have 10-20,000 activity records, and the current version of the code would fetch them all for every system which had a stale command. So I patched the tests to simulate that situation: --- a/IntegrationTests/src/bkr/inttest/server/selenium/test_labcontrollers.py +++ b/IntegrationTests/src/bkr/inttest/server/selenium/test_labcontrollers.py @@ -455,11 +455,16 @@ def test_obeys_max_running_commands_limit(self): def test_clear_running_commands(self): with session.begin(): - system = data_setup.create_system(lab_controller=self.lc) - command = CommandActivity( - user=None, service=u'testdata', action=u'on', - status=CommandStatus.running) - system.command_queue.append(command) + for _ in range(20): + system = data_setup.create_system(lab_controller=self.lc) + for i in range(10000): + system.record_activity(user=system.owner, service=u'testdata', + action=u'Changed', field=u'Loaned To', + old=u'someone%s' % i, new=u'someone else%s' % i) + command = CommandActivity( + user=None, service=u'testdata', action=u'on', + status=CommandStatus.running) + system.command_queue.append(command) other_system = data_setup.create_system() other_command = CommandActivity( user=None, service=u'testdata', action=u'on', and it triggers the MemoryError on 0.18, when rlimit_as=1000000000 is set. On develop (with the above patch) the problem is gone, the request succeeds without MemoryError. I won't commit the test itself because it chews a lot of memory and takes a long time to set up. But we can consider this fixed in 19. Marking this as VERIFIED now that 19.0rc2 acceptance testing is complete. Beaker 19.0 has been released. |