[colug-432] my shell is better^H^H^H^H^H^Hdifferent than yours: NSFW (but not for the reason you might think)
Jon Miller
jonebird at gmail.com
Tue Dec 6 12:23:31 EST 2011
I'm not sure the shell actually is restricting you from doing this
"dumb" thing. Let's strace it! :-)
strace -vall -f bash -c 'read line < /dev/zero' >
bash_read-alotofzeros.strace 2>&1
While that is running, I'm watching "vmstat 5" and seeing my free
memory being depleted. If I see my system start to swap, I'll hit
Ctrl-c on the strace, but I'd really like it to complete much like the
rest of everyone's tests.
# BTW, another interesting thing to do, while waiting for your box to
crash, is to identify the pid for bash and run:
watch -d 'pmap -x <pid>'
Still waiting for it... vmstat tells me that it started freeing up
memory from it's buffers to feed my hungry bash shell. Now that it's
starting to level off at a low value, my cache too is being depleted.
(BTW, whenever I'm asked to watch a system during a performance test
(pt), I like to have sar enabled and watch vmstat during the run.)
The saga continues and since the workstation I'm doing this on isn't
mine, I'm going to feel bad if I end up crashing the system.
Considering I'm now actively swapping at each 5sec interval, I'm going
to cancel this experiment. My bash shell had over a gig in RSS before
pulling the plug and it didn't look like there were signs of stopping.
Had I left it going I suspect the kernel would eventually invoke the
dreaded out-of-memory (OOM) killer. Perhaps someone else can try the
strace where their bash shell was "saving" them?
-- Jon Miller
P.s. The workstation is running FC14, kernel is
2.6.35.6-45.fc14.x86_64 and bash is 4.1.7(1)-release.
On Tue, Dec 6, 2011 at 11:29 AM, Chris Anderson <canderson at foxtwo.net> wrote:
> What exactly is wrong with just using Ctr-C to cancel this? Seems to work
> for me. I don't like the idea of a shell restricting my options to keep me
> from doing something dumb. That's what my brain is there for...
>
> I guess it is a matter of opinion, but I like Nanny shells about as much as
> I like Nanny states...
>
> On Tue, Dec 6, 2011 at 8:39 AM, Jeff Frontz <jeff.frontz at gmail.com> wrote:
>>
>> On the AST (AT&T Software Technology) user's mailing list, Glen Fowler
>> recently posted this snippet:
>>
>> > ... the seemingly good idea of "no limits" is not always a good idea
>> > proof of concept: try this with bash on a system that you can reboot
>> > with a physical button:
>> >
>> > bash -c 'read line < /dev/zero'
>> >
>>
>> The context was why doesn't ksh let you read an arbitrarily long line of
>> text with the built-in "read" command (and why that limitation is on
>> purpose, but unfortunately undocumented).
>>
>>
>> Jeff
>>
>>
>>
>>
>>
>> Spam detection software, running on the system "lists.colug.net", has
>> identified this incoming email as possible spam. The original message
>> has been attached to this so you can view it (if it isn't spam) or label
>> similar future email. If you have any questions, see
>> the administrator of that system for details.
>>
>> Content preview: On the AST (AT&T Software Technology) user's mailing
>> list,
>>
>> Glen Fowler recently posted this snippet: > ... the seemingly good idea
>> of
>> "no limits" is not always a good idea > proof of concept: try this with
>> bash
>> on a system that you can reboot with a physical button: > > bash -c
>> 'read
>> line < /dev/zero' > [...]
>>
>> Content analysis details: (5.0 points, 5.0 required)
>>
>> pts rule name description
>> ---- ----------------------
>> --------------------------------------------------
>> 3.8 BAYES_99 BODY: Bayes spam probability is 99 to 100%
>> [score: 1.0000]
>> 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
>> provider
>> (vdgr3dok[at]hotmail.com)
>> (jeff.frontz[at]gmail.com)
>> 1.2 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t
>> 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
>>
>>
>>
>>
>> _______________________________________________
>> colug-432 mailing list
>> colug-432 at colug.net
>> http://lists.colug.net/mailman/listinfo/colug-432
>>
>> Spam detection software, running on the system "lists.colug.net", has
>> identified this incoming email as possible spam. The original message
>> has been attached to this so you can view it (if it isn't spam) or label
>> similar future email. If you have any questions, see
>> the administrator of that system for details.
>>
>> Content preview: On the AST (AT&T Software Technology) user's mailing
>> list,
>>
>> Glen Fowler recently posted this snippet: > ... the seemingly good idea
>> of
>> "no limits" is not always a good idea > proof of concept: try this with
>> bash
>> on a system that you can reboot with a physical button: > > bash -c
>> 'read
>> line < /dev/zero' > [...]
>>
>> Content analysis details: (5.0 points, 5.0 required)
>>
>> pts rule name description
>> ---- ----------------------
>> --------------------------------------------------
>> 3.8 BAYES_99 BODY: Bayes spam probability is 99 to 100%
>> [score: 1.0000]
>> 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
>> provider
>> (sefrie-bbs[at]yahoo.com)
>> (jeff.frontz[at]gmail.com)
>> (jeff.frontz[at]gmail.com)
>> 1.2 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t
>>
>>
>>
>
>
> Spam detection software, running on the system "lists.colug.net", has
> identified this incoming email as possible spam. The original message
> has been attached to this so you can view it (if it isn't spam) or label
> similar future email. If you have any questions, see
> the administrator of that system for details.
>
> Content preview: What exactly is wrong with just using Ctr-C to cancel
> this?
> Seems to work for me. I don't like the idea of a shell restricting my
> options
> to keep me from doing something dumb. That's what my brain is there for...
> [...]
>
> Content analysis details: (5.0 points, 5.0 required)
>
> pts rule name description
> ---- ----------------------
> --------------------------------------------------
> 3.8 BAYES_99 BODY: Bayes spam probability is 99 to 100%
> [score: 0.9999]
> 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
> provider
> (vdgr3dok[at]hotmail.com)
> (jeff.frontz[at]gmail.com)
> (gymequipment[at]ymail.com)
> (fltsimbuff[at]gmail.com)
> 0.0 HTML_MESSAGE BODY: HTML included in message
> 1.2 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t
> 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
>
>
>
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432
>
> Spam detection software, running on the system "lists.colug.net", has
> identified this incoming email as possible spam. The original message
> has been attached to this so you can view it (if it isn't spam) or label
> similar future email. If you have any questions, see
> the administrator of that system for details.
>
> Content preview: What exactly is wrong with just using Ctr-C to cancel
> this?
> Seems to work for me. I don't like the idea of a shell restricting my
> options
> to keep me from doing something dumb. That's what my brain is there for...
> [...]
>
> Content analysis details: (5.0 points, 5.0 required)
>
> pts rule name description
> ---- ----------------------
> --------------------------------------------------
> 3.8 BAYES_99 BODY: Bayes spam probability is 99 to 100%
> [score: 0.9981]
> 0.0 HTML_MESSAGE BODY: HTML included in message
> 1.2 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t
>
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SpamAssassinReport.txt
Url: http://lists.colug.net/pipermail/colug-432/attachments/20111206/72de7cf0/attachment.txt
More information about the colug-432
mailing list