darcs

Issue 969 exponential merge w/ remove file / bunch of modifications

Title exponential merge w/ remove file / bunch of modifications
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, simonmar, simonpj, thorkilnaur, tommy
Assigned To
Topics Conflicts

Created on 2008-07-23.21:09:32 by simonpj, last changed 2009-10-23.23:35:39 by admin.

Files
File name Uploaded Type Edit Remove
unnamed simonpj, 2008-07-23.21:09:27 text/html
Messages
msg5238 (view) Author: simonpj Date: 2008-07-23.21:09:27
I am horribly depressed to report another Darcs failure.  Both Darcs 1.0.9 and Darcs 2.0 go into an infinite loop when pulling 18 patches from the GHC head repo.

My own repo is pristine: I don't have any local changes.  Ahem... except I removed utils/hsc2hs as per a message from Ian.  But that should not cause a loop should it?

Below is the dump from my screen.  I killed the process after it had consumed 100% of the CPU for five minutes.

What really worries me is that this stuff happens on a regular basis.  I just don't trust Darcs any more.

PS: I did a 'darcs revert -a' to put back the missing utils/hsc2hs directory.  Then 'darcs2 pull -av' went through just fine.  So this time I'm not stuck.  But going into an infinite loop because of a local change just isn't confidence building.

Simon

sh-2.04$ darcs2 pull -av
Identifying repository http://darcs.haskell.org/ghc format
Identifying repository http://darcs.haskell.org/ghc inventory
Reading inventory of repository http://darcs.haskell.org/ghc inventory
Reading inventory of repository c:/simonpj/darcs/HEAD-new-igloo inventory
Pulling from "http://darcs.haskell.org/ghc"...
This is the GHC darcs repository (HEAD branch)

For more information, visit the GHC developer wiki at
  http://hackage.haskell.org/trac/ghc
**********************
We have the following new (to them) patches:
They have the following patches to pull:
Sun Jul 20 23:06:22 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * haddock the stage2 compiler if HADDOCK_DOCS is YES
Mon Jul 21 10:52:56 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Fixes for haddock 0.8
Tue Jul 22 13:57:43 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Fix the stage3 build
Tue Jul 22 17:33:08 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Add replacements for the -optdep flags, and deprecate the old ones
Tue Jul 22 18:05:42 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Clean stage 3
Tue Jul 22 18:07:54 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * We need to clean the utils on "distclean", as well as "clean"
Tue Jul 22 21:36:46 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Sync hsc2hs's Main.hs with the Cabal repo
Wed Jul 23 00:55:50 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Warn about unrecognised pragmas; these often mean we've typoed
Mon Jul 14 15:50:40 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * add NetBSD to some of the #ifdefs (patch partly from 6.8 branch)
Tue Jul 15 11:11:19 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * update the text about header files and -#include
Tue Jul 15 14:03:16 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * non-threaded RTS: don't assume deadlock if there are signal handlers to run
Tue Jul 22 10:21:13 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * refactoring/tidyup: (not.is64BitInteger) -> is32BitInteger
Wed Jul 23 10:00:50 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * debug message tweaks
Wed Jul 23 11:43:22 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * fix bug in sparkPoolSize (affects debug output only)
Wed Jul 23 13:52:05 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * Undo fix for #2185: sparks really should be treated as roots
  Unless sparks are roots, strategies don't work at all: all the sparks
  get GC'd.  We need to think about this some more.
Wed Jul 23 01:12:02 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Tell Cabal where gcc is
Wed Jul 23 15:38:04 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Remove some redundancy in darcs-all
Wed Jul 23 16:50:21 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Use the upstream hsc2hs repo
Getting and merging the following patches:
Sun Jul 20 23:06:22 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * haddock the stage2 compiler if HADDOCK_DOCS is YES
Mon Jul 21 10:52:56 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Fixes for haddock 0.8
Tue Jul 22 13:57:43 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Fix the stage3 build
Tue Jul 22 17:33:08 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Add replacements for the -optdep flags, and deprecate the old ones
Tue Jul 22 18:05:42 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Clean stage 3
Tue Jul 22 18:07:54 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * We need to clean the utils on "distclean", as well as "clean"
Tue Jul 22 21:36:46 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Sync hsc2hs's Main.hs with the Cabal repo
Wed Jul 23 00:55:50 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Warn about unrecognised pragmas; these often mean we've typoed
Mon Jul 14 15:50:40 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * add NetBSD to some of the #ifdefs (patch partly from 6.8 branch)
Tue Jul 15 11:11:19 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * update the text about header files and -#include
Tue Jul 15 14:03:16 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * non-threaded RTS: don't assume deadlock if there are signal handlers to run
Tue Jul 22 10:21:13 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * refactoring/tidyup: (not.is64BitInteger) -> is32BitInteger
Wed Jul 23 10:00:50 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * debug message tweaks
Wed Jul 23 11:43:22 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * fix bug in sparkPoolSize (affects debug output only)
Wed Jul 23 13:52:05 GMT Daylight Time 2008  Simon Marlow <marlowsd@gmail.com>
  * Undo fix for #2185: sparks really should be treated as roots
  Unless sparks are roots, strategies don't work at all: all the sparks
  get GC'd.  We need to think about this some more.
