https://bz.mercurial-scm.org/show_bug.cgi?id=5658
Bug ID: 5658 Summary: I/O error writing to stdout/stderr can lead to abandoned transactions Product: Mercurial Version: 4.2.2 Hardware: All OS: All Status: UNCONFIRMED Keywords: regression Severity: bug Priority: urgent Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: gregory.sz...@gmail.com CC: mercurial-devel@mercurial-scm.org Upon upgrading various servers at Mozilla from 4.1.2 to 4.2.2, we started seeing a number of abandoned transactions on the server. This appears to occur with both SSH and HTTP servers. I believe e9646ff34d55 and 1bfb9a63b98e are to blame. Before those changesets, various IOError during ui._write_err() and ui.flush() were ignored. After those changesets, they get converted into exceptions. What I think is happening is something like this: 1) Client connects 2) Transaction opened on server 3) Client disconnects via ^C 4) Server-side process keeps going or triggers a KeyboardInterrupt, which causes the transaction to unwind 5) `self.report(_("transaction abort!\n"))` from transaction._abort (or any other write or flush on ui) attempts to write to a pipe that has disappeared, triggering IOError. 6) Post e9646ff34d55 and 1bfb9a63b98e, the IOError/StdioError is unhandled by transaction.py, leading to an orphaned journal file and abandonded transaction errors Essentially, the underlying bug is that IOError on stdout and stderr interfere with transaction semantics. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel