Stuck with LDU-factorization of a matrix where D should contain zeros I thought that L-D-U- factorization of a square matrix (L=lower triangular factor, D=diagonal factors, U=upper triangular factor) was always possible and meaningful even if I encounter zeros on the diagonal factor D. But my algorithm is not correct in that cases in that the resulting factors do not reproduce the source.
Let $$  M = \begin{bmatrix} 
    1&    2&    3&    4&    5\\
    2&    4&    6&    8&    0\\
    3&    6&    9&    2&    5\\
    4&    8&    2&    6&    0\\
    5&    0&    5&    0&    5
     \end{bmatrix}$$
which is just the top-left of the basic $10 \times 10$ multiplication-table (modulo $10$). It has full rank; but in the naive LDU-algorithm one would assign zeros to some entries of D because zeros occur in the top-left element of the intermediate matrices of the iteration. If I do that, I get LDU-components
$$\small L=\begin{bmatrix} 
 1 & 0 & 0 & 0 & 0  \\ 
 2 & 1 & 0 & 0 & 0  \\ 
 3 & 0 & 1 & 0 & 0  \\ 
 4 & 0 & 0 & 1 & 0  \\ 
 5 & 0 & 0 & 2 & 1  \\ 
 \end{bmatrix} 
 D= \begin{bmatrix} 
 1 & 0 & 0 & 0 & 0  \\ 
 0 & 0 & 0 & 0 & 0  \\ 
 0 & 0 & 0 & 0 & 0  \\ 
 0 & 0 & 0 & -10 & 0  \\ 
 0 & 0 & 0 & 0 & 20  \end{bmatrix} 
 U=\begin{bmatrix} 
 1 & 2 & 3 & 4 & 5  \\ 
 0 & 1 & 0 & 0 & 0  \\ 
 0 & 0 & 1 & 0 & 0  \\ 
 0 & 0 & 0 & 1 & 2  \\ 
 0 & 0 & 0 & 0 & 1  \\ 
 \end{bmatrix}$$
and if I put them together they don't reproduce the source M:
$$ \text{chk}=L \cdot D \cdot U = \small \begin{bmatrix} 
 1 & 2 & 3 & 4 & 5 \\ 
 2 & 4 & 6 & 8 & 10 \\ 
 3 & 6 & 9 & 12 & 15 \\ 
 4 & 8 & 12 & 6 & 0 \\ 
 5 & 10 & 15 & 0 & 5
 \end{bmatrix}$$
The problem is not, that the matrix-rank of M were not sufficient - Pari/GP gives the inverse and even the diagonalization.

Q: Can this be repaired? Can a meaningful L-D-U-decomposition be given?        

Of course, if a general argument exists why and when invertible/diagonalizable matrices cannot be LU or LDU-decomposed I'd like to learn that, too. 

You have to do this by pivoting. In the second step of the LU or LDU decomposition, your matrix becomes
M = \begin{bmatrix} 
    1&    2&    3&    4&    5\\
    0&    0&    0&    0&    -10\\
    0&    0&    0&    -10&    -10\\
    0&    0&    -10&    -10&    -20\\
    0&    -10&    -10&    -20&    -20
     \end{bmatrix}
You will then need to multiply it by a permutation matrix $P=$
 \begin{bmatrix} 
    1&    0&    0&    0&    0\\
    0&    0&    0&    0&    1\\
    0&    0&    0&    1&    0\\
    0&    0&    1&    0&    0\\
    0&    1&    0&    0&    0
     \end{bmatrix}
Then your lower triangular matrix $L_P$ becomes $PLP^{-1}$, and the $LDU$ decomposition formula is $PA=L_PDU$. Refer to this article about LU with pivoting. 
Your $L$ looks almost correct, but there isn't a $2$ in the 5th row and 4th column. The $U$ should be 
 \begin{bmatrix} 
    1&    2&    3&    4&    5\\
    0&    1&    1&    2&    2\\
    0&    0&    1&    1&    2\\
    0&    0&    0&    1&    1\\
    0&    0&    0&    0&    1
     \end{bmatrix}
And $D=$
 \begin{bmatrix} 
    1&    0&    0&    0&    0\\
    0&    -10&    0&    0&    0\\
    0&    0&    -10&    0&    0\\
    0&    0&    0&    -10&    0\\
    0&    0&    0&    0&    -10
\end{bmatrix}