Wed Jul 23 01:12:02 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Tell Cabal where gcc is
Wed Jul 23 15:38:04 GMT Daylight Time 2008  Ian Lynagh <igloo@earth.li>
  * Remove some redundancy in darcs-all
Merging them 6/18
Attachments
msg5239 (view) Author: igloo Date: 2008-07-23.22:13:36
The reason is that, prior to removing the utils/hsc2hs directory, I'd made a
number of patches to it, all of which conflicted with the "remove
utils/hsc2hs/foo" local change; i.e. this is another instance of the
exponential-merge problem.
msg5247 (view) Author: kowey Date: 2008-07-24.10:35:55
:-(

As Jason points out, darcs2 on a darcs 1 repository fixes a lot of crashing, but
it does not avoid the exponential merge problem.  It would be really helpful if
somebody could convert the GHC repo to the darcs 2 format and see if the same
scenario causes problems.  It would be a big relief if we could find for sure
that the darcs 2 format avoids the problem.

Would somebody please volunteer to do the conversion?

Also: we should create an artificial variant of this case (remove a file, pull a
bunch of modifications to that file) for our conflicts zoo (which we should add
to the darcs darcs repository).
msg5255 (view) Author: simonpj Date: 2008-07-24.22:10:40
But I had not recorded my local change => no conflict in the repo itself.  I didn't know that the exponential bug applies even to unrecorded changes.

Simon

| -----Original Message-----
| From: Ian Lynagh [mailto:bugs@darcs.net]
| Sent: 23 July 2008 23:14
| To: beschmi@cloaked.de; dagit@codersbase.com; igloo@earth.li;
| ptp@lysator.liu.se; Simon Marlow; Simon Peyton-Jones
| Subject: [issue969] Darcs infinite loop
|
|
| Ian Lynagh <igloo@earth.li> added the comment:
|
| The reason is that, prior to removing the utils/hsc2hs directory, I'd made a
| number of patches to it, all of which conflicted with the "remove
| utils/hsc2hs/foo" local change; i.e. this is another instance of the
| exponential-merge problem.
|
| __________________________________
| Darcs bug tracker <bugs@darcs.net>
| <http://bugs.darcs.net/issue969>
| __________________________________
msg5263 (view) Author: kowey Date: 2008-07-25.09:57:57
Some possible good news.

I did a test, first I pulled from the darcs.haskell.org ghc repo, up to the
(then) latest patch:
Thu Jul 24 16:50:01 BST 2008  Simon Marlow <marlowsd@gmail.com>
  * Don't prematurely link shared libraries against the RTS package

Then I did a darcs convert, and compared the following sequence of actions on
both the original and darcs-2 format repositories:
 (a) darcs unpull -p hsc -a
      [that's 24 patches]
 (b) rm -rf utils/hsc2hs
 (c) darcs pull -a

The original format repository does experience the exponential blow up (it gets
stuck on 18/24 and I gave up after twelve minutes), but the darcs-2 one pulls it
in just fine. 

So darcs is making progress, at least for cases like this.  If only we could do
something about the performance...
History
Date User Action Args
2008-07-23 21:09:32simonpjcreate
2008-07-23 21:17:48koweysetpriority: bug
status: unread -> duplicate
superseder: + Darcs infinite loop
nosy: tommy, beschmi, dagit, igloo, simonmar, simonpj
2008-07-23 22:13:39igloosetnosy: tommy, beschmi, dagit, igloo, simonmar, simonpj
messages: + msg5239
2008-07-24 10:29:41koweylinkissue968 superseder
2008-07-24 10:35:58koweysetstatus: duplicate -> waiting-for
nosy: + kowey
superseder: - Darcs infinite loop
messages: + msg5247
title: Darcs infinite loop -> exponential merge w/ remove file / bunch of modifications
2008-07-24 22:10:45simonpjsetnosy: tommy, beschmi, kowey, dagit, igloo, simonmar, simonpj
messages: + msg5255
title: exponential merge w/ remove file / bunch of modifications -> Darcs infinite loop
2008-07-24 22:48:50koweysetnosy: tommy, beschmi, kowey, dagit, igloo, simonmar, simonpj
title: Darcs infinite loop -> exponential merge w/ remove file / bunch of modifications
2008-07-25 09:57:59koweysetstatus: waiting-for -> resolved
nosy: tommy, beschmi, kowey, dagit, igloo, simonmar, simonpj
messages: + msg5263
2009-03-16 22:36:17koweysettopic: + Conflicts
nosy: + dmitry.kurochkin, simon, thorkilnaur
2009-08-06 21:09:53adminsetnosy: - beschmi
2009-08-11 00:19:18adminsetnosy: - dagit
2009-08-25 17:18:30adminsetnosy: + darcs-devel, - igloo
2009-08-25 17:42:15adminsetnosy: - simon
2009-08-27 14:16:06adminsetnosy: tommy, kowey, darcs-devel, simonmar, simonpj, thorkilnaur, dmitry.kurochkin
2009-10-23 22:37:13adminsetnosy: + marlowsd, - simonmar
2009-10-23 23:35:39adminsetnosy: + simonmar, - marlowsd