Yahoo reported a loss in the second quarter, hurt by one-time expenses as well as traffic acquisition costs. Total revenues climbed 15 percent from a year ago, largely offset by traffic costs, even as growth was seen in the areas of display, mobile and social.