The vectors b and x cannot be the same. I.e., one cannot
call MatSolve(A,x,x).
Notes
Most users should employ the simplified KSP interface for linear solvers
instead of working directly with matrix algebra routines such as this.
See, e.g., KSPCreate().