  Conic linear programs, among them semidefinite programs, often behave
pathologically: the optimal values of the primal and dual programs may differ,
and may not be attained. We present a novel analysis of these pathological
behaviors. We call a conic linear system $Ax <= b$ {\em badly behaved} if the
value of $\sup { < c, x > | A x <= b }$ is finite but the dual program has no
solution with the same value for {\em some} $c.$ We describe simple and
intuitive geometric characterizations of badly behaved conic linear systems.
Our main motivation is the striking similarity of badly behaved semidefinite
systems in the literature; we characterize such systems by certain {\em
excluded matrices}, which are easy to spot in all published examples.
  We show how to transform semidefinite systems into a canonical form, which
allows us to easily verify whether they are badly behaved. We prove several
other structural results about badly behaved semidefinite systems; for example,
we show that they are in $NP \cap co-NP$ in the real number model of computing.
As a byproduct, we prove that all linear maps that act on symmetric matrices
can be brought into a canonical form; this canonical form allows us to easily
check whether the image of the semidefinite cone under the given linear map is
closed.
