darcs

Issue 1068 annotate stack overflow

Title annotate stack overflow
Priority bug Status resolved
Milestone Resolved in 2.8.0
Superseder patch index optimisation (aka filecache)
View: 1566
Nosy List darcs-devel, dmitry.kurochkin, kowey, simonpj, thorkilnaur, twb
Assigned To beschmi
Topics Performance

Created on 2008-09-10.14:36:39 by simonpj, last changed 2011-07-05.09:59:28 by mornfall.

Messages
msg5975 (view) Author: simonpj Date: 2008-09-10.14:36:37
Should this happen?

bash$ darcs annotate compiler/basicTypes/DataCon.lhs
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize' to increase it.

8M is quite a big stack.

It worked with 100M (albeit very slowly).

Simon
msg5977 (view) Author: kowey Date: 2008-09-10.16:06:46
Simon: we should certainly avoid this happening if we can help it!  

In the meantime, you can use
  darcs changes -v --only-to-file compiler/basicTypes/DataCon.lhs
as a crude workaround.

Darcs people: I have reproduced this, including the +RTS -K100M workaround.

See also http://bugs.darcs.net/issue1017 for a stack overflow when doing
whatsnew on a large file.

I need a volunteer to boil this down into a minimal test case, if possible.  The
minimal test case may not actually be very practical for the darcs test suite,
because it may involve generating lots of patches to a single file.  Volunteer
should have a look at maybench (darcs get http://code.haskell.org/maybench )
because there is a darcs-benchmark tool which creates repositories automatically.
msg6485 (view) Author: beschmi Date: 2008-10-27.19:51:22
I'm working on optimizing annotate and changes, which should make both
faster and also fix this bug.

Benedikt
msg7804 (view) Author: twb Date: 2009-05-13.02:25:13
Hi Benedikt,

On Mon, Oct 27, 2008 at 09:51:22AM +0000, Benedikt Schmidt wrote:
> I'm working on optimizing annotate and changes, which should make
> both faster and also fix this bug.

Is this work now done?  Can we close this bug?
msg13369 (view) Author: simon Date: 2010-12-16.18:29:29
Update: no, this bug is still very much with us:

~/src/ghc$ time darcs annotate README
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.

real	4m49.721s
user	1m14.573s
sys	0m16.529s

This issue is marked "superseded by #1566", which looks as if it might 
be not far from landing. If that's not the case, an interim usability 
fix for this would be good - it's an easily encountered stack overflow 
that was reported two years ago and is still scaring new users away from 
darcs (heard from kmc on #haskell today). Is it feasible to guestimate 
the size of the annotate operation ahead of time and exit with a 
friendly warning instead of a run-time error ? If not, even printing a 
warning about this issue before attempting any annotate would cushion 
the blow.
msg13371 (view) Author: simon Date: 2010-12-16.19:26:52
Patch "annotate interim usability fix: print a warning about issue #1068" 
sent to patches@darcs.net.
msg14566 (view) Author: mornfall Date: 2011-07-05.09:59:27
Shouldn't happen with the new annotate anymore. Benedikt's improvements 
would still be useful, although not strictly necessary to fix this 
particular bug.
History
Date User Action Args
2008-09-10 14:36:39simonpjcreate
2008-09-10 16:06:50koweysetstatus: unread -> unknown
priority: bug
topic: + Performance
messages: + msg5977
title: Stack overflow -> annotate stack overflow
2008-09-10 16:06:59koweysetstatus: unknown -> needs-reproduction
2008-10-12 19:28:24thorkilnaurlinkissue1145 superseder
2008-10-27 19:51:24beschmisetstatus: needs-reproduction -> has-patch
nosy: + dmitry.kurochkin, simon, beschmi, thorkilnaur
messages: + msg6485
assignedto: beschmi
2009-05-13 02:25:16twbsetnosy: + twb
messages: + msg7804
2009-08-06 21:12:28adminsetnosy: - beschmi
2009-08-10 23:45:16adminsetnosy: - dagit
2009-08-25 17:32:47adminsetnosy: + darcs-devel, - simon
2009-08-26 13:47:41koweysetstatus: has-patch -> deferred
nosy: kowey, darcs-devel, simonpj, twb, thorkilnaur, dmitry.kurochkin
superseder: + patch index optimisation (aka filecache)
2009-08-27 14:33:07adminsetnosy: kowey, darcs-devel, simonpj, twb, thorkilnaur, dmitry.kurochkin
2010-12-16 18:29:30simonsetstatus: deferred -> unknown
messages: + msg13369
2010-12-16 19:26:52simonsetmessages: + msg13371
2011-07-05 09:59:28mornfallsetstatus: unknown -> resolved
messages: + msg14566
resolvedin: 2.8.0