Bug 161449
Summary: | "top" ignores user and system toprc | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michael Lee Yohe <aksansai> | ||||||||||||
Component: | procps | Assignee: | Karel Zak <kzak> | ||||||||||||
Status: | CLOSED RAWHIDE | QA Contact: | Brian Brock <bbrock> | ||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||
Priority: | medium | ||||||||||||||
Version: | 4 | CC: | goodyca48, niksa | ||||||||||||
Target Milestone: | --- | ||||||||||||||
Target Release: | --- | ||||||||||||||
Hardware: | i686 | ||||||||||||||
OS: | Linux | ||||||||||||||
Whiteboard: | |||||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||
Clone Of: | Environment: | ||||||||||||||
Last Closed: | 2005-07-11 11:29:03 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: | |||||||||||||||
Attachments: |
|
Description
Michael Lee Yohe
2005-06-23 15:00:11 UTC
Created attachment 115876 [details]
strace output of top when it ignores system toprc and user toprc
Created attachment 115877 [details]
toprc (user and system) - tried both
Does this have anything to do with "top" being in secure mode? I cannot find documentation on this behavioral change. Please advise. Created attachment 116068 [details]
bug fix patch
The problem is in the top.c: windows_stage1() function where is bad code that
doesn't work with gcc4.
The bug fix should be available in next procps update (this or next week).
I rebuilt the package using the bugfix you provided. I still receive the same results. From strace: open("/etc/toprc", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/myohe/.toprc", O_RDONLY) = 3 read(3, "RCfile for \"top with windows\"\t\t#"..., 1085) = 605 close(3) = 0 From spec file: Patch1: procps-3.2.5-selinux.patch Patch2: procps-3.1.15-misc.patch Patch3: procps-3.2.3-FAQ.patch Patch4: procps-3.2.1-selinux-workaround.patch Patch5: procps-3.2.1-top-vmsize-env.patch Patch6: procps-3.2.3-noproc.patch Patch7: procps-3.2.3-pseudo.patch Patch8: procps-3.2.4-0x9b.patch Patch9: procps-3.2.5-sysctl-writeonly.patch Patch10: procps-3.2.5-gcc4.patch From procps-3.2.5-gcc4.patch: --- procps-3.2.5/top.c.rc 2005-06-28 17:53:14.000000000 +0200 +++ procps-3.2.5/top.c 2005-06-28 17:58:36.000000000 +0200 @@ -2365,7 +2365,7 @@ for (i = 0; i < GROUPSMAX; i++) { w = &Winstk[i]; w->winnum = i + 1; - w->rc = Rc.win[i]; + memcpy(&w->rc, &Rc.win[i], sizeof(RCF_t)); w->captab[0] = Cap_norm; w->captab[1] = Cap_norm; w->captab[2] = w->cap_bold; @@ -2375,9 +2375,10 @@ w->captab[6] = w->capclr_hdr; w->captab[7] = w->capclr_rowhigh; w->captab[8] = w->capclr_rownorm; - w->next = w + 1; - w->prev = w - 1; - ++w; + if (i < GROUPSMAX+1) + w->next = w + 1; + if (i > 0) + w->prev = w - 1; } /* fixup the circular chains... */ Winstk[3].next = &Winstk[0]; Patch applied without issue. Any clues? Oh - I forgot to add that I did have "%patch10 -p1 -b .gcc4" in the spec file. I took a hint from your reply that GCC 4 is the cause. So, I changed the SPEC file to "gcc32" (compat-gcc-32 installed), and rebuilt - everything works great. So there must be another GCC 4 quirk somewhere that has yet to be found. Sorry, the patch is wrong. Problem is -O2 gcc4 option; with -O0 it works fine. Created attachment 116089 [details]
second version of the patch
Ooops.. bad day, I sent previous version of the patch. Created attachment 116090 [details]
bug fix patch
Fixed in procps-3.2.5-6.3 (FC4) and procps-3.2.3-5.3 (FC3). *** Bug 162941 has been marked as a duplicate of this bug. *** *** Bug 163411 has been marked as a duplicate of this bug. *** |