What killed Sun wasn't just aimless dicking around, it was the endless cycle of purchasing companies that had stuff they were missing, then laying off all of the top-paid employees — the ones who understood the products they'd just bought. Then they failed at an iteration of their Ultrasparc processor, it took them so long that by the time it came to market it would have been old and slow, so they skipped it. They never recovered in the land of single-thread performance, instead optimizing for the kind of workload which was already at the time increasingly being handled by cheap x86 clusters. This was an obvious road to destruction, and many of us pointed this out at the time, not that anyone expected Sun to listen to the people in the trenches by that time when they had proven conclusively that they were interested in no such thing.
Solaris provided only two innovative features probably ever: containers and ZFS. Both were too little too late to save Sun, and ZFS got open-sourced anyway, eliminating any potential competitive advantage.