Code review comment for lp:~sergei.glushchenko/percona-server/ST30462-bug925343-5.5

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Sergei,

I don't understand this fix. It is correct that a socket I/O operation is not automatically restarted if socket timeouts are used and when the operation is interrupted by a signal handler. However, we don't use SA_RESTART, so the network code does not rely on that behavior. Otherwise the server might crash on signals as well.

Furthermore, the fix removes the mysql.cc signal handler, but the comments suggest that handler will be called from the _readline_ handler. It is also described in the readline docs:

"Readline contains an internal signal handler that is installed for a number of signals (SIGINT, SIGQUIT, SIGTERM, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU). When one of these signals is received, the signal handler will reset the terminal attributes to those that were in effect before readline() was called, reset the signal handling to what it was before readline() was called, and resend the signal to the calling application.
"

So:

- what was really the reason of the crash. Revision comments say nothing on that.
- even if we remove mysql's own signal handler for SIGWINCH, there are other signal handlers installed by both mysql.cc and readline. Following the explanation form the revision comments, those may also result in a crash?

review: Needs Information

« Back to merge proposal