Boeing Co. could take as long as three months to fix the latest software glitch on its 737 Max, discovered when a U.S. government pilot doing simulator tests experienced a lag in an emergency response because a computer chip was overwhelmed with data, people familiar with the matter said.

The finding is what prompted Wednesday’s announcement by the Federal Aviation Administration that it had detected a new safety issue on the plane, said a person familiar with the issue. Boeing’s best-selling jet has been grounded since March after suffering two crashes in a five-month span.

The planemaker maintains that a software patch will be sufficient to address the issue. However, the FAA isn’t yet sure whether a more complex and expensive hardware fix will be required, said the person, who wasn’t authorized to discuss the matter and asked not to be identified.

Estimates for how long it will take to address the issue range from a few weeks to three months, the person said Thursday. Another person familiar with the matter said it could take two to three months, but not longer.

Boeing has begun notifying customers and others with a stake in the 737 Max’s future that it anticipates it can address the issue as well as a broader software redesign, and return the plane to service in a September time frame, according to a person familiar with the manufacturer’s talking points.

The shares fell 2.9% to $364.02 at the close of trading in New York, the biggest decline in six weeks. The drop was the largest among the 30 members of the Dow Jones Industrial Average.

Catastrophic Category

In the latest setback, the FAA discovered that when the tail panel that adjusts the nose up and down moves on its own—a failure known as a runaway trim—the flight computer could impede a pilot’s response.

One of the first steps in such a failure is to use thumb switches on the control column to counter the movement. A pilot attempted that maneuver during the recent simulator test and found that because of the computer issue, the manual electric trim switches didn’t immediately respond.

That could lead the plane to enter a dive that would be difficult to recover from. The FAA pilot categorized it as catastrophic, which means it could result in a crash.

The problem occurred during a scenario that commercial pilots are highly unlikely to encounter, and doesn’t involve the flight-control software linked to the two 737 Max crashes, according to one of the people. However, the resulting diving motion created by the runaway trim was similar to the problem faced by the Lion Air and Ethiopian Airlines pilots on the flights that went down.

Elwell Briefing

The FAA’s acting Administrator, Daniel Elwell, provided a briefing on the latest issue to Representative Peter DeFazio, the Oregon Democrat who heads the Transportation and Infrastructure Committee.

“FAA test pilots, Boeing gave them data about this chip and then the FAA test pilot felt that the plane did not respond properly,’’ DeFazio said, relaying the contents of the discussion.

“Then the FAA test pilot simulated a problem with the chip or the software,” DeFazio said. “They’re not sure it’s the chip, it may be the software that relates to the chip. They’re not 100% positive. But it’s probably.’’

The new flaw involving the Max makes it increasingly likely that the single-aisle jet won’t resume flights before the fourth quarter, analyst Sheila Kahyaoglu of Jefferies said in a report to clients Thursday. She now estimates Boeing will deliver 236 of the 737 Max this year, down from a previous forecast of 362 of the aircraft.

All told, the after-effects of the Max grounding and likely lengthier recertification of Boeing’s next new jet, the 777X, could cost Boeing $13 billion or $23 a share over the next four years, Kahyaoglu estimates.

Boeing said Wednesday that the company agreed with the FAA finding and was addressing the issue as well as a broader software redesign that’s been underway for eight months.

The 737 Max has been grounded worldwide since March 13, days after the second crash. The latest issue didn’t involve the Maneuvering Characteristics Augmentation System linked to the two accidents, which killed 346 people. But the newly discovered flaw could lead to an uncommanded dive similar to what occurred in the crashes, according to people familiar with the issue.

The FAA and an independent Technical Advisory Board have been reviewing Boeing’s software fix in multiple sessions in a special Boeing simulator that is designed for engineering reviews.

Boeing hasn’t presented its final proposed fix to FAA for approval. Before it can do so, it has to conduct a final test flight with FAA pilots.