git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] transport-helper: report errors properly

From
Thomas Rast <trast@inf.ethz.ch>
Date
Apr 9, 2013, 21:38 UTC
Message-ID
<87ip3v1j2a.fsf@hexa.v.cablecom.net>
In-Reply-To
<1365432004-20132-1-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 5 quoted lines
> If a push fails because the remote-helper died (with fast-export), the
> user won't see any error message. So let's add one.
>
> At the same time lets add tests to ensure this error is reported, and
> while we are at it, check the error from fast-import
[...]
Show 10 quoted lines
> +# We sleep to give fast-export a chance to catch the SIGPIPE
> +test_expect_success 'proper failure checks for pushing' '
> +	(GIT_REMOTE_TESTGIT_FAILURE=1 &&
> +	export GIT_REMOTE_TESTGIT_FAILURE &&
> +	cd local &&
> +	test_must_fail git push --all 2> error &&
> +	cat error &&
> +	grep -q "Reading from remote helper failed" error
> +	)
> +'

There appears to be a race in the version that is in today's pu (5eb25f737b). I reproduced with this:

  cd git/t
  i=1
  while ./t5801-remote-helpers.sh --root=/dev/shm --valgrind
  do
    i=$(($i+1))
  done

Two out of six of these loops quit within 1 and 2 iterations, respectively, both with an error along the lines of:

  expecting success: 
          (GIT_REMOTE_TESTGIT_FAILURE=1 &&
          export GIT_REMOTE_TESTGIT_FAILURE &&
          cd local &&
          test_must_fail git push --all 2> error &&
          cat error &&
          grep -q "Reading from remote helper failed" error
          )
  error: fast-export died of signal 13
  fatal: Error while running fast-export
  not ok 21 - proper failure checks for pushing

I haven't been able to reproduce outside of valgrind tests. Is this an expected issue, caused by overrunning the sleep somehow? If so, can you increase the sleep delay under valgrind so as to not cause intermittent failures in the test suite?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Jeff KingNext: Jeff King
Message 5 of 31 in “transport-helper: report errors properly”
  1. transport-helper: report errors properlyFelipe Contreras, Apr 8, 2013
  2. Sverre RabbelierApr 8, 2013
  3. Jeff KingApr 8, 2013
  4. Jeff KingApr 8, 2013
  5. Thomas RastApr 9, 2013
  6. Jeff KingApr 9, 2013
  7. 0/2 reporting transport helper errorsJeff King, Apr 10, 2013
  8. 1/2 transport-helper: report errors properlyJeff King, Apr 10, 2013
  9. Sverre RabbelierApr 10, 2013
  10. Eric SunshineApr 10, 2013
  11. Felipe ContrerasApr 11, 2013
  12. Jeff KingApr 11, 2013
  13. Felipe ContrerasApr 11, 2013
  14. Jeff KingApr 11, 2013
  15. Felipe ContrerasApr 11, 2013
  16. Junio C HamanoApr 11, 2013
  17. Felipe ContrerasApr 11, 2013
  18. Junio C HamanoApr 11, 2013
  19. Felipe ContrerasApr 11, 2013
  20. Junio C HamanoApr 11, 2013
  21. Felipe ContrerasApr 13, 2013
  22. Jeff KingApr 13, 2013
  23. Felipe ContrerasApr 13, 2013
  24. Junio C HamanoApr 14, 2013
  25. Felipe ContrerasApr 14, 2013
  26. 2/2 transport-helper: mention helper name when it diesJeff King, Apr 10, 2013
  27. Sverre RabbelierApr 10, 2013
  28. Jeff KingApr 10, 2013
  29. Sverre RabbelierApr 10, 2013
  30. rhApr 10, 2013
  31. Jeff KingApr 11, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.