check your sunroof drain, might be plugged with leaves or dirt.
if the track around the sunroof cant drain, the water backs up into the car.
Past: 2004 S60R 6MT
Past: 2007 E90 335i 6MT
Past: 2010 335xi ZMP, MPPK, MPE
Past: 2013 335i 6MT ZMM/ZDH/ZTP/3AG/494/508
Present: 2016 F34 335i xDrive ZCW/ZDA/ZDH/ZTP/ZMP/2V5/5DL