Des milliers de lignes de ce type ont soudainement commencé à apparaître sur mon fichier de log
Jun 28 15:14:14 messagerie postfix/postqueue[7222]: fatal: write error: Input/output error Jun 28 15:14:15 messagerie postfix/postqueue[7227]: fatal: write error: Input/output error Jun 28 15:14:16 messagerie postfix/postqueue[7234]: fatal: write error: Input/output error Jun 28 15:14:17 messagerie postfix/postqueue[7238]: fatal: write error: Input/output error Jun 28 15:14:18 messagerie postfix/postqueue[7243]: fatal: write error: Input/output error Jun 28 15:14:19 messagerie postfix/postqueue[7248]: fatal: write error: Input/output error Jun 28 15:14:20 messagerie postfix/postqueue[7253]: fatal: write error: Input/output error Jun 28 15:14:21 messagerie postfix/postqueue[7259]: fatal: write error: Input/output error Jun 28 15:14:22 messagerie postfix/postqueue[7263]: fatal: write error: Input/output error Jun 28 15:14:23 messagerie postfix/postqueue[7267]: fatal: write error: Input/output error Jun 28 15:14:24 messagerie postfix/postqueue[7271]: fatal: write error: Input/output error Jun 28 15:14:25 messagerie postfix/postqueue[7275]: fatal: write error: Input/output error
postfix stop/start n’y a rien fait !
Sur #postfix
Sur le serveur
root@messagerie[CHROOT][10.10.10.19] ~ # ps ax | grep bash 3882 pts/5 Ss 0:00 -bash 9155 pts/5 S+ 0:00 grep --color=always bash 14591 pts/7 Ss 0:00 -bash 14614 pts/9 Ss 0:00 -bash 14657 pts/12 Ss 0:00 -bash 14775 pts/7 S 0:00 bash 7558 ? S 0:00 bash 14786 pts/9 S 0:00 bash 14814 pts/12 S+ 0:01 bash 22057 pts/0 Ss 0:00 -bash 22149 pts/0 S+ 0:00 bash 30553 pts/1 Ss 0:00 -bash 30584 pts/1 S 0:00 bash 30763 pts/2 Ss 0:00 -bash 30797 pts/2 S 0:00 bash 30898 pts/3 Ss 0:00 -bash 30932 pts/3 S 0:00 bash root@messagerie[CHROOT][10.10.10.19] ~ #
Je détecte la ligne avec un « ? », c’est un processus qui n’est associé à aucun tty, donc potentiellement celui qui pose problème. Un petit strace pour voir un peu ce qu’il fait ?
root@messagerie[CHROOT][10.10.10.19] ~ # strace -p 7558 Process 7558 attached - interrupt to quit wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 69}], WSTOPPED|WCONTINUED, NULL) = 7238 rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0 ioctl(255, TIOCSPGRP, [7558]) = -1 ENOTTY (Inappropriate ioctl for device) rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 ioctl(255, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff0718ff00) = -1 EIO (Input/output error) rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- wait4(-1, 0x7fff0718fa9c, WNOHANG|WSTOPPED|WCONTINUED, NULL) = -1 ECHILD (No child processes) rt_sigreturn(0xffffffffffffffff) = 0 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 pipe([3, 4]) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f86b6a7d9d0) = 7240 setpgid(7240, 7240) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 close(3) = 0 close(4) = 0 ioctl(255, TIOCGPGRP, [0]) = -1 EIO (Input/output error) rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED|WCONTINUED, NULL) = 7240 rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0 ioctl(255, TIOCSPGRP, [7558]) = -1 ENOTTY (Inappropriate ioctl for device) rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 ioctl(255, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff0718ffb0) = -1 EIO (Input/output error) rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
Voilà, le Input/output error semblent venir de là. La prochaine étape a été de killer tous les process bashs que j’avais créé le matin.