[Linux-cluster] CS4 U2 / crash when "less /proc/cluster/status"

Patrick Caulfield pcaulfie at redhat.com
Thu Oct 26 08:10:06 UTC 2006


Lon Hohberger wrote:
> On Wed, 2006-10-25 at 11:45 -0500, Robert Peterson wrote:
>> Alain Moulle wrote:
>>> Hi
>>>
>>> Strange, when you do :
>>> less /proc/cluster/status
>>> on one node of a HA pair, the system crashes !
>>> If you use cat /proc/cluster/status, no crash.
>>> Any explanation ?
>>> Is it always true with CS4 U4 ?
>>>
>>> Thanks
>>> Alain Moullé
>>>   
>> Hi Alain,
>>
>> Please file a new bugzilla for this problem.  Assign it to 
>> rpeterso at redhat.com
>> I was able to recreate it on RHEL4 U4, and that surprises me.  
>> Incidentally,
>> cat /proc/cluster/status works just fine.  I'll investigate why less 
>> doesn't.
> 
> I wonder if 'more' uses lseek() and less doesn't?

less reads the start of the file in a small chunk (64 bytes I think) and the code in proc_cluster_status doesn't stop when it
reaches the 'length' parameter (slapped wrist).

That routine should really be changed to use seq_file like the rest of them.

It probably used to be OK, but more and more stuff has been added to the /proc file over time and it's a lot bigger than it used to be !


-- 

patrick




More information about the Linux-cluster mailing list