Summary: Solaris 8 tail bug

From: Kyle Bresin <kbresin_at_go2call.com>
Date: Thu Jan 17 2002 - 16:14:33 EST
Thanks to all the people who responded.

Casper was the first one to point out that this already a confirmed bug, 
bug # 4348627

After that, George M. helpfully pointed out that the patch for this 
particular bug is patch-id 111225-02.

Big thanks to Don M. for mentioning that the patch isn't public... 
Which, goes a little way toward explaining why it's still broken on my 
system.

And finally, Anton gets the credit for explaining why so many people out 
there couldn't reproduce my bug.  Apparently it only grabs the 2 gigs of 
data *if* you have the 2 gigs.  So woe unto you who have *exactly* 2 
gigs of swap left and decide to tail something!

Thanks for everyones help!  While my systems are still unpatched against 
it, I can at least rest assured that all my systems aren't being 
afflicted by some random kernel parameter I set incorrectly. =)

kyle.


Kyle Bresin wrote:

> 
> I've been writing some resource monitors for my systems, and came upon a 
> stumper...  My swap monitor always seemed to be way off.  I looked 
> around and found that my disk_io monitor (that runs a minute before the 
> swap_monitor), was eating up 2 Gig of swap!
> 
> Upon closer inspection, I found that it was actually a simple 'tail -26' 
> command that was eating up the swap.  And since it was at the end of a 
> 'iostat -x 120 2', it sat there taking up it's swap for a full 2 minutes...
> 
> I tinkered with it more, and it seems that any time you call tail using 
> stdin, it reserves 2 gig of swap for itself...
> 
> I've confirmed this on every Solaris 8 system in my environment, however 
> it doesn't happen on any of our Solaris 6 boxes.
> 
> So here's the test:
> 
> # swap -s
> total: 928912k bytes allocated + 435928k reserved = 1364840k used, 
> 2412960k available
> # sleep 10 | tail -10 &
> [1] 29345
> # swap -s
> total: 929072k bytes allocated + 2533136k reserved = 3462208k used, 
> 315544k available
> 
> As you can see, the swap in use reliably jumps by 2 gigs.
> 
> Is this just me, or have I setup every one of Solaris 8 boxes incorrectly?
> 
> One other curiosity.  I find if you use 'tail -10f' rather than 'tail 
> -10' it doesn't eat the swap...  Since the two are identical in pipe 
> context, that may just have to be the work around?
> 
> I'm pretty sure my systems are up to the most current patch level... But 
> maybe I missed one?
> 
> kyle.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Jan 17 15:16:25 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:32 EST