From 601f9e7e39994e98c28fc48a4c3b2a1769ecff8f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Jun 2017 17:11:57 -0400 Subject: propellor spin --- doc/todo/spin_failure_HEAD.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/todo/spin_failure_HEAD.mdwn b/doc/todo/spin_failure_HEAD.mdwn index af525f61..108ed9b2 100644 --- a/doc/todo/spin_failure_HEAD.mdwn +++ b/doc/todo/spin_failure_HEAD.mdwn @@ -94,7 +94,8 @@ Sending privdata (73139 bytes) to kite.kitenet.net ... done > > * Could be in gitPushHelper, perhaps it's failing to write > > some of the first lines somehow? > > * Could be something on the remote side is consuming stdin -> > that is not supposed to, and eats some of the protocol.a +> > that is not supposed to, and eats some of the protocol. + > > > > I added debug dumping to gitPushHelper, and it seems to be > > reading the same truncated data. -- cgit v1.3-2-g0d8e From 07b61ab825c29644e804251de4c817180a5846dc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Jun 2017 17:16:02 -0400 Subject: propellor spin --- doc/todo/spin_failure_HEAD.mdwn | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/todo/spin_failure_HEAD.mdwn b/doc/todo/spin_failure_HEAD.mdwn index 108ed9b2..62c3e094 100644 --- a/doc/todo/spin_failure_HEAD.mdwn +++ b/doc/todo/spin_failure_HEAD.mdwn @@ -51,7 +51,6 @@ Sending privdata (73139 bytes) to kite.kitenet.net ... done [2017-06-18 16:27:13 EDT] received marked GITPUSH [2017-06-18 16:27:13 EDT] command line: GitPush 11 12 16:27:13.953638 pkt-line.c:80 packet: fetch< 3a3c8a731d169a2768dd243581803dcb7b275049 HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed symref=HEAD:refs/heads/joeyconfig agent=git/2.11.0 -16:27:13.953638 pkt-line.c:80 packet: fetch< 3a3c8a731d169a2768dd243581803dcb7b275049 HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed symref=HEAD:refs/heads/joeyconfig agent=git/2.11.0 16:27:13.953781 pkt-line.c:80 packet: fetch< 86b077b7a21efd5484dfaeee3c31fc5f3c151f6c refs/heads/confpairs 16:27:13.953789 pkt-line.c:80 packet: fetch< e03e4bf0f1e557f87d1fe7e01a6de7866296fce6 refs/heads/d-i 16:27:13.953795 pkt-line.c:80 packet: fetch< 3a3c8a731d169a2768dd243581803dcb7b275049 refs/heads/joeyconfig @@ -95,7 +94,11 @@ Sending privdata (73139 bytes) to kite.kitenet.net ... done > > some of the first lines somehow? > > * Could be something on the remote side is consuming stdin > > that is not supposed to, and eats some of the protocol. - +> > > > > > I added debug dumping to gitPushHelper, and it seems to be -> > reading the same truncated data. +> > reading the same truncated data, so it seems ok. +> > +> > Just after the gitPushMarker is sent, I made it read +> > a line from stdin, and it got the first line of the protocol. +> > -- cgit v1.3-2-g0d8e -- cgit v1.3-2-g0d8e -- cgit v1.3-2-g0d8e -- cgit v1.3-2-g0d8e From 4b003643d60c9779607f1048035e9e9364bcda90 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Jun 2017 17:28:25 -0400 Subject: propellor spin --- doc/todo/spin_failure_HEAD.mdwn | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/todo/spin_failure_HEAD.mdwn b/doc/todo/spin_failure_HEAD.mdwn index 62c3e094..981e775c 100644 --- a/doc/todo/spin_failure_HEAD.mdwn +++ b/doc/todo/spin_failure_HEAD.mdwn @@ -97,8 +97,11 @@ Sending privdata (73139 bytes) to kite.kitenet.net ... done > > > > > > I added debug dumping to gitPushHelper, and it seems to be -> > reading the same truncated data, so it seems ok. +> > reading the same truncated data, so it seems the problem is not there. > > > > Just after the gitPushMarker is sent, I made it read > > a line from stdin, and it got the first line of the protocol. -> > +> > So the data is being sent over the ssh connection ok, and +> > the mangling must happening after that point and before gitPushHelper. +> > ... Could it be that git fetch itself is eating some of stdin? Or +> > that "propellor --gitpush" is before it runs gitPushHelper? -- cgit v1.3-2-g0d8e From 8c24ee55c79b0bdbd82e284eae71c4701209afa3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Jun 2017 17:36:17 -0400 Subject: propellor spin --- doc/todo/spin_failure_HEAD.mdwn | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/todo/spin_failure_HEAD.mdwn b/doc/todo/spin_failure_HEAD.mdwn index 981e775c..ad90be2e 100644 --- a/doc/todo/spin_failure_HEAD.mdwn +++ b/doc/todo/spin_failure_HEAD.mdwn @@ -103,5 +103,16 @@ Sending privdata (73139 bytes) to kite.kitenet.net ... done > > a line from stdin, and it got the first line of the protocol. > > So the data is being sent over the ssh connection ok, and > > the mangling must happening after that point and before gitPushHelper. -> > ... Could it be that git fetch itself is eating some of stdin? Or -> > that "propellor --gitpush" is before it runs gitPushHelper? +> > +> > Aha! The problem seems to come from using dup and closing stdin! + + req NeedGitPush gitPushMarker $ \_ -> do + hin <- dup stdInput + hout <- dup stdOutput + hClose stdin + hClose stdout + +> > A line read from stdin just before the dup gets the first line of the protocol +> > as expected. A line read from hin afterwards does not. Could +> > it be that multiple lines get read from stdin and buffered, and +> > so are not available in the dupped handle? -- cgit v1.3-2-g0d8e From 3f6f91b4699978b0fa1cb2e64fac86483c55c038 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Jun 2017 17:38:03 -0400 Subject: propellor spin --- doc/todo/spin_failure_HEAD.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/todo/spin_failure_HEAD.mdwn b/doc/todo/spin_failure_HEAD.mdwn index ad90be2e..1fbd8688 100644 --- a/doc/todo/spin_failure_HEAD.mdwn +++ b/doc/todo/spin_failure_HEAD.mdwn @@ -104,7 +104,7 @@ Sending privdata (73139 bytes) to kite.kitenet.net ... done > > So the data is being sent over the ssh connection ok, and > > the mangling must happening after that point and before gitPushHelper. > > -> > Aha! The problem seems to come from using dup and closing stdin! +> > Aha! The problem seems to have to do with the dupping of stdin. req NeedGitPush gitPushMarker $ \_ -> do hin <- dup stdInput @@ -114,5 +114,4 @@ Sending privdata (73139 bytes) to kite.kitenet.net ... done > > A line read from stdin just before the dup gets the first line of the protocol > > as expected. A line read from hin afterwards does not. Could -> > it be that multiple lines get read from stdin and buffered, and -> > so are not available in the dupped handle? +> > is be a handle buffering issue? -- cgit v1.3-2-g0d8e