zsh-workers
 help / color / mirror / code / Atom feed
* zsh exhausting swap
@ 1999-09-08 15:25 Brad Forschinger
  1999-09-08 17:19 ` Mike Fletcher
  0 siblings, 1 reply; 4+ messages in thread
From: Brad Forschinger @ 1999-09-08 15:25 UTC (permalink / raw)
  To: zsh-workers


sanguine:~% uname -srm 
FreeBSD 3.2-STABLE i386
sanguine:~% echo ${ZSH_VERSION}
3.0.5

hit alt-' about ten times i guess, keep going until output stops and swapping
starts :-)

34698 bradf    -18   0   139M 27740K swread   0:11  5.91%  5.91% zsh
and another one that i did to confirm
34757 bradf    -18   0   265M 33716K swread   0:17  9.52%  9.52% zsh

this from someone that i asked to do the same:
<Dom2> Sep  8 16:17:30 voodoo /kernel: pid 423 (zsh), uid 104, was killed: out of swap space


-- 
Brad Forschinger <bradf@mega.net.au>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh exhausting swap
  1999-09-08 15:25 zsh exhausting swap Brad Forschinger
@ 1999-09-08 17:19 ` Mike Fletcher
  1999-09-09 17:00   ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Fletcher @ 1999-09-08 17:19 UTC (permalink / raw)
  To: Brad Forschinger; +Cc: zsh-workers

>>>>> "Brad" == Brad Forschinger <bradf@mega.net.au> writes:

    Brad> sanguine:~% uname -srm FreeBSD 3.2-STABLE i386 sanguine:~%
    Brad> echo ${ZSH_VERSION} 3.0.5

    Brad> hit alt-' about ten times i guess, keep going until output
    Brad> stops and swapping starts :-)

        Similar thing with:
Linux 2.2.11 i686
lemur:~ 254> echo $ZSH_VERSION 
3.1.6-pws-2

fletch   18203  1.3 27.6 73864 53248 pts/1   T    13:14   0:01 [zsh]

        Running under gdb shows:

Program received signal SIGSEGV, Segmentation fault.
0x400938a7 in memcpy (dstpp=0x0, srcpp=0x43cb1018, len=21523344)
    at ../sysdeps/generic/memcpy.c:55
../sysdeps/generic/memcpy.c:55: No such file or directory.
(gdb) where
#0  0x400938a7 in memcpy (dstpp=0x0, srcpp=0x43cb1018, len=21523344)
    at ../sysdeps/generic/memcpy.c:55
#1  0x4013f7cb in quoteline ()
#2  0x4013d94c in execzlefunc ()
#3  0x4013d61c in zleread ()
#4  0x8068bdd in ingetc ()
#5  0x8068b25 in ingetc ()
#6  0x80642a9 in iaddtoline ()
#7  0x806c247 in gettok ()
#8  0x806bd5e in yylex ()
#9  0x807824c in parse_event ()
#10 0x8067241 in loop ()
#11 0x8050bba in main ()
#12 0x4004ccb3 in __libc_start_main (main=0x8050a10 <main>, argc=1,
    argv=0xbffff5f4, init=0x8050004 <_init>, fini=0x808a6ec <_fini>,
    rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffff5ec)
    at ../sysdeps/generic/libc-start.c:78
(gdb) bt


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch@phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
678 443-6239(w)       |  scary questions." -- Jules                =(___)=
                      |                                               U


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh exhausting swap
  1999-09-08 17:19 ` Mike Fletcher
@ 1999-09-09 17:00   ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1999-09-09 17:00 UTC (permalink / raw)
  To: Brad Forschinger, Mike Fletcher; +Cc: zsh-workers

On Sep 8,  1:19pm, Mike Fletcher wrote:
} Subject: Re: zsh exhausting swap
}
} >>>>> "Brad" == Brad Forschinger <bradf@mega.net.au> writes:
} 
}     Brad> hit alt-' about ten times i guess, keep going until output
}     Brad> stops and swapping starts :-)
} 
} Program received signal SIGSEGV, Segmentation fault.
} #0  0x400938a7 in memcpy (dstpp=0x0, srcpp=0x43cb1018, len=21523344)
}     at ../sysdeps/generic/memcpy.c:55
} #1  0x4013f7cb in quoteline ()

I think this is going to have to go down as user silliness.

Why, in practice, would you ever need to hold down alt-' ?  I don't think
I've ever pressed it more than twice on the same command line.

What's happening is that, at each press of alt-', the line editor must
approximately triple the size of the internal editor buffer in order to
accommodate the new quoting characters (mostly closing and reopening
some existing quote pairs plus backslashing the characters thereby left
outside).  As you can imagine, this consumes rather a lot of memory in
rather a short time; the buffer is 59000 times larger by the end of the
tenth keypress.

The crash eventually occurs when a buffer as large as zsh needs cannot
be allocated.

However, I don't understand what you expect zsh to do differently.

(Also, the mailing list address is now zsh-workers@sunsite.auc.dk, not
@math.gatech.edu.  It is unknown for how long gatech will continue to
forward the messages.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh exhausting swap
@ 1999-09-13 10:49 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-09-13 10:49 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> The crash eventually occurs when a buffer as large as zsh needs cannot
> be allocated.
> 
> However, I don't understand what you expect zsh to do differently.

One problem is that sizeline() doens't test if it gets a NULL back
from `realloc()'.
The problem is that we would have to add error-catching code to all
places where this is used...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-09-13 10:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-08 15:25 zsh exhausting swap Brad Forschinger
1999-09-08 17:19 ` Mike Fletcher
1999-09-09 17:00   ` Bart Schaefer
1999-09-13 10:49 Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).