April 2011, Erik Faye-Lund wrote: > >> OK, I've read up on thread-cancellation, and this code seems correct. > >> pthread_cancel doesn't kill the thread right away, it just signals a Embed Embed this gist in your website. And then you can apply on top of that merge: [5/4]: run-command: implement abort_async for pthreads which will again break win32, as the compat wrapper doesn't implement pthread_cancel. run-command.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/run-command.c b/run-command.c index e31c073..46ea07d 100644 --- a/run-command.c +++ b/run-command.c @@ -607,7 +607,7 @@ void abort_async(struct async *async)
No error is reported in this case, because the call site in git.c expects this as a normal result. No error is reported in this case, because the call site in git.c expects this as a normal result. And obviously fixing that involves aborting the async process, too. If not, I'm not entirely sure we can even reach > this goal.
With this change, system call failures are reported immediately after the failure and only a generic failure code is returned to the caller. I'm not 100% sure why, but the bug does not manifest itself with pthreads. Read the cover letter again.
The child returned exit code 127, indicating a missing > command to exec after forking. > > We already have a silent_exec_failure flag to silence (3). > Let's convert Already have an account? Signed-off-by: Johannes Sixt
System call failures continue to be reported as negative values. We cannot implement pthread_cancel() on Windows >> because it would have to be able to interrupt blocking system calls. >> (TerminateThread() is a no-no, given all the caveats about leaking system At least they cannot be diagnosed by the parent process; all that the parent process can observe is the exit code. More hints Signed-off-by: Jeff King <[hidden email]> --- run-command.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/run-command.c b/run-command.c index 0d5626a..258c880 100644 --- a/run-command.c +++ b/run-command.c @@ -427,7
Signed-off-by: Jeff King <[hidden email]> --- This could also just be part of the merge resolution, but I thought it would be easier to see what is going on if I However, for an async implementation which forks (i.e., when we have no pthreads), that means we will waitpid() for the async process. git by Git Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. remote: Total 1 (delta 0), reused 0 (delta 0) remote: aborting due to possible repository corruption on the remote side.
So what I did was build a maint series straight on top of 38a81b4, the source of the bug: [1/4]: teach wait_or_whine a "quiet" mode [2/4]: finish_async: be quiet For example, you can trigger it with v18.104.22.168 even with pthreads, since we didn't use them for async code back then. Then I did a git push -f and got lots of: error: object directory /data/git/repositories/0/08/b4/90/j-p/sake-tasks.git/objects does not exist; check .git/objects/info/alternates. But that > would mean that we implement the equivalent of Cygwin or so...] > > But if I understand correctly what Jeff wrote so far, then the pthreaded case >
System call failures continue to be reported as negative values. März 2011, Jeff King wrote: > 1. The reason might be that with threads we carefully close file descriptors, so that the other end sees EOF or broken pipe and terminates, while with a forked sideband demux one That was my thought, too, except that: 1.
Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. In fact, this very error message is copied to the syslog if git-daemon's client aborts the connection early. Meanwhile, the async sideband demuxer will continue trying to stream data from the remote repo until it gets EOF. Reload to refresh your session.
The third one introduces abort_async, which just kill()s the forked process for the non-win32 case. In fact, this very error message is copied to thesyslog if git-daemon's client aborts the connection early. We recommend upgrading to the latest Safari, Google Chrome, or Firefox. All gists GitHub Sign up for a GitHub account Sign in Create a gist now Instantly share code, notes,
Let's convert that into a "quiet" flag to also silence (2). That's not going to happen. However, it may also be useful for us to to tell the async code to abort right away, because whatever it was doing is no longer useful. Reload to refresh your session.
You signed in with another tab or window. For example, the exit code of merge programs (e.g. Or is the source tree hosted > elsewhere? > > $ git clone git://git.collabora.co.uk/git/libnice.git > Initialized empty Git repository in /home/arc/temp/libnice/.git/ > remote: Total 0 (delta 0), reused 0 (delta 0) Reload to refresh your session.
Skip to content Ignore Learn more Please note that GitHub no longer supports old versions of Firefox. You signed in with another tab or window. With this change the error is reported by run_command, but since there is one call site in git.c that does not want that, an option is added to struct child_process, which Did you send out the wrong > version of that patch? > >> kill(async->pid, 15); >> #else >> - /* no clue */ >> +
This also adds a dummy definition of WTERMSIG. I was talking about implementing cancellation-points, just like on other platforms. Depending on what data pack-objects actually sent, the remote repo may not actually send anything (e.g., if we sent nothing and it is simply waiting for the pack). Therefore, even if callers request silent_exec_failure, they will not do their own error reporting if there is some other failure. -- Hannes -- To unsubscribe from this list: send the line
For example, the exit code of merge programs (e.g. I can do some straces and try to investigate further on what happens in the pthread case. Embed Share Copy sharable URL for this gist. This shouldn't result in signal failure being silent for existing users of silent_exec_failure, since they already will need to be checking the return code and complaining for the case of a
A lot of the CRT functions are defined as >> cancellation points, so it'll be a matter for us Win32-guys to >> implement pthread_testcancel() and inject that into the >> function-wrappers If at all, then only an unspecific error message was given. We can add an extra flag, then, or just drop both patches entirely. No error is reported in this case, because the call site in git.c expects this as a normal result.
Compressing objects: 100% (10/10), done. This better matches what happens on the Windows side, where threads are used (and what will eventually happen when pthreads are used on unix). 2. do nothing.