zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] some zsh completion fail in some cases if more than 9 jobs
@ 2003-11-05 14:34 Oliver Kiddle
  2003-11-05 15:15 ` Felix Rosencrantz
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Kiddle @ 2003-11-05 14:34 UTC (permalink / raw)
  To: zsh-workers

Just realised that this was only sent to me and Peter.

------- Forwarded Message

>From tvignaud@mandrakesoft.com  Mon Nov  3 14:36:57 2003
To: Peter Stephenson <pws@csr.com>, Oliver Kiddle <opk@zsh.org>
Subject: [BUG] some zsh completion fail in some cases if more than 9 jobs
From: Thierry Vignaud <tvignaud@mandrakesoft.com>
Organization: MandrakeSoft
Date: Mon, 03 Nov 2003 13:28:59 +0000

if i have at least 10 background jobs, some completions (such as "cvs
diff" one) faill:
tv@vador mdk/gi/perl-install.cooker $ cvs diff 
_path_files:540: job table full or recursion limit exceeded


------- End of Forwarded Message


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

* Re: [BUG] some zsh completion fail in some cases if more than 9 jobs
  2003-11-05 14:34 [BUG] some zsh completion fail in some cases if more than 9 jobs Oliver Kiddle
@ 2003-11-05 15:15 ` Felix Rosencrantz
  2003-11-11 19:55   ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Rosencrantz @ 2003-11-05 15:15 UTC (permalink / raw)
  To: zsh-workers

> if i have at least 10 background jobs, some completions (such as "cvs
> diff" one) faill:
> tv@vador mdk/gi/perl-install.cooker $ cvs diff 
> _path_files:540: job table full or recursion limit exceeded

I mentioned the same problem last year, Bart responded in  zsh-workers/17641
saying: 

"Part of the problem is that the value of MAXJOBS was established when
each job table entry represented a real unix process.  Now that we make
job table entries for internal shell control structures, we need more
table space.  It still shouldn't need to grow without bound (though I
believe we have other anti-infinite recursion mechanisms in place now)."

I reported that I would double the value of MAXJOBS in my builds, which helped
me.   Though it might be nice to have a more dynamic solution.

-FR

ps: archive of Bart's message http://www.zsh.org/mla/workers/2002/msg01108.html

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


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

* Re: [BUG] some zsh completion fail in some cases if more than 9 jobs
  2003-11-05 15:15 ` Felix Rosencrantz
@ 2003-11-11 19:55   ` Peter Stephenson
  2003-11-12 14:02     ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2003-11-11 19:55 UTC (permalink / raw)
  To: zsh-workers

Felix Rosencrantz wrote:
> I reported that I would double the value of MAXJOBS in my builds,
> which helped me.   Though it might be nice to have a more dynamic solution.

I've been looking at this.  The big problem is the possibility that
something in the shell is holding onto a pointer to a job struct when
you reallocate the job table.  I can get around this when freeing up by
relegating this to the top level.  However, when we need to expand the
table we are deep down inside the shell before we have any inkling that
this is nececessary.

It looks like we might get a way with it, since the only point where we
inititialiase a new job is at the top of execpline(), where it's
benign.  However, I'm not at all sure we can guarantee the state of
functions lower down the call stack (where the current function is at the
top) at that point.  This might take a lot of investigation.  Doing it
comprehensively would be hell, but maybe putting in debug tests will be
sufficient.

Doubling MAXJOB to 100 is much easier.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

* Re: [BUG] some zsh completion fail in some cases if more than 9 jobs
  2003-11-11 19:55   ` Peter Stephenson
@ 2003-11-12 14:02     ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2003-11-12 14:02 UTC (permalink / raw)
  Cc: zsh-workers

Peter Stephenson wrote:
> Felix Rosencrantz wrote:
> > I reported that I would double the value of MAXJOBS in my builds,
> > which helped me.   Though it might be nice to have a more dynamic solution.
> 
> I've been looking at this.  The big problem is the possibility that
> something in the shell is holding onto a pointer to a job struct when
> you reallocate the job table.  I can get around this when freeing up by
> relegating this to the top level.  However, when we need to expand the
> table we are deep down inside the shell before we have any inkling that
> this is nececessary.
> 
> It looks like we might get a way with it, since the only point where we
> inititialiase a new job is at the top of execpline(), where it's
> benign.  However, I'm not at all sure we can guarantee the state of
> functions lower down the call stack (where the current function is at the
> top) at that point.  This might take a lot of investigation.

I may have been too pessimistic.  The execpline() call is well-protected
anyway (blocking SIGCLD), because in the past we could create jobs
asynchronously (when traps were run directly from the signal handler).
Also, the only extended places where a struct job is used for an
extended period (we usually use the index into the table, which doesn't
change) are in jobs.c and a chunk lower down in execpline(), which is
essentially an extension to the job handling code to be smarter about
signals for jobs running entirely within the shell.  All these are low
level; they don't spawn new jobs.  So maybe it will work.  I'm trying it
locally before posting anything.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

end of thread, other threads:[~2003-11-12 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-05 14:34 [BUG] some zsh completion fail in some cases if more than 9 jobs Oliver Kiddle
2003-11-05 15:15 ` Felix Rosencrantz
2003-11-11 19:55   ` Peter Stephenson
2003-11-12 14:02     ` Peter Stephenson

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).