Bug 1314973
Summary: | Refactor code to avoid calling prepare_debuginfo in a redundant way, store path to vmlinux file | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Dave Wysochanski <dwysocha> | ||||||||||||||||||||
Component: | retrace-server | Assignee: | Dave Wysochanski <dwysocha> | ||||||||||||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||||||||||
Priority: | unspecified | ||||||||||||||||||||||
Version: | el6 | CC: | jberan, michal.toman | ||||||||||||||||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||||||||||||||||
Target Release: | --- | ||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||
Whiteboard: | |||||||||||||||||||||||
Fixed In Version: | retrace-server-1.15-2.fc23 retrace-server-1.15-2.el6 retrace-server-1.15-2.el7 | Doc Type: | Bug Fix | ||||||||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||||||||
Clone Of: | Environment: | ||||||||||||||||||||||
Last Closed: | 2017-04-11 20:27:23 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: | |||||||||||||||||||||||
Attachments: |
|
Description
Dave Wysochanski
2016-03-05 11:16:42 UTC
Created attachment 1133315 [details]
patch1 to fix this bug
Created attachment 1133316 [details]
patch2 to fix this bug
Ok I think I got it and it was not as hard as I feared. I measured the perf difference on an idle system and it was anywhere from 5 to 10 seconds on a typical vmcore to skip prepare_debuginfo in retrace-server-interact. I'm testing these patches on top of patches for bug 1313011 and bug 1314897. Assuming they test out ok, I'll put in another pull request on github. All patches testing out ok and pull request in. I am going to re-do these patches but keep the same content. The second patch has too much in it - the hunks which remove the VMLINUX file should go in the first patch. The hunks which move the prepare_debuginfo and strip_vmcore should be in their own patch. Finally the code which fixes this bug and uses the vmlinux file should be in a 3rd patch to make it clear. Actually I found one small bug in the original patchset. In retrace-server-interact, I omitted the call to task.set_crash_cmd(' '.join(crash_cmd)) after the call to prepare_debuginfo in the case when the vmlinux file does not exist. I was also debating about the vmlinux file itself. On one hand it would be more flexible if the vmlinux file was a symlink to the actual file, rather than a file containing the path. Unfortunately that would imply that more people may call crash directly on the vmcore and vmlinux file, and this would have implications for our cleanup task which relies on the 'mtime' of the task directory: retrace.py: RetraceTask ... def get_age(self): """Returns the age of the task in hours.""" return int(time.time() - os.path.getmtime(self._savedir)) / 3600 retrace-server-cleanup: if task.get_age() >= CONFIG["ArchiveTaskAfter"]: log.write("Archiving task %s\n" % filename) ... if task.get_age() >= CONFIG["DeleteTaskAfter"]: log.write("Deleting old task %s\n" % filename) task.create_worker().remove_task() I have a bug open to change the cleanup based on atime of the vmcore but that wasn't unanimous and is stalled. For now will leave the vmlinux file containing the path, rather than making it a symlink. Hopefully this will avoid problems with people running crash directly and fooling the cleanup script. If we fix that other bug or people complain we can always change it to a symlinked file. Created attachment 1133895 [details]
patch 1/3 to fix this bug
Created attachment 1133896 [details]
patch2/3 to fix this bug
Created attachment 1133897 [details]
patch 3/3 to fix this bug
All patches tested out ok, pull request in. I actually had to do a 3rd round of these patches. Patrik found one small but significant omission in the 'create' method and after I did some testing, I found a second issue in strip_vmcore which was easily fixable. Patches are posted now on github and pull request in. Created attachment 1135264 [details]
patch 1/4 to fix this bug
Created attachment 1135265 [details]
patch 2/4 to fix this bug
Created attachment 1135266 [details]
patch 3/4 to fix this bug
Created attachment 1135267 [details]
patch 4/4 to fix this bug
retrace-server-1.15-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-88382c37cc retrace-server-1.15-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3fd6c52337 retrace-server-1.15-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-1082131b97 retrace-server-1.15-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-505f2e5c59 retrace-server-1.15-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-3fd6c52337 retrace-server-1.15-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-505f2e5c59 retrace-server-1.15-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-1082131b97 retrace-server-1.15-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-88382c37cc retrace-server-1.15-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-1082131b97 retrace-server-1.15-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-505f2e5c59 retrace-server-1.15-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3fd6c52337 retrace-server-1.15-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-88382c37cc retrace-server-1.15-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-3fd6c52337 retrace-server-1.15-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-88382c37cc retrace-server-1.15-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-1082131b97 retrace-server-1.15-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-505f2e5c59 retrace-server-1.15-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. retrace-server-1.15-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. retrace-server-1.15-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report. retrace-server-1.15-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. retrace-server-1.16-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-81eb6f786a retrace-server-1.16-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-81eb6f786a I verified this has been fixed in retrace-server-1.15-1.el6 retrace-server-1.16-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-81eb6f786a retrace-server-1.16-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-81eb6f786a |