Bug 37631 - su command generates
su command generates
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: XFree86 (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-25 11:34 EDT by Ray S. Babcock
Modified: 2007-04-18 12:32 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-23 11:00:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
strace su babcock output (27.49 KB, text/plain)
2001-04-25 12:48 EDT, Ray S. Babcock
no flags Details

  None (edit)
Description Ray S. Babcock 2001-04-25 11:34:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686)


After a normal upgrade from 7.0 to 7.1, executing the su command
generates a "File size limit exceeded".  I can log in as root and
get  this error by su'ing to another user.  Same error logged in as user
and su'ing to root.

Reproducible: Always
Steps to Reproduce:
1.login as root.
2.start a terminal window.
3.enter the su command.
	

Actual Results:  [root@guitunes /root]% su
File size limit exceeded
[root@guitunes /root]%


Expected Results:  It should have switched me to the user babcock.

This same error message happens when I try to run the
netscape email system.  Netscape crashes and this error
message appears. 

My log files seem awfully large:
4876952 loginlog
1388634 pacct
8917995 syslog

but rerunning logrotate -f doesn't seem to clear them up.
Comment 1 Ray S. Babcock 2001-04-25 11:53:34 EDT
A typo in the bug report. 
In Actual Results:
The first line should read:
[root@guitunes /root]% su babcock

Comment 2 Bernhard Rosenkraenzer 2001-04-25 12:21:44 EDT
I can't reproduce this. Please attach the output of
"strace su babcock".

Comment 3 Ray S. Babcock 2001-04-25 12:48:06 EDT
Created attachment 16410 [details]
strace su babcock output
Comment 4 Bernhard Rosenkraenzer 2001-04-26 06:21:26 EDT
This looks weird, the xauth socket refcount seems to be getting too large.
Does this still happen if you run "rm -rf /root/.xauth" as root?

Comment 5 Ray S. Babcock 2001-04-26 11:42:33 EDT
After running "rm -rf /root/.xauth" as root, the first su  babcock
works.  When I exit that shell, I get a "bus error" but it worked and
I was babcock.  However, the second run gets the file size error
and the large unix:0 file reappeared.  (> 40Mb)
??
Comment 6 Bernhard Rosenkraenzer 2001-04-26 12:00:53 EDT
Assigning to XFree86, since xauth seems to be doing something odd.
Are you doing anything odd that might cause this?
Comment 7 Ray S. Babcock 2001-04-27 10:50:30 EDT
Nothing that I know of.  I have been using Red Hat Linux since last summer and
not had the problem.  I'll review my xconfiguration and see if I can pick up 
anything.  It is interesting that I get the same error message when I try to run
netscape now also.  (But I can't strace the netscape command to find what
file is causing it.)
Comment 8 Ray S. Babcock 2001-04-30 16:44:22 EDT
I tried a reconfigure of the X-windows system and this did not help.
It appears to be something about xauth that is causing this to happen.
Any further help would be greatly appreciated.  I'm still not able to fully
use my 7.1 upgrade.
Comment 9 Ray S. Babcock 2001-05-01 12:36:01 EDT
This problem is with my maximum file size as set somewhere.  I have tried
building a large
file and it gives the same error message when it reaches the 40Mb size.  Running
bash
as root can reset root's file size limit to unlimited.  But I can't seem to set
my user account's
file size limit above 40000.  No ulimit command is in .bash-profile for this
account.
Any other places that control the user's file size limit?
Comment 10 Ray S. Babcock 2001-05-01 17:11:37 EDT
I found where the file size limit is being set to 40000.  It is in the file
/etc/security/limits.conf  
However, when I change that to 1000000, and reboot the system,
I still get an error with the su command.  Only now the file
~babcock/.xauth/refcount/root/guitunes/unix:0 is 1024000000
in size.  So, it just keeps bumping this file up to this large size
so that the next su command fails with the "File size limit exceeded".
Comment 11 Ray S. Babcock 2001-05-02 14:23:01 EDT
The file that is causing this error:
/home/babcock/.xauth/refcount/root/guitunes/unix:0
that is over 1Gb in size contains a cookie at the
front and then is filled with zeros.  Following
is an octal dump of the file:

guitunes % od unix:0 | more
0000000 020061 062471 031542 033067 031141 061065 063064 062460
0000020 033061 033463 062544 062060 031545 062465 031465 032471
0000040 061542 000000 000000 000000 000000 000000 000000 000000
0000060 000000 000000 000000 000000 000000 000000 000000 000000
*
7502200000
guitunes % 

This file contains 1024000000 bytes. 

An xauth list gives the same cookie as this file contains.  So somhow
this file is not being closed properly when using the su command.
Comment 12 Kris Urquhart 2001-05-16 13:11:54 EDT
I upgraded from RedHat 7.0 to 7.1 yesterday and experienced this same exact 
problem: the xauth refcount file was as large as ulimit would let it be, and 
su would bus error upon exit, not cleaning up the file.  

I am pretty sure the problem is with pam_xauth trying to forward an invalid 
key returned from xauth.  When I did an xauth list, there were many entries 
that were no longer valid (i.e. displays that no longer exist).  By using 
xauth delete to empty my .Xauthority file, the refcount file problem went away 
and su works fine now.  In hindsight, I should have saved a copy of my 
.Xauthority file, but it is gone now.
Comment 13 Ray S. Babcock 2001-05-16 14:26:08 EDT
I tried a similar tactic. Here is the results of my xauth list:
guitunes % xauth list
guitunes/unix:0  MIT-MAGIC-COOKIE-1  bcda56b0f12ac55555ab56f897c2cad0
guitunes:0  MIT-MAGIC-COOKIE-1  bcda56b0f12ac55555ab56f897c2cad0
guitunes %
When I did xauth remove unix:0, the first line went away
and my su command worked ok!  However, I couldn't do any
x clients.  Even an xhost + command said I didn't have
authority to connect to the X server.  So, I logged out
and logged back in and the /unix:0 line reappeared in the
.Xauthority file (xauth list), and x clients worked again,
BUT su again fails.  I can't seem to remove just the second
display from the file.  If I delete the .Xauthority file
and log out, it is simply rebuilt when I log back in.
So, I'm still stumped.

Comment 14 Ray S. Babcock 2001-05-23 11:00:46 EDT
I was able to remove this problem.  It took a reformat of my hard
drive and a brand new installation of RedHat 7.1 
su works fine now!

Note You need to log in before you can comment on or make changes to this bug.