[07:54] morning! [08:04] hi mgz [08:15] mgz: morning! [08:19] hey jam [08:19] we gatecrashing red's call this morning? [08:20] and now I see we are... === mmrazik is now known as mmrazik|lunch === mmrazik|lunch is now known as mmrazik [11:17] mgz: so what can I do for you to get: https://code.launchpad.net/~jameinel/bzr/2.5-unending-sendall-1047309/+merge/123268 merged? [11:24] jam: maybe we should just merge it, but I don't really like heuristic workarounds for upstream bugs [11:25] jml: 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] mgz: I don't see an explicit statement that 'send must not return 0 bytes'. [11:25] so I can't say it is strictly a bug in paramiko. [11:25] and we still need to workaround it in bzr for whatever versions people are going to use/we are going to ship. [11:25] jam: sure. [11:26] mgz: At this point I'm much more on the "lets get it working" side of the fence. [11:26] jml: 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] well, in this case returning 0 means ECONNRESET... but we don't know if that's what it'll always mean [11:28] I 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 usage [11:33] jam: I can run 'bzr di' successfully in the lightweight checkouts I have using lp:bzr/2.5. [11:34] mgz: well it arguably means ssh.EOF [11:34] or EPIPE [11:34] or... [11:34] (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.) [12:37] jam, mgz: http://developerweb.net/viewtopic.php?id=2956 [12:39] jam, 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 vanish [12:39] vila: send returns 0 because of paramiko [12:39] completely orthogonal to EPIPE [12:39] jam: and why does paramiko do that ? [12:39] only particularly related because paramiko looks like a socket to our code [12:41] I fail to see how that answer my question [12:45] vila: it doesn't, it finishes my sentence. [12:45] paramiko does X, socketpair does Y [12:45] socketpair is raising a EPIPE [12:46] paramiko is returning 0 bytes sent [12:46] windows was using an actual PIPE to the subprocess, and was getting something else. [12:46] sometimes EINVAL, sometimes EPIPE [12:47] jam: 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 behaviors [12:47] (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:48] the 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 send [12:48] vila: *paramiko* is returning 0 on send, which is not a socket [12:49] we are getting an EPIPE on the write side [12:49] (not necessarily SIGPIPE, which is what you linked) [12:49] jam: what matters is that paramiko *is* using sockets, no matter what it presents to you [12:49] vila: you're missing what actual errors we are getting running things in the world. [12:49] ? [12:50] vila: 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] so I translate that into some other error. [12:50] If we use BZR_SSH=openssh on Linux, we communicate with the 'ssh' subprocess using socketpapi [12:50] socketpair [12:50] and we get socket.error(EPIPE) raised when we try to send() to it. [12:51] So what ? You're not explaining why paramiko behaves differently [12:51] vila: because it does [12:51] You're welcome to dig into the paramiko code to explain why it doesn't behave identically to a socket to us. [12:51] saying X does Y doesn't explain why X does Y [12:51] I don't really care enough. [12:52] it is really hard to maintain paramiko, so I'd rather just work around it. [12:52] given all versions across all platforms that bzr-2.5 should be available on. [12:53] fair enough, I'm just saying that working around without understanding is not the best way to avoid bugs in the long term [12:53] and one the key points here is the difference between shutdown and close, but hey, it's up to you to dig that or not [12:54] * jelmer totally digs those socket shenanigans [12:58] vila: 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:59] the more cruft added there the less incentive it is to me to touch this code :) === mmrazik is now known as mmrazik|afk [13:42] I have a branch at r656 which gets merge conflicts when I merge it with another one [13:42] at r652, the merge works fine [13:43] now, my question is about bzr revert [13:43] if I do "bzr revert -r 652" and commit, and then merge, there are the conflicts [13:43] but, if I do "bzr branch -r 652" into a new branch, and merge that one, there are no conflicts [13:43] shouldn't the result of "bzr revert -r 652 + commit" and "bzr branch -r 652" be the same? [13:44] I thought revert means "bring the branch back to that revision" [13:44] and branch is "copy out that revision into a new branch" [13:52] funny, there is no difference in the code between the result of "bzr revert -r 652" and "bzr branch -r 652" [13:52] yet only one of them merges without conflicts [13:53] is this expected or a bug in bzr? [13:55] ahasenack: it does have an effect on the history [13:55] even f the contents are the same [13:58] I wanted history record that I had to revert to 652, otherwise I would have used uncommit [13:59] would have bzr merge . -r 653..652 (for example) produced a more merge-friendly result than revert -r 652? [14:01] ahasenack: I think that would have the same result as the revert [14:02] so reverts are bad for merges? uncommits are better, if possible? [14:03] a branch is merged, but introduces a bug [14:03] you quickly revert [14:03] the bug is fixed, and you merge again [14:03] that's my use case, except now it's conflicting [14:14] hm, revert leaves things a bit nutty [14:15] after bzr merge, bzr status tells me it thinks it needs to add a .OTHER file [14:17] Contents conflict in canonical/landscape/schema/main/patch_147.py [14:17] and then [14:17] $ bzr st [14:17] added: [14:17] canonical/landscape/schema/main/patch_147.py.OTHER [14:17] :) [14:31] ok, let me rephrase that as :( [14:40] ahasenack: bzr remove canonical/landscape/schema/main/patch_147.py.OTHER ? [14:40] jpds: it only showed its head after bzr merge, it was never "bzr add"ed to the tree, I can't explain that [14:43] I had to revert the revert, then merge === mmrazik is now known as mmrazik|afk [16:00] ahasenack: if I'm not mistaken, the OTHER branch added patch_147.py and so did the THIS branch, hence the conflit. [16:00] vila: it was weird indeed, that patch introduced a bug [16:00] vila: so I reverted it, while it was fixed upstream [16:00] vila: then I merged again, and there was the conflict [16:00] ahasenack: 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/added [16:00] vila: I had to undo the revert, then merge [16:01] also, it thought the code I reverted was there. Without the undo part, the merge wouldn't bring in the fixed code, it was very confusing [16:01] lesson: be careful with bzr revert [16:01] ahasenack: right, so probably reverting put you back in a time where the file had a different file-id [16:02] it was like 652: ok; 653: introduced the bug; 654: revert -r 652 [16:02] and then things got out of hand [16:03] I had to undo 654 [16:03] ahasenack: it's not 'revert' per-se, more an issue with a file removed/added in one branch [16:03] that patch file was added in 653, and "removed" in 654 via bzr revert [16:03] ahasenack: bzr st --show-ids -r652..653 ? [16:03] ha right [16:03] yeah [16:04] *that* is the "bug" [16:04] you fooled bzr :-/ [16:04] something I should file? [16:04] (which is a bzr bug in itself to be fool-able this way) === deryck is now known as deryck[lunch] [16:05] my situation is fixed not, btw, after I did that undo, then the merge worked fine [16:05] s/not/now/ [16:05] unfortunately, I don't think so, it's the same underlying issue than "parallel import" [16:05] * vila nods [16:06] ahasenack: and you probably won't fall in this trap again [16:06] oh, who knows :) [16:06] I'm not sure there was another way out of this [16:06] unless I used uncommit [16:06] once I detected the bug [16:06] but I wanted to preserve history, I wanted it to be recorded that a bug was found and the code had to be reverted [16:07] and I did use revert in other occasions [16:07] ahasenack: a reverse merge is the working way [16:07] but those probably didn't have an added file [16:07] vila: bzr merge . -r N+1..N? [16:07] yup [16:07] ok [16:07] it keeps track of the file-ods [16:07] ids [16:08] good to know, and I find it more intuitive too [16:08] the 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 about [16:08] a reverse patch [16:09] content 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] the content is different indeed [16:09] but something feels off with revert [16:10] for example, the 653 changeset brought in other fixes, not just the buggy patch_147.py one (new file) [16:10] after I reverted that [16:10] but for mere mortals ignoring file-ids, it's (as you put it) nutty [16:10] and then merged again with upstream after patch_147 was fixed, the other fixes I reverted weren't brought in again [16:10] it's as if bzr considered them applied [16:11] it 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 in [16:11] all part of that reverted 653 commit [16:13] anyway, lunch time [16:13] vila: thanks for the discussion [16:13] ahasenack: not sure how to help here without seeing more details (not sure it's worth the trouble if you're now safe) [16:13] ahasenack: my pleasure === 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