  We observed the field of the Fermi source 3FGL J0838.8-2829 in optical and
X-rays, initially motivated by the cataclysmic variable (CV) 1RXS
J083842.1-282723 that lies within its error circle. Several X-ray sources first
classified as CVs have turned out to be gamma-ray emitting millisecond pulsars
(MSPs). We find that 1RXS J083842.1-282723 is in fact an unusual CV, a
stream-fed asynchronous polar in which accretion switches between magnetic
poles (that are $\approx$120$^{\circ}$ apart) when the accretion rate is at
minimum. High-amplitude X-ray modulation at periods of 94.8$\pm$0.4 minutes and
14.7$\pm$1.2 hr are seen. The former appears to be the spin period, while
latter is inferred to be one-third of the beat period between the spin and the
orbit, implying an orbital period of 98.3$\pm$0.5 minutes. We also measure an
optical emission-line spectroscopic period of 98.413$\pm$0.004 minutes which is
consistent with the orbital period inferred from the X-rays. In any case, this
system is unlikely to be the gamma-ray source. Instead, we find a fainter
variable X-ray and optical source, XMMU J083850.38-282756.8, that is modulated
on a time scale of hours in addition to exhibiting occasional sharp flares. It
resembles the black widow or redback pulsars that have been discovered as
counterparts of Fermi sources, with the optical modulation due to heating of
the photosphere of a low-mass companion star by, in this case, an as-yet
undetected MSP. We propose XMMU J083850.38-282756.8 as the MSP counterpart of
3FGL J0838.8-2829.
