On Sun, Oct 09, 2005 at 07:37:23PM -0400, Justin Pryzby wrote: > On Sun, Oct 09, 2005 at 04:15:22PM -0700, John Darrah wrote: > > The following brace expansion: echo > > {0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9} > > > > Fails with the following error: bash: xmalloc: > > ../bash/make_cmd.c:167: cannot allocate 8 bytes (0 bytes allocated) > > > > And then the shell dies (crash). > Do you see high memory usage beforehand? (I don't know if linux > malloc/realloc EVER fail initially, but they can "fail" after the > fact, with OOM killer).
Shouldn't I see the result of an OOM using dmesg or does the kernel just kill the process silently?? I answered my own question using pdksh on a huge brace expansion. yes OOM is reported in a dmesg... so in conclusion bash is failing before memory exhaustion. I have 2G of swap and it takes a while to get there with pdksh, but with bash it fails just after a few seconds. > > > I'm quite sure that on older versions of the shell this worked OK. > Do you know when or what versions? No... but I'm sure it was the 2.x shell i'm refering to because it's been a while since i've used brace expansion to generate large lists. > > I don't know if this is a bug; I was able to duplicate the error, but > with high memory usage. If bash's implementation requires high memory > usage, then its not a "bug" (though a wishlist to not require such > large ammounts of memory would certainly be legitimate). I still think there is something funny going on here. > > -- > Clear skies, > Justin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]