We know that our brain is sort of probabilistic, pattern-matching engine that interprets patterns all around itself, and building a large image of environment where the body resides. Considering that, conscious process is a delicate and complex process occurring inside one's brain, and the brain can render the world beyond one's body (their environment) while maintaining autonomous functions and coordinating body parts to manipulate its environment. I wonder about its capability on understanding it itself.
Consider that one is trying to diagnose flaws in their conscious process, using simple logic-check and cognitive tests they created themselves (or any test that I might not be aware of).
Is it possible for them to accomplish it? If they do, how would they accomplish it?
Basically I'm asking how would one know that their brain isn't working the way it is supposed to?
EDIT: To emphasize, this question is specifically asking how would someone detects flaw in his/her own mind, all by him/herself