Four of the shots that cops fired at a madman waving a knife in Midtown failed to penetrate his jacket — which was not bulletproof — and the NYPD will now check the weapons for malfunction, law enforcement sources told The Post.

“The bullets we have may be defective and that’s very disturbing,” one source said. “When we fire our weapons, we want to make damn sure that our bullets hit our target — neutralizing our target.”

A sergeant and an officer fired a total of nine rounds at 46-year-old Garry Conrad on Wednesday, with one of the shots killing the depressed Broadway stagehand who refused to drop the blade at West 49th Street and Eighth Avenue.

Four of the bullets got lodged in Conrad’s Carhartt jacket, sources said, adding that he was not wearing a bulletproof vest.

Another shot grazed the wrist of bystander Lauran Code, a 46-year-old lingerie designer from California.

Sources said the incident does not appear to be a pattern, but the 9mm guns used by the officers are going to be checked for malfunctions.

John Cerar, a retired NYPD deputy inspector who headed the department’s Tactics and Firearms Section from 1985 through 1994, said the incident was difficult to fathom.

“I have not heard anything like this. There would be no reason for it,” Cerar said. “There would have to be some kind of defect. I would certainly look at the ammunition.”

Cerar noted that he recalled one incident in the 1970s in which the target of a police shooting escaped injury when one bullet struck his leather jacket and was somehow deflected, failing to wound the man.

“It was just an anomaly,” he recalled of that incident.

“An anomaly is one thing, but four anomalies is another thing entirely,” Cerar said, referring to the four bullets that never penetrated Conrad.

Cerar added that “there could be a defect in the weapon” of some sort, but a “defect in the ammunition” was more likely.

He insisted that an investigation into the matter is imperative. “It sounds like a problem and should be looked into.”