Last time around, oil refiner Valero Energy (NYSE: VLO) saved up its earnings surprise for the big day. With gloomier news to tell, Valero gave investors plenty of time to prepare for the worst, issuing an earnings warning back in March.

That interim update softened the 72% body blow to operating income, but it still stings -- especially considering that over a fifth of operating income came from a one-time insurance gain. If you're wondering how a company that refines and sells gasoline could have such a lousy quarter, trust me -- Valero, Frontier Oil (NYSE: FTO), and the rest of the refiners feel your pump pain.

Refiners have to buy the oil they refine, so when oil prices rise faster than those of Valero's products, the company's profitability gets pinched. For the quarter, per-barrel margins contracted 8% since the prior quarter. This wasn't the only thing throwing profits out of whack, though. Throughput was also down as a result of various refinery outages, and rising natural gas costs drove expenses higher.

Valero's clearly not in love with all of its refineries. The facility in Aruba is on the brink of being sold to Petrobras (NYSE: PBR), and three more are on the block. Tesoro (NYSE: TSO) and Leucadia National (NYSE: LUK) are reported to have bid on a pair of inland refineries, though nothing's been agreed upon.

The latter company, helmed by a duo of master investors, has been making significant moves in natural resources lately, with large investments in both an Australian iron ore project and Argentine agricultural attraction Cresud (Nasdaq: CRESY). The fact that these fellows are making moves on Valero's scraps should tell you something about the value of the rest of the enterprise.

Petrobras is an Income Investor selection, and Cresud is a Global Gains pick. Give any of our refined newsletters a spin, free for 30 days.

Fool contributor Toby Shute doesn't have a position in any company mentioned. The Motley Fool has a disclosure policy.