[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-bugs] [Bug 1677] New: run xenpm get segment fault
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1677 Summary: run xenpm get segment fault Product: Xen Version: unstable Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Tools AssignedTo: xen-bugs@xxxxxxxxxxxxxxxxxxx ReportedBy: yang.z.zhang@xxxxxxxxx Environment: ------------ Service Arch (ia32/ia32e/IA64): ia32/ia32e Guest Arch (ia32/ia32e/IA64): ia32/ia32e Guest OS Type (Linux/Windows):Linux Change Set: 22314 Hardware: westmere-ep Other: xen-changeset: 22314:28a160746815 xen-date: Wed Oct 27 12:24:28 2010 +0100 pvops git: commit d0054d672ff0ebf6116cee27bae3fc2591c726af Author: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx> Date: Mon Oct 25 16:53:46 2010 -0700 ioemu git: commit 1a13c2df0c5c93f06c0f2286628b9b0f4d80ff4d Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Date: Thu Oct 21 17:59:20 2010 +0100 Bug detailed description: -------------------------- Xenpm is broken now. When run "xenpm start" or "xenpm get-cpuidle-states" and other xenmpm command, it will get segment fault. After do some investigation, I find call xc_pm_get_cxstat() will free the cxstat->tiggers, For example: Here is some code form my test.c. struct xc_cx_stat cxstatinfo, *cxstat = &cxstatinfo; cxstat->triggers = malloc(max_cx_num * sizeof(uint64_t)); if ( !cxstat->triggers ) { printf("get memory fail"); return NOMEM; } ret = xc_pm_get_cxstat(xc_handle, cpu, cxstat); printf("triggers=%lx \n", cxstat->triggers[0]); Run it, and it will show segment fault at print the cxtat->tiggers[0]. It seems that xc_pm_get_cxstat() will free cxstat->triggers which we allocate memory before, and then when try to touch cxstat->tiggers[0], the issue raised. And this issue was introduced by cs 22292. If remove the patch 22292, everything is ok. Reproduce steps: ---------------- 1.Install xen (cs > 22292) 2.run xenpm start to star collect data 3.using ctrl-c to stop it and see the data 4.then it is killed by segment fault Current result: ---------------- segment fault Expected result: ---------------- can see the pm info -- Configure bugmail: http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. _______________________________________________ Xen-bugs mailing list Xen-bugs@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-bugs
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |