Updated from 9:08 a.m. EDT

Red Hat's

(RHAT)

shares plunged Wednesday, a day after the company said sales in the third quarter may be slightly below expectations.

Red Hat forecast a third-quarter profit of 12 cents to 13 cents a share on revenue of $103.5 million to $105 million. Analysts expect 12 cents from earnings and a top line of $105.7 million.

Shares were diving $5.52, or 21%, to $20.80 in early Wednesday trading, taking the stock to its lowest level of 2006.

The Linux software developer posted a second-quarter sales spike of 52% from the year-ago quarter on strong subscription revenue, but it was offset by stock-option and merger-related expenses.

On a GAAP basis, the company earned $11 million, or 5 cents a share, on total revenue of $99.7 million. A year ago, the Raleigh, N.C., company earned $18 million, or 9 cents a share, on sales of $66.7 million.

Cash flow from operations slipped to $43.9 million from $45.8 million a year ago. On an adjusted basis backing out currency effects and JBoss revenue, billings were down from $115 million in the first quarter to $113 million.

Profit was hurt by a sharp increase in operating expenses, which rose 75% to $73.8 million from $42.2 million a year earlier. Red Hat said that because of taxes and stock compensation expenses between fiscal 2006 and 2007, net income was not directly comparable between these periods.

After adjusting for these accounting differences, non-GAAP adjusted net income for the second quarter of fiscal 2007 was $23.7 million, or 11 cents a share. This compares with non-GAAP adjusted net income of $17.7 million, or 9 cents a share, in the year-ago quarter.

Analysts polled by Thomson First Call were looking for earnings of 10 cents a share before items on revenue of $97.1 million.

CFO Charlie Peters said the just-reported quarter will likely be the "low point" of profitability and cash flow. The major culprits in the slide were a loss of productivity as salespeople and even engineers took time from their primary duties to learn about JBoss, which was acquired by Red Hat earlier this year; organizational changes, including a shift in leadership, in the Asia-Pacific area; and a higher proportion of three-year deals in which only the first year of revenue is recognized immediately.

Although revenue in the three-years deals will likely be recognized in the future, operating cash flow is hurt in the short run, because fewer dollars go to the balance sheet.

Quarterly gross margin improved to 84% from 82% in the year-ago period.

During the quarter, Red Hat closed its

acquisition of JBoss, an open-source application server company. The company said JBoss contributed $7 million in revenue in the quarter, which was somewhat better than expected, and the new unit is on track to reach its target of $22 million to $23 million in the fiscal year.