Halep dropped four games in a row to blow a big lead in the second set Thursday, then briefly ran into more trouble in the third, before holding on to beat 87th-ranked Magda Linette of Poland 6-4, 5-7, 6-3.
Halep said afterward she felt a "little bit sick" and plans to "sleep all day" on Friday. She was up a set and a break at 5-3 in the second before losing her way. Halep got broken when serving for the match at 5-4 in that set, and again at 5-2 in the third.
She wasted three set points along the way, before converting her fourth when Linette netted a forehand.
Juan Martin del Potro required nearly four hours to get by Yoshihito Nishioka 5-7, 6-4, 6-2, 6-7 (5), 6-2 at the French Open.
The eighth-seeded del Potro, who improved to 8-10 in five-setters for his career, had his right ankle treated during the match.
Meanwhile, defending champion Simona Halep was heading into a third set against 87th-ranked Magda Linette.
In a career already full of milestones, Novak Djokovic passed another one in reaching the third round of the French Open: His young son watched him play at the tournament for the first time.
Luckily for Stefan Djokovic, his top-ranked father beat Henri Laaksonen 6-1, 6-4, 6-3.
Djokovic says "it's incredible that he has the patience for 1 hour and 30 minutes. That is really great."
The 104th-ranked Laaksonen was a "lucky loser" who only entered the draw when another player pulled out.
Djokovic's next opponent, 147th-ranked Salvatore Caruso of Italy, reached the main draw via the qualifying tournament.
Serena Williams advanced to the third round of the French Open by beating Kurumi Nara 6-3, 6-2 on Court Philippe Chatrier.
Nara, a Japanese player and ranked No. 238, reached the main draw at Roland Garros via the qualifying tournament. The gulf between her and 23-time major champion Williams was quickly apparent.
Williams faced no break points, served 10 aces and made 36 winners. She will next play Sofia Kenin, ranked No.35.
Dominic Thiem overcame some trickery from Kazakh opponent Alexander Bublik to advance to the third round at the French Open with a 6-3, 6-7 (6), 6-3, 7-5 victory.
Bublik surprised Thiem with an underhand serve in the first set and frustrated the Austrian with a series of drop shots, spins and volleys. But last year's finalist at Roland Garros recovered from a break of serve in the fourth set and then gave Bublik a taste of his own medicine on his first match point, producing a well-disguised — and successful — drop shot.
Thiem will next face Pablo Cuevas, another master of trick shots. Cuevas was leading 7-6 (3), 6-3, 2-1 when Kyle Edmund retired from their match because of a left knee injury.
Naomi Osaka survived another fraught match at the French Open to cling onto her quest for a third consecutive Grand Slam title.
After losing the first set and being a break down in the second, the top-ranked Osaka rallied to beat former No. 1 Victoria Azarenka 4-6, 7-5, 6-3.
Broken by a backhand volley at the net from Azarenka in the fifth game of the second set, Osaka seemed to be in deep trouble. But, as she did in a three-set win in the first round, Osaka again proved her resilience as she turned the match around on Court Suzanne Lenglen to advance to the third round.
American teenager Amanda Anisimova is proving to be a jinx at Grand Slam tournaments for Aryana Sabalenka.
After previously beating the 11th-ranked Sabalenka in the third round of the Australian Open in January, the 17-year-old Anisimova did it again in the second round of the French Open, winning 6-4, 6-2.
Anisimova, ranked No. 51, is making only her second appearance at Roland Garros. She lost in the first round in 2017.
Naomi Osaka plays Victoria Azaranka in a matchup of current and former No. 1 players in the second round of the French Open.
Also Thursday, Serena Williams is back on Court Philippe Chatrier against Japanese qualifier Kurumi Nara.
In men's action, top-ranked Novak Djokovic faces 104th-ranked Henri Laaksonen, a "lucky loser" who only entered the draw when another player pulled out.
Osaka is aiming to win her third consecutive Grand Slam tournament, while at No. 43 Azarenka is still working her way back into the upper echelons of the game after a series of injuries, a pregnancy and a custody battle over her child.
A two-time winner of the Australian Open, Azarenka's best result at Roland Garros was a run to the semifinals in 2013.
More AP Tennis: https://apnews.com/apf-Tennis and https://twitter.com/AP_Sports