On Wed, Sep 09, 2015 at 01:56:26PM -0700, Junio C Hamano wrote: > * ti/glibc-stdio-mutex-from-signal-handler (2015-09-04) 1 commit > (merged to 'next' on 2015-09-08 at c8047ba) > + pager: don't use unsafe functions in signal handlers > > Allocation related functions and stdio are unsafe things to call > inside a signal handler, and indeed killing the pager can cause > glibc to deadlock waiting on allocation mutex as our signal handler > tries to free() some data structures in wait_for_pager(). Reduce > these unsafe calls. > > I seem to recall Peff had other ideas? Let's revisit this in the > next cycle. Yeah, I'm hoping to do a pass soon over all of the signal handling code, because the problem exists elsewhere, too. I don't mind if this makes it into v2.6.0 and I build on top, though. It seems like an obvious strict improvement to me. I did wonder if we needed to deal with any fallout from f4c3edc (vreportf: avoid intermediate buffer, 2015-08-11). That _is_ new in this release, so regressions are fair game during the -rc period. I don't think it should matter, though. Though it does add an fflush(), it is replacing an existing fprintf(), and both should be taking the same lock on stderr (so it probably _is_ still a potential problem, but not a new one). The predecessor commit, 3b331e9, does convert a write() into an fprintf(), but this code path is used only in a newly-forked child process before it execs. I think that is OK, though; we are operating on a newly created filehandle that is not used anywhere else. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html