Jannik Sinner endured a roller coaster ride - and showed his emotions - en route to a hard-fought win over Gregoire Barrere in Marseille.