Red Hat Bugzilla – Bug 56611
lslk displays nothing on RH7.2
Last modified: 2008-05-01 11:38:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5+) Gecko/20011003
Description of problem:
Running lslk on a RH7.2 system displays no results even if there are locks
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run "lslk".
Actual Results: No results are returned.
Expected Results: Should have displayed a list of locks based on the
contents of /proc/locks.
Rebuilding from the SRPM results in the same behavior.
However, if I extract the source files from the SRPM and build it manually
by running "./Configure -n linux; make", it works correctly.
Jakub, rebuild lslk with "-O" "-O1" it works fine, but does not work if it's
rebuild with "-O2". It's a gcc bug ?
Might be, might even more probably be lslk bug.
Try e.g. -O2 -fno-strict-aliasing, if that works, all bets lslk doesn't care
about C standard, try -O2 -fno-optimize-sibling-calls (if that works, chances
are for gcc bug), etc.
Also, you could do a binary search - rebuild some objects with -O2 and some with
-O1, see which one matters.
It works fine with -O2 -fno-strict-aliasing. but does not work with -O2
Then it is 99% lslk bug. Look for invalid type punning in the source
(e.g. stuff like
int x, y;
*(float *)&x = 1.0;
y = x;
etc.). info gcc on -fstrict-aliasing might be helpful.
Also, you might save some time by seeing which .o file matters (ie.
compile everything -O2 and replace only some .o files with -O2 -fno-strict-aliasing
up to the point where you have all -O2 but one -O2 -fno-strict-aliasing
which works as expected). Then check that source and its headers, then look
for similar things in the entire package.
it's fixed in lslk-1.28-2.