/srv/irclogs.ubuntu.com/2012/09/10/#bzr.txt

mgzmorning!07:54
jelmerhi mgz08:04
jammgz: morning!08:15
mgzhey jam08:19
mgzwe gatecrashing red's call this morning?08:19
mgzand now I see we are...08:20
=== mmrazik is now known as mmrazik|lunch
=== mmrazik|lunch is now known as mmrazik
jammgz: so what can I do for you to get: https://code.launchpad.net/~jameinel/bzr/2.5-unending-sendall-1047309/+merge/123268 merged?11:17
mgzjam: maybe we should just merge it, but I don't really like heuristic workarounds for upstream bugs11:24
jamjml: I think I have a fix for your issue that has landed in lp:bzr/2.5, are you comfortable testing it out and confirming?11:25
jammgz: I don't see an explicit statement that 'send must not return 0 bytes'.11:25
jamso I can't say it is strictly a bug in paramiko.11:25
jamand we still need to workaround it in bzr for whatever versions people are going to use/we are going to ship.11:25
jmljam: sure.11:25
jammgz: At this point I'm much more on the "lets get it working" side of the fence.11:26
jamjml: It hasn't landed in trunk yet, because I have a couple other fixes I want to land, and just merge up 1 tiem.11:26
mgzwell, in this case returning 0 means ECONNRESET... but we don't know if that's what it'll always mean11:26
mgzI think I'd prefer treating it as always ECONNRESET and muttering something, were it not for the fact this isn't a well exercised codepath in general usage11:28
jmljam: I can run 'bzr di' successfully in the lightweight checkouts I have using lp:bzr/2.5.11:33
jammgz: well it arguably means ssh.EOF11:34
jamor EPIPE11:34
jamor...11:34
jam(paramiko does have a way to single that it is disconnected, but I'm not getting that here, and I really don't know why.)11:34
vilajam, mgz: http://developerweb.net/viewtopic.php?id=295612:37
vilajam, mgz : From that, I'd say: send() returns 0 because it expects something else to call recv and get the EPIPE, a test should be able to reproduce and then the unknown can vanish12:39
jamvila: send returns 0 because of paramiko12:39
jamcompletely orthogonal to EPIPE12:39
vilajam: and why does paramiko do that ?12:39
jamonly particularly related because paramiko looks like a socket to our code12:39
vilaI fail to see how that answer my question12:41
jamvila: it doesn't, it finishes my sentence.12:45
jamparamiko does X, socketpair does Y12:45
jamsocketpair is raising a EPIPE12:45
jamparamiko is returning 0 bytes sent12:46
jamwindows was using an actual PIPE to the subprocess, and was getting something else.12:46
jamsometimes EINVAL, sometimes EPIPE12:46
vilajam: forget about windows when it comes to sockets, that's not the best implementation to understand what *can* happen, I won't call it buggy but it certainly only exhibit only a subset of the possible behaviors12:47
jam(we use a socketpair to communicate to the subprocess when we can, because then we can recv(1024) without worrying about blocking, rather than having to read(1) when we don't know how big the next reques tis)12:47
vilathe point of the url above is that the EPIPE *may* be available on the read side and the write side is then having a weird behavior of returning 0 on send12:48
jamvila: *paramiko* is returning 0 on send, which is not a socket12:48
jamwe are getting an EPIPE on the write side12:49
jam(not necessarily SIGPIPE, which is what you linked)12:49
vilajam: what matters is that paramiko *is* using sockets, no matter what it presents to you12:49
jamvila: you're missing what actual errors we are getting running things in the world.12:49
vila?12:49
jamvila: If we use BZR_SSH=paramiko, and get disconnected, we hang indefinitely because paramiko returns 0 bytes for the send, and no error.12:50
jamso I translate that into some other error.12:50
jamIf we use BZR_SSH=openssh on Linux, we communicate with the 'ssh' subprocess using socketpapi12:50
jamsocketpair12:50
jamand we get socket.error(EPIPE) raised when we try to send() to it.12:50
vilaSo what ? You're not explaining why paramiko behaves differently12:51
jamvila: because it does12:51
jamYou're welcome to dig into the paramiko code to explain why it doesn't behave identically to a socket to us.12:51
vilasaying X does Y doesn't explain why X does Y12:51
jamI don't really care enough.12:51
jamit is really hard to maintain paramiko, so I'd rather just work around it.12:52
jamgiven all versions across all platforms that bzr-2.5 should be available on.12:52
vilafair enough, I'm just saying that working around without understanding is not the best way to avoid bugs in the long term12:53
vilaand one the key points here is the difference between shutdown and close, but hey, it's up to you to dig that or not12:53
* jelmer totally digs those socket shenanigans12:54
jamvila: given that it is being done in your free time, you are welcome to devote as much time as you would like digging into the paramiko case :)12:58
vilathe more cruft added there the less incentive it is to me to touch this code :)12:59
=== mmrazik is now known as mmrazik|afk
ahasenackI have a branch at r656 which gets merge conflicts when I merge it with another one13:42
ahasenackat r652, the merge works fine13:42
ahasenacknow, my question is about bzr revert13:43
ahasenackif I do "bzr revert -r 652" and commit, and then merge, there are the conflicts13:43
ahasenackbut, if I do "bzr branch -r 652" into a new branch, and merge that one, there are no conflicts13:43
ahasenackshouldn't the result of "bzr revert -r 652 + commit" and "bzr branch -r 652" be the same?13:43
ahasenackI thought revert means "bring the branch back to that revision"13:44
ahasenackand branch is "copy out that revision into a new branch"13:44
ahasenackfunny, there is no difference in the code between the result of "bzr revert -r 652" and "bzr branch -r 652"13:52
ahasenackyet only one of them merges without conflicts13:52
ahasenackis this expected or a bug in bzr?13:53
jelmerahasenack: it does have an effect on the history13:55
jelmereven f the contents are the same13:55
ahasenackI wanted history record that I had to revert to 652, otherwise I would have used uncommit13:58
ahasenackwould have bzr merge . -r 653..652 (for example) produced a more merge-friendly result than revert -r 652?13:59
jelmerahasenack: I think that would have the same result as the revert14:01
ahasenackso reverts are bad for merges? uncommits are better, if possible?14:02
ahasenacka branch is merged, but introduces a bug14:03
ahasenackyou quickly revert14:03
ahasenackthe bug is fixed, and you merge again14:03
ahasenackthat's my use case, except now it's conflicting14:03
ahasenackhm, revert leaves things a bit nutty14:14
ahasenackafter bzr merge, bzr status tells me it thinks it needs to add a .OTHER file14:15
ahasenackContents conflict in canonical/landscape/schema/main/patch_147.py14:17
ahasenackand then14:17
ahasenack$ bzr st14:17
ahasenackadded:14:17
ahasenack  canonical/landscape/schema/main/patch_147.py.OTHER14:17
ahasenack:)14:17
ahasenackok, let me rephrase that as :(14:31
jpdsahasenack: bzr remove canonical/landscape/schema/main/patch_147.py.OTHER ?14:40
ahasenackjpds: it only showed its head after bzr merge, it was never "bzr add"ed to the tree, I can't explain that14:40
ahasenackI had to revert the revert, then merge14:43
=== mmrazik is now known as mmrazik|afk
vilaahasenack: if I'm not mistaken, the OTHER branch added patch_147.py and so did the THIS branch, hence the conflit.16:00
ahasenackvila: it was weird indeed, that patch introduced a bug16:00
ahasenackvila: so I reverted it, while it was fixed upstream16:00
ahasenackvila: then I merged again, and there was the conflict16:00
vilaahasenack: if you dig the history with (bzr st -rx..y --show-ids) you can probably confirmed that and find some revision were the file is removed/added16:00
ahasenackvila: I had to undo the revert, then merge16:00
ahasenackalso, it thought the code I reverted was there. Without the undo part, the merge wouldn't bring in the fixed code, it was very confusing16:01
ahasenacklesson: be careful with  bzr revert16:01
vilaahasenack: right, so probably reverting put you back in a time where the file had a different file-id16:01
ahasenackit was like 652: ok; 653: introduced the bug; 654: revert -r 65216:02
ahasenackand then things got out of hand16:02
ahasenackI had to undo 65416:03
vilaahasenack: it's not 'revert' per-se, more an issue with a file removed/added in one branch16:03
ahasenackthat patch file was added in 653, and "removed" in 654 via bzr revert16:03
vilaahasenack: bzr st --show-ids -r652..653 ?16:03
vilaha right16:03
ahasenackyeah16:03
vila*that* is the "bug"16:04
vilayou fooled bzr :-/16:04
ahasenacksomething I should file?16:04
vila(which is a bzr bug in itself to be fool-able this way)16:04
=== deryck is now known as deryck[lunch]
ahasenackmy situation is fixed not, btw, after I did that undo, then the merge worked fine16:05
ahasenacks/not/now/16:05
vilaunfortunately, I don't think so, it's the same underlying issue than "parallel import"16:05
* vila nods16:05
vilaahasenack: and you probably won't fall in this trap again16:06
ahasenackoh, who knows :)16:06
ahasenackI'm not sure there was another way out of this16:06
ahasenackunless I used uncommit16:06
ahasenackonce I detected the bug16:06
ahasenackbut I wanted to preserve history, I wanted it to be recorded that a bug was found and the code had to be reverted16:06
ahasenackand I did use revert in other occasions16:07
vilaahasenack: a reverse merge is the working way16:07
ahasenackbut those probably didn't have an added file16:07
ahasenackvila: bzr merge . -r N+1..N?16:07
vilayup16:07
ahasenackok16:07
vilait keeps track of the file-ods16:07
vilaids16:07
ahasenackgood to know, and I find it more intuitive too16:08
vilathe root issue here is adding the same file (at the same path) with a *different* file-id which is what the confusing 'content conflict' is about16:08
ahasenacka reverse patch16:08
vilacontent here refer to the inventory content: two files want to occupy the same path (they are different as far as bzr is concerned because they have different file-ids)16:09
ahasenackthe content is different indeed16:09
ahasenackbut something feels off with revert16:09
ahasenackfor example, the 653 changeset brought in other fixes, not just the buggy patch_147.py one (new file)16:10
ahasenackafter I reverted that16:10
vilabut for mere mortals ignoring file-ids, it's (as you put it) nutty16:10
ahasenackand then merged again with upstream after patch_147 was fixed, the other fixes I reverted weren't brought in again16:10
ahasenackit's as if bzr considered them applied16:10
ahasenackit was pretty "nutty", I ran bzr merge, got those conflicts, and a plain diff between the two branches still showed many changes that were not brought in16:11
ahasenackall part of that reverted 653 commit16:11
ahasenackanyway, lunch time16:13
ahasenackvila: thanks for the discussion16:13
vilaahasenack: not sure how to help here without seeing more details (not sure it's worth the trouble if you're now safe)16:13
vilaahasenack: my pleasure16:13
=== deryck[lunch] is now known as deryck
=== yofel_ is now known as yofel
=== spm is now known as stevemci
=== stevemci is now known as spm

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