/srv/irclogs.ubuntu.com/2011/10/02/#bzr.txt

=== yofel_ is now known as yofel
wgzright, I should really go to bed.00:22
AuroraBorealisnight =)00:22
AuroraBorealisi'll be on00:22
wgzI'll stay logged in here, say how far you get00:23
AuroraBorealiskk!00:24
AuroraBorealiswgz, I finally got the sdk installed and created the vcvarsamd64.bat file, but its still giving me ValueError: [path] (which i guess means it failed to call vcvars)02:19
AuroraBorealisi guess i'll talk to you about it when you are up =P02:19
=== AuroraBorealis is now known as aurora|away
=== aurora|away is now known as AuroraBorealis
AuroraBorealisi seriously hate compiling things haha06:21
wgzAuroraBorealis: I think you need to read "Trick distutils" onwards in <http://mattptr.net/2010/07/28/building-python-extensions-in-a-modern-windows-environment/>10:12
AuroraBorealisi did that10:13
AuroraBorealisstill doesn't work10:13
AuroraBorealisi might of put that line in msvc9compiler in the wrong place but i dont think i did10:13
wgzokay, I'll take another look at your traceback and see if I can work out what's up10:14
wgzhttp://bugs.python.org/issue751110:15
wgz"You can work around it10:15
wgzby finding and executing vcvars32.bat or vcvars64.bat before running10:15
wgzsetup.py10:15
wgz"10:15
AuroraBorealisyep thats the exact error i'm getting10:15
AuroraBorealishttp://paste.ubuntu.com/700959/10:16
wgzdid you get the 64-bit components installed correctly as well?10:18
wgz<http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L> has some step-by-step it might be worth reviewing10:18
AuroraBorealisit says to check an option that was checked by default10:22
AuroraBorealisbut i don't have 'cl.exe'10:22
AuroraBorealiscause the folder wasn't created there10:22
AuroraBorealis(that was the folder i created in the 'trick distutils' blog post10:22
wgzchecked by default is fine, is you have the `bin\amd64\cl.exe` fine somewhere10:23
AuroraBorealiswell the folder they say that cl.exe is in wasn't created by default10:23
AuroraBorealisi had to create the directory and the vcvarsamd64.bat file10:23
wgzsure, but can you find it somewhere else?10:23
AuroraBorealisi see cl.exe in Microsoft Visual Studio 9.0/VC/bin10:24
wgzif so, I'd go ahead and open a new cmd window, call vcvarsamd64.bat, then run setup.py and see what happens10:24
AuroraBorealisoh gee10:25
AuroraBorealisi think its screwing up on the uf-8 bom10:25
AuroraBorealiswell10:26
AuroraBorealisi ran it, the terminal text turned green10:27
AuroraBorealisand now its compiling10:27
wgzheh, that's possible10:27
AuroraBorealisit said <randomgibberish>call is not a windows batch file/command10:27
wgzyeah, that's an annoying way to have got stuck :)10:27
AuroraBorealisso when i install this10:28
AuroraBorealiswill it always use this version of bzr lib? or will running the exe from the windows installer override it10:28
wgzit won't interfere with the exe version10:29
AuroraBorealisk10:29
AuroraBorealisWell. now that installed10:29
AuroraBorealisi forget what else i need to do10:29
wgzlp:meliae lp:python-fastimport lp:bzr-fastimport10:29
wgzI recommend testing the bzr you've just installed, should be able to run it with Python27\Scripts\bzr.bat10:30
AuroraBorealisseems to of worked!10:32
wgzgood good!10:32
AuroraBorealisok10:36
AuroraBorealisall 3 installed10:36
AuroraBorealisnow what!10:38
wgzwell, it would be nice to test that the memory dumping worked but...10:39
wgzcould just start the import10:39
AuroraBorealisstart it again from the beginning?10:40
wgz`Scripts\bzr fast-import ..\tmp_linux\linux.fe \bzr-import` or similar10:40
wgzhm.10:40
AuroraBorealiscause i can't seem to continue cause of another bug10:40
wgzyeah10:40
wgzyou could try repacking the failed import for a faster big-memory usage10:41
wgzbut with 64 bit process you probably won't OOM now anyway10:41
AuroraBorealisis there a command to repack?10:41
wgz`bzr pack`10:44
wgz...it took me way too long to find that, I fail at name guessing/remembering10:44
wgzyou can look the windows task manager for ball park memory usage numbers10:45
AuroraBorealisyeah i'm watching it10:47
AuroraBorealis280,000 KB10:47
lifelesswgz: have you installed bzr guess ?10:50
wgzthe -Dmem_dump option is needed to write the stats on OOM, but that probably won't happen now so breakin and calling bzrlib.trace._dump_memory_usage directly is probably more useful anyway10:50
wgzlifeless: nope10:50
lifelesswgz: give it a spin :)10:50
lifeless$ bzr repack10:51
lifelessCommand 'repack' not found, perhaps you meant 'pack'? [y/n]:10:51
AuroraBorealiswill it dump the memory automatically using meliae or do i have to do the -Dmem_dump thing10:51
wgzha, and I was just about to doubt that it'd know to remove the 're' prefix10:51
wgzI should have more trust in lifeless.10:51
lifelesswgz: it uses a distance calculation :)10:51
lifelesswgz: $ bzr pdck10:52
lifelessCommand 'pdck' not found, perhaps you meant 'pack'? [y/n]:10:52
wgz^It will only auto dump if you OOM, which with a 64-bit process and 8 gigs probably isn't going to happen10:52
wgz(and needs the flag)10:52
AuroraBorealisk10:52
wgzbut with ctrl+break then a bit of typing in the debugger we can get what we want anyway10:52
AuroraBorealisso this seems like its going to work, although its using 600,000KB atm hehe10:52
AuroraBorealis64 bit is a lost faster o.o10:53
AuroraBorealislot*10:53
wgzscusi, just going to pick apples, but I'll be around - try the import from the beginning if that works10:56
AuroraBorealiskk =)11:13
wgzokay. how high did the repack get up to on its own?11:19
AuroraBorealiswell11:37
AuroraBorealisits currently repacking "chk:chk node 861000/987188"11:37
wgzthat's good, and what's the mem usage?11:39
AuroraBorealisright now 650,000 KB11:39
AuroraBorealishighest was around 850,000 KB11:39
wgzha, so it has stabilised.11:39
AuroraBorealisit jumped up a lot when it started doing the chk: index/nodes and whatever11:40
wgzso, if you want to try something11:40
wgzdo ctrl+break in the terminal11:40
AuroraBorealisthe pause|break button?11:41
wgzyup.11:41
wgzthis should then put you in the python debugger11:41
wgzthen you can do...11:41
wgzpdb> from bzrlib.trace import _dump_memory_usage11:41
wgzpdb> import sys11:42
wgzpdb> _dump_memory_usage(sys.stderr)11:42
wgzand finally to resume,11:42
wgzpdb> c11:42
AuroraBorealiswell that crashed it11:43
wgzpaste me the output?11:43
AuroraBorealisdidn't give any output11:43
AuroraBorealisjust said "python27_64.exe has stopped working"11:43
wgzah, msgbox from windows?11:43
AuroraBorealisyeah11:43
wgzat which point?11:44
AuroraBorealisthere are the windows dump files11:44
AuroraBorealis_dump_memory_usage(sys.stderr)11:44
wgzokay... meliae apparently has issues on win64 then >_<11:44
AuroraBorealisgahhhhh11:45
wgzif you could file a bug against and stick the stuff windows gave you as an attachment, that would be great11:46
wgzthe good news is that using 64-bit process looks like it'll let the fast-import succeed11:46
AuroraBorealisyeah11:46
AuroraBorealisbut running out of memory on 32 bit still seems like a problem11:46
wgzyup, and the usage of both fast-import and repacking seem to both be problematic11:48
AuroraBorealisyes11:50
AuroraBorealisi restarted it again, using 600,000 at stage 2 so yeah.11:50
AuroraBorealisso file a bug against meliae?11:55
wgzright.11:56
wgzyou could also run it's testsuite to see if that crashes (and can then be narrowed down to one test)11:56
wgzcan do that with... `cd meliae` `Python27\python setup.py build_ext -i` `Python27\python -m unittest meliae.tests.test_suite`11:57
wgzjust use a new window, no need to interrupt the repack11:57
wgz...I get two failures, but they look shallow11:59
AuroraBorealishaha12:00
AuroraBorealisthe unit tests crash.12:00
wgzthat's good.12:00
AuroraBorealiswhat debugs the debugger?12:00
AuroraBorealisWATCHMENNNNNNN12:00
wgzyou can now try smaller subsets till you find one test that does it12:00
AuroraBorealishow do i run the individual tests? replace the meliae.tests.test.suite with the individual files?12:01
wgzstart with meliae.tests.test_scanner12:02
AuroraBorealiscrash :<12:02
wgzand then you can narrow further with the classes in that file, then the methods12:02
AuroraBorealisi found the names i'll run em all12:02
AuroraBorealisis it because i'm not running cmd.exe in administrator mode?12:04
wgzit's likely one (or more) type errors where the extension code is assuming sizeof(int) == sizeof(*ptr)12:04
AuroraBorealistest__intset works, test__loader works, test__scanner crashes, test_loader crashes, test_perf_counter works, test_scanner crashes12:05
wgzwhich is true for win32 and the 64-bit scheme used on nix12:05
AuroraBorealisah :312:07
wgzanyway, you've got enough to file a bug now12:13
AuroraBorealisyeah12:13
wgzthere should be a way to get debugging symbols for a proper C stack trace, but I've not done it with cython before12:13
AuroraBorealisdoing that now12:13
AuroraBorealisi have no idea either xD12:19
AuroraBorealishttps://bugs.launchpad.net/meliae/+bug/86459312:19
ubot5Ubuntu bug 864593 in Meliae "Crashes on win64 when running test suite" [Undecided,New]12:19
AuroraBorealisanother note, bzr is using over 1,200,000 KB when repacking now o.o12:23
wgzhm.12:28
AuroraBorealisi'll just let it run. never debugged python stuff this indepth before ..12:28
wgzcan you run another smaller chunk of the meliae test suite? start with meliae.tests.test__scanner.TestSizeOf12:30
wgzif that still crashes, add .test_None12:30
AuroraBorealisthat didn't crash, 3 tests failed12:31
wgzokay, that's what I was hoping for12:31
wgzfailing tests on the sizeof things implies logic errors, that could cause crashes in bigger chunks of code12:31
wgzstick those three failed tests output in a comment on the bug12:31
AuroraBorealisit seems that they are always off by 412:32
wgzyeay! alignment.12:32
AuroraBorealis37 != 33, 102437 != 102433, 38!=3412:32
wgzpaste them in the bug report and I'll have a look12:32
AuroraBorealisposted!12:33
wgzhm, just strings, probably just the 2.7 check above not taking alignment into account rather than something more fundamental.12:39
AuroraBorealisaww12:40
wgztry each of the other classes in that file in turn12:41
AuroraBorealisTestDumpInfo crashes python12:43
AuroraBorealisall others pass12:44
wgzokay, that's good, gives us a narrowed scope.12:44
wgznot much, but a bit.12:45
wgzthis pyrex `    ctypedef long size_t12:46
wgzis wrong, but probably unimportant, I'm never sure what the manual definitions actually matter for12:46
AuroraBorealiscan i try an individual method in a test case?12:47
wgzthat's in _scanner.pyx and there are some similar ones in the other pyx files, could try deleting them and recompiling, I'll keep looking12:47
wgz^yup, just .method_name on the end12:48
wgzin the TestDumpInfo case they all call the same helper which goes to dump_object_info so should all crash12:48
AuroraBorealisyeah they all crash12:49
wgz...this could be something as silly as the IO failing12:52
AuroraBorealisoh? :o12:52
wgzhave you tried deleting those size_t defs yet?12:53
AuroraBorealisin __scanner.py and then recompiling?12:53
wgzyup, then run one of the TestDumpInfo cases again12:54
AuroraBorealiswhat do i delete? these? size_of = _scanner.size_of12:54
AuroraBorealisoh12:54
AuroraBorealisnvm haha12:54
wgznope, just the ctypedef at the top.12:54
wgzlong is 4 bytes on win64, and size_t is 8 bytes12:55
wgzI think cython should ignore that decl and use the right thing, but you never know12:55
AuroraBorealissorry i suck at c, what do i delete? lots of size_t things12:56
wgzjust the one line at the top of _scanner.pyx "ctypedef long size_t"12:59
AuroraBorealisoohhh the pyx file12:59
wgzhm, yeah, that shouldn't matter I think.13:00
AuroraBorealisyeah, still crashes13:01
wgzokay, let's eliminate the possibility of it being the io13:03
wgzokay, I've added a test to TestDumpInfo that does a bit less13:10
wgzhttp://paste.ubuntu.com/701020/13:10
wgzthen run with meliae.tests.test__scanner.TestDumpInfo.test_int_no_file and it passes here13:10
wgzI'm interested if that simplified version still crashes for you.13:11
wgzugh, tabs, <http://paste.ubuntu.com/701022/>13:12
AuroraBorealisi dont need to recompile right13:13
AuroraBorealisand that test passed13:15
wgzeh he he.13:15
wgzit printed my two little notes as well, right?13:15
AuroraBorealisyeah13:15
wgznow change recurse_depth=0 from 0 to 1 and try again.13:15
AuroraBorealisprinted a period too13:16
AuroraBorealisthat works as well13:16
wgzokay, change that back, and change `sio.write` to `file("nul", "wb")`13:18
wgzwhich, if the IO is indeed the problem, will crash.13:18
AuroraBorealisyeeeup. crashes.13:19
wgzso, either meliae and python are linked against different runtime libraries, or there's a bug13:20
* AuroraBorealis whimpers at the fact of runtime libraries not working :<<13:21
wgzokay, so, nothing's jumping out at me, and I need some lunch13:30
AuroraBorealishaha13:30
AuroraBorealistake your time, its 6 am here so i probably should go to bed sometime.13:31
wgzbut there are two things I can think of that would help (bar getting a stacktrace... which may have actually been just as easy)13:31
wgzone is to use dumpbin.exe to look at python27.dll and _scanner.pyd to see if they're importing from the same runtime13:32
wgzthe other is to try commenting/printing in _scanner.pyx to narrow down exactly what crashes, using our minimal test13:33
AuroraBorealiswhat is dumpbin.exe?13:33
wgzit just lists symbols in the exe/library, either msvc or the win7 thing should have come with it13:33
wgzon the trial and error front, for starts13:34
wgzin dump_object_info comment the _dump_object_info calls so just the fflush happens, and see if there's still a crash13:35
wgzremember to rerun `setup.py build_ext -i` each time after changing a pyx file13:36
wgzif that works, can just commenting the fwrite call in _file_io_callback13:37
AuroraBorealiswhich test do i run, yours?13:37
AuroraBorealisrunning your test again and commenting out the _dump_object_info it still crashes13:39
wgzheh, that does seem just like mismatched FILE* then13:47
wgzhow did the install get that wrong...13:48
wgzso, possible workaround for now13:56
wgz<http://paste.ubuntu.com/701043/>13:56
AuroraBorealisdoesn't crash, i get this: http://paste.ubuntu.com/701045/13:59
wgzcool, now run the rest of those tests14:05
wgz(that one fails because we were just discarding the output as what we cared about was if the IO crashed)14:06
AuroraBorealisi get all the failures i was getting before, yours and then TestMemObj and TestObjManager failing14:07
AuroraBorealishttp://paste.ubuntu.com/701050/14:08
wgzokay, so reverting everything but the workaround should mean you have a functional meliae to install and use on bzr14:09
wgzcan do `bzr shelve -destroy` to get rid of the other changes14:10
wgz*--destroy14:10
AuroraBorealisi was just downloading the tarballs cause launchpad is still not accepting my ssh key for some reason =/14:12
wgzha, well, I think we didn't change anything else important so go ahead and install14:13
AuroraBorealisyeah14:13
AuroraBorealisjust restored the tarballs copy and redid the change14:13
AuroraBorealisyou should probably post that workaround to the bug report as i have no idea what that did xD14:15
wgzI'll do it14:16
wgzokay, so as a test, start a repack, then do the ctrl+break and my instructions from earlier before we got side-tracked, you should get a .json dump of where the memory usage is14:17
AuroraBorealisok14:18
AuroraBorealisso, where is it dumping the json14:37
wgzit should tell you, but in %TMP% basically14:39
AuroraBorealisk. still dumping xD14:39
wgzwhereever the tempfile module creates things14:40
AuroraBorealiswell14:41
AuroraBorealisthe json file is 4 gb14:41
AuroraBorealisand cannot be opened by my text editor14:41
wgzthat's not overly suprising.14:41
AuroraBorealisdo you think paste.ubuntu.com would be mad if i pasted it there? =P14:42
wgzehehe14:43
wgzthe strip_duplicates.py script may reduce it somewhat, and 7z or bzip2 should compress it quite well14:44
AuroraBorealisyeah14:44
AuroraBorealistrying with 7z14:44
AuroraBorealisoh yeah. compression on text files is sexy14:45
wgz<http://jam-bazaar.blogspot.com/2010/08/step-by-step-meliae.html> gives some ideas of what you can do with the dump14:46
wgzthe summary should be pastebinable at least :)14:46
AuroraBorealisyeah14:51
AuroraBorealisloading~14:53
AuroraBorealisomgggggg14:59
AuroraBorealisit failed x.x14:59
AuroraBorealis'address <number here> not present"15:00
* AuroraBorealis tries the dump again15:00
wgzany luck second time?15:19
AuroraBorealisstillll dumping15:20
AuroraBorealiskeeps saying an address is not present =/15:27
wgzhow frustrating.15:28
AuroraBorealisyeah D:15:28
AuroraBorealisno idea whats going on now...15:29
wgztry with a much smaller bzr process first, so at least you can then send me the dump and it won't take as long to retry?15:30
AuroraBorealisk15:30
wgzeg, `bzr info` and interrupt if (if you're fast enough)15:31
wgzthere are still some casts in the meliae source I don't like but the problem might be elsewhere15:34
AuroraBorealiswww.kramidnarg.com/stuff/bzr_memdumptn8bb_.7z15:34
AuroraBorealisthat still gives the same error if i try to laod it15:34
wgzokay, I get the KeyError too.15:37
AuroraBorealisk15:40
AuroraBorealisi'm probably going to go to bed now15:41
AuroraBorealiswhen i get up i guess we can figure out why its not loading the dumps :<15:41
wgzlooks like there are some refs that aren't in the dump, probably doesn't need to be a fatal error15:41
wgzsleep well!15:42
wgzdon't dream of running out of memory.15:42
AuroraBorealis=P15:42
=== AuroraBorealis is now known as aurora|zzz
=== marienz_ is now known as marienz
Enma_HinobaraI have a quick question about something really trivial that is disproportionately hard to figure out how to do in Bazaar.21:20
Enma_HinobaraI have a directory containing a program, and I want to import it into Bazaar. However, I don't want to make said directory a branch (easy), I want the branch to be in a shared repository (already created) and the original directory become a working tree for that branch. How might this be done?21:20

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!