Camelia, the Perl 6 bug

IRC log for #darcs, 2010-06-14

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:03 zooko I built darcs myself and it has the wrong --version
01:04 zooko it says 2.4.4, but there are many patches since that tag
01:20 zooko How can I get it to have an --exact-version and to give a correct number for "--version"?
01:33 zooko Hm. why is it saying this http://codepad.org/COdhMTmW
01:36 zooko Wait, what? Did it just scp five different patches in a row onto the same local file?
01:36 zooko http://codepad.org/1pnVe4Bi
01:54 sshc_ joined #darcs
01:59 sshc joined #darcs
03:28 abuiles joined #darcs
03:30 abuiles zooko, seems that it's this bug http://bugs.darcs.net/issue1854  which is affecting you too.
03:39 abuiles joined #darcs
04:57 abuiles left #darcs
05:49 lelit joined #darcs
05:56 ManateeLazyCat joined #darcs
06:37 intripoon joined #darcs
06:55 tux_rocker joined #darcs
06:55 tux_rocker good morning
06:55 tux_rocker does anyone know where Trent is hiding?
06:55 tux_rocker perhaps he's staying in bed for the southern hemisphere winter...
07:02 darcscommitbot joined #darcs
07:02 ManateeLazyCat joined #darcs
07:03 darcswikibot joined #darcs
07:32 sxs joined #darcs
07:32 kpreid_ joined #darcs
08:37 gh_ joined #darcs
08:45 skade joined #darcs
08:52 kowey joined #darcs
08:52 kowey morning
08:58 skade joined #darcs
10:29 Korusef joined #darcs
11:11 skade joined #darcs
11:45 dcoutts kowey: do you know if the mmap problem was due to using a later version of mmap that was borked, or due simply to using a different version from that used by hashed-storage ?
11:45 dcoutts i.e. is it that you want to always use the same version as hashed-storage, or that you simply want to delegate the task of picking a non-borked mmap version to hashed-storage ?
11:49 kowey I think it was due to using a different version than that used by hashed-storage
11:49 kowey but we'd have to check with Gracjan to make sure there was any problem with the mmap 0.5 that was out at the time
11:50 kowey I think mornfall would remember if he's around
11:50 kowey dcoutts is referring to http://bugs.darcs.net/issue1753 (in which darcs was using mmap 0.5 and hashed-storage was using mmap 0.4)
11:51 kowey also note that HEAD darcs is now using *a* version of mmap-0.5, as is hashed-storage 0.5
11:52 kowey also ever since, we have not constrained our mmap version to be higher than 0.5 (so no eg. 0.5.4), which I take as circumstantial evidence to this just being about the mismatch
11:54 kowey (ok, sorry to go around in circles, dcoutts, but I think this comment from mornfall answers your question: "If cabal happily builds darcs with two different mmap versions linked in, that's a cabal bug.")
11:54 kowey so at the time at least, we also believed it was about mismatches
11:54 dcoutts http://hackage.haskell.org/tra​c/hackage/ticket/700#comment:3
11:55 dcoutts kowey: see, that's not something cabal can always guarantee
11:56 dcoutts kowey: there are plenty of other users who consider it a cabal but that it does not typically allow building with multiple different versions of dependencies
11:56 dcoutts kowey: it happens currently to guarantee it for users of `cabal install`, but using other command you can work around that restriction and end up with multiple versions (though with a warning)
11:57 dcoutts details in the comment to the ticket above
11:57 kowey "I don't care if foo wants parsec 2, just because I use foo doesn't mean I shouldn't be able to use parsec 3"
11:57 dcoutts kowey: exactly
11:57 dcoutts and in future we intend to relax the restriction specifically to allow examples like parsec 2 vs 4
11:58 dcoutts erm vs 3
11:58 dcoutts by indicating "private" dependencies
11:58 dcoutts ones where no types are exported
11:58 dcoutts or rather re-exported
11:58 dcoutts kowey: because we're only thinking of the problem of compile failure due to type mismatch
11:59 dcoutts kowey: we've never considered that using multiple versions of a lib could cause other kinds of runtime failure
11:59 dcoutts kowey: which is why I'm interested in the details of what is happening with mmap in darcs vs hashed-storage
11:59 kowey so one thing which would be useful is some kind of minimal example without darcs, perhaps?
12:00 kowey tester uses hashed-storage and mmap
12:00 dcoutts do people understand what the problem actually is?
12:00 dcoutts or is it just noted that it goes away when using the same mmap version
12:00 kowey I think we only understand it at the symptomatic level (although it's quite likely that mornfall actually does have an insight)
12:01 kowey (so no, I don't think so)
12:02 Igloo It's a change in C code in the package, isn't it?
12:03 dcoutts ah, do the C code symbols clash?
12:03 ManateeLazyCat joined #darcs
12:03 dcoutts ah that'll be it
12:04 dcoutts kowey: yes, the problem will be that the C code clashes
12:04 dcoutts it's possible to link multiple versions of a Haskell package into one program
12:04 dcoutts however C code in those packages usually does not use versioned names
12:05 dcoutts and the system linker does not mind
12:05 dcoutts kowey: the reason cabal lets you link multiple versions at all is because it's safe for ghc for Haskell code
12:05 kowey so the crash here is the mmap-0.5 (or mmap-0.4) Haskell code expecting the mmap C code to behave in the mmap 0.5 way
12:06 kowey (or vice-versa)
12:06 dcoutts but special care needs to be taken with C code linked into Haskell packages
12:06 dcoutts kowey: exactly
12:08 dcoutts http://hackage.haskell.org/trac/ghc/ticket/2979
12:08 dcoutts kowey: indirectly mentions the problem of versioned symbols
12:08 Igloo ISTR the amount of C code is tiny, so could easily be Haskellified
12:09 dcoutts right, two solutions, one is to make the C function name versioned (or at least the linker name)
12:09 dcoutts the other is to eliminate the C code
12:10 dcoutts and the workaround is to avoid linking multiple versions of the mmap package
12:12 dcoutts another solution might be to play with symbol visibility
12:16 ManateeLazyCat left #darcs
12:23 ManateeLazyCat joined #darcs
12:23 kowey on a more general flufflier note, this could be a nice example of "it works" being a bug (depending on how you look at things)
12:28 kowey and also it seems like eliminating the C code could be nice in mmap's big picture, but I imagine that in the all-of-hackage big picture, we'd want C function names to be versionified in the long run?
12:33 dcoutts http://hackage.haskell.org/tra​c/hackage/ticket/700#comment:4
12:33 dcoutts http://hackage.haskell.org/trac/hackage/ticket/701
12:37 mornfall dcoutts: The problem is that Cabal will link two mmap versions even if *not asked to*.
12:38 dcoutts mornfall: "cabal install" does not do that
12:38 dcoutts mornfall: but "cabal configure" or "runghc Setup configure" might, with a warning.
12:39 kowey (!) that might explain why almost nobody was complaining about it (one of the mysteries on that ticket)
12:39 dcoutts mornfall: and we do not consider it a bug to link two versions of a package
12:39 mornfall dcoutts: My experience is that building a package from a dirty source tree will look for packages that did not even exist at configure time...
12:39 kowey if most people just do "cabal install" and the handful of people that ran into trouble did the grab tarball, cabal configure etc route
12:39 dcoutts mornfall: we consider it a bug if compiling two versions of a package causes a compile failure (due to clashing types)
12:40 dcoutts mornfall: running cabal build will not check that the dependent packages still exist
12:40 dcoutts mornfall: but I don't think that's related to this problem
12:41 mornfall Well, my point is that Cabal will happily throw in random packages at different occasions, so why not at this one...
12:42 dcoutts mornfall: I don't follow
12:42 dcoutts I don't know what you mean about it "throwing in random packages"
12:43 mornfall Well, try this: A depends on B, get B-0.1, configure and build A, then get B-0.2 and remove B-0.1, *reconfigure* A and rebuild -- it will complain about missing B-0.1.
12:43 mornfall If this also happens to be included in the link command, you have the mmap situation right away.
12:44 dcoutts mornfall: ah, that's a ghc --make bug, I think it may be fixed in 6.12
12:44 mornfall Hm. I am running 6.12, so probably not.
12:44 dcoutts ok
12:44 dcoutts mornfall: the existing .hi files know they link to specific package versions
12:44 mornfall But, could that mean that the old package gets linked into something that already requires a newer version?
12:45 dcoutts if --make does not rebuild them then at link time they will request the other package version
12:45 mornfall I.e. h-s wants mmap 0.5, but 0.4 gets linked in as well, since not all .hi files got rebuilt?
12:46 dcoutts mornfall: if that's what ghc --make is currently doing, then yes I guess that is possible
12:46 mornfall So there's at least one source of mislinked darcs executables, then. There may be others, but I think this plausibly could lead to bogus darcs.
12:47 mornfall And it certainly is a bug (be it GHC or Cabal).
12:47 dcoutts mornfall: if you can reproduce this please file it as a ghc and/or cabal ticket
12:47 dcoutts old .hi files referencing old packages would certainly be bad
12:48 mornfall Have to run. See you... (Eric, if you still want to look into this, investigating the outlined would be certainly helpful...)
12:53 kowey create two trivial packages A and B which depend on each other and try to demonstrate a B-0.1 function being used even though you've rebuilt/configured to use B-0.2?
12:53 kowey s/which depend on each other/where A depends on B/
12:59 gbeshers joined #darcs
13:32 zooko joined #darcs
14:07 ManateeLazyCat left #darcs
14:14 zooko joined #darcs
14:23 precious joined #darcs
14:23 precious left #darcs
14:49 mornfall kowey: Please, coerce Adolfo into fixing win32, or something. :) It's still failing on his test.
14:49 * mornfall goes home.
14:54 kowey he's still looking into it
14:54 kowey it did come up last night, though and it's on the agenda for this week
14:57 ManateeLazyCat joined #darcs
15:18 jmcarthur joined #darcs
15:48 abuiles joined #darcs
15:57 zooko joined #darcs
15:58 lelit hey zooko!
16:10 bonobo joined #darcs
16:24 mornfall kowey: Well, when (relevant bits of) patch273 get merged, this will become an alpha blocker.
16:26 abuiles hi mornfall
16:27 abuiles mornfall, which is the configuration of the machine in which the test is failing ? It passed in my XP machine, I'm installing vista for checking that out.
16:35 kowey abuiles: one idea I just had
16:35 kowey maybe this is specific to the buildbot somehow
16:36 kowey abuiles: maybe if you set up a buildslave http://wiki.darcs.net/Development/BuildBot
16:36 abuiles is it possible ?
16:36 kowey on your XP box, you may be able to reproduce it successfully
16:37 kowey another thing is that if you look into Darcs.Repository.Prefs, you can see that globalPrefsDir does three things
16:39 kowey (1) looks for DARCS_TESTING_PREFS_DIR, (2) looks for an appUserDataDirectory [is that $HOME when on Unix?]
16:40 gh_ joined #darcs
16:43 abuiles yeah, the home of the current user.
16:43 abuiles on Unix
16:47 kowey another observation is that Distribution.ShellHarness sets DARCS_TESTING_PREFS_DIR
16:49 kowey another thing to test is what getAppUserDataDirectory does wrt slashes
16:49 abuiles I just noticed that  getAppUserDataDirectory "darcs" is not the same as $HOME/.darcs in windows.
16:51 kowey well, keep in mind that in testing mode $HOME is /c/buildbot/darcs/6.12.1 Vista/build/tests-darcs-2.dir/ which is already weird
16:53 kowey a good debugging step may be to putStrLn the global cache dir under Windows
16:53 kowey both manually and under cabal test (you could write it to a special file)
16:55 abuiles ok, I will install the build both, and I'll let you know how it goes with that.
17:04 mornfall I don't think buildbot should influence things much.
17:05 mornfall You can see the complete environment it's using in the stdio.
17:06 mornfall dropLocalCache seems to be quite simplistic, too
17:11 mornfall E.g. why not drop all Cache Directory entries?
17:11 abuiles don't we need the other ones ?
17:12 abuiles do you mean,  if I have other cache directory, drop it as well  ?
17:13 mornfall Well, what is the definition of "global cache"?
17:13 mornfall Any source that is not a repo, IMHO, qualifies as one.
17:14 kowey that's a good point
17:14 mornfall These should all be configurable in ~/.darcs/sources.
17:14 kowey and it simplifies your code too
17:16 abuiles I was thinking that I wouldn't know which where the global caches, but I just wasn't thinking about ~/.darcs/sources
17:16 abuiles but Would I want all my repos to check in all the sources in ~/.darcs/sources ?
17:19 mornfall Well, that's the idea behind ~/.darcs/sources.
17:22 abuiles that's right.. brb I'm going for lunch
17:24 mornfall kowey: Hm. Could I abuse (delegate) you to chase Alexey a bit? If you do so, please keep me CCd.
17:24 mornfall kowey: About the blog etc.
17:24 mornfall kowey: And about being more ... visible.
17:24 mornfall You know I suck at this myself...
17:25 kowey OK
17:25 mornfall I can trade some code mentoring with Adolfo for a bit of organisational mentoring, maybe?
17:27 kowey I'll have to think about it
17:27 kowey I'm probably more useful in organisational terms than in code terms (consider all the stuff I miss during review)
17:28 kowey so it'd make sense on that level, but it also depends on how far you want to take this (and how our two students feel)
17:28 mornfall Well, not too far, presumably.
17:29 kowey OK, for now I'll keep this on the level of just chasing a bit
17:30 mornfall (Of course, I'm more efficient on the code level than on org, so the more I trade, the more productive I am going to be. But I don't want to hide from my responsibilities either...)
17:31 kowey OK, well I think the general deal with my role in Darcs quite clear by now :-)
17:32 kowey ... in the sense that I try my best to deliver all the services the rest of you need to get on with the hacking
17:32 kowey so we can dial this up or down as you see fit (and as my time allows)
17:39 kpreid_ joined #darcs
17:46 mornfall Well, I still need to more than double my number of patches to attack your position in show authors... : - P
17:48 kowey just start finding things to camel case; that's what I do
17:50 mornfall So I think a Cache Directory -based filter will fix that win32 issue (hopefully). From there, we are just 2 patches away from alpha.
17:50 mornfall We really should get it out before friday, so we can have another before freeze.
17:51 mornfall Also, I was wondering if it's not too confusing to use darcs-beta as a package name for the alpha.
17:51 Igloo mornfall: What does the C finalizer in mmap do?
17:51 mornfall Igloo: Unmap the memory?
17:51 Igloo Why does that need to be a C finalizer?
17:52 mornfall Legend has it, that C finalizers are called much more eagerly than Haskell ones.
17:52 Igloo I don't think that's true
17:52 Igloo They are guaranteed to be called, but that only means they get run at exit if they haven't already run
17:53 Igloo And if you're exiting, then unmapping the memory presumably isn't important
17:55 mornfall Wed Dec 10 15:05:10 GMT 2008  Ivan Tomac <tomac@pacific.net.au>
17:55 mornfall * FIX #1364: added support for C finalizers that run as soon as the value is no longer reachable.
17:58 mornfall It's using weak pointers, so presumably it works as advertised, and is therefore desirable for mmap.
18:01 abuiles kowey, mornfall I'm back, and I'm okay with the trading. Also,  I will implement the Cache Directory filter, but I'm just thinking how should the test case for this one looks like now ? grep  for the word cache: ?
18:02 Igloo OK, so I guess it's true that Haskell finalizers do have to then actually be scheduled
18:06 ManateeLazyCat joined #darcs
18:09 Gwern-away joined #darcs
18:23 skade joined #darcs
18:28 abuiles mornfall, do you know if are the readonly caches also consider to be declared  just  in ~/.darcs/sources ? They are directories too..
19:44 arjanb joined #darcs
21:11 abuiles joined #darcs
21:22 Igloo joined #darcs
21:35 ManateeLazyCat left #darcs
21:56 zooko joined #darcs
22:09 mornfall abuiles: Yes, I think read-only or read-write doesn't really matter.
22:11 abuiles mornfall,  thanks , I will send the patch and the amend for the test issue, in a couple of minutes.
22:13 mornfall Don't amend patches that are already on the mainline, though.
22:13 mornfall Just record one on top.
22:14 mornfall The test can do both things, btw. -- check what it currently does *and* check for any cache: entries.
22:16 abuiles and "readonly:" too
22:26 mornfall For now, that all amounts to the same thing, given there's just one cache in that test.
22:49 mornfall --> bed. Goodnight.
22:53 abuiles Goodnight
23:40 zooko joined #darcs
23:51 zooko joined #darcs

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary