Astronomy & Astrophysics manuscript no. (will be inserted by hand later) Formation of contact in massive close binaries