Dual-chamber furnace