Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Ten years ago, it was the third-worst mass shooting in America.

A senior at Virginia Tech, Seung-Hui Cho, killed 32 people and wounded 17 in two separate attacks on the campus.

More than a year earlier, a judge had declared him a danger because of mental illness. But that information never made it into the federal database used to check the backgrounds of gun buyers. If it had, his gun purchase would have been blocked.

The Virginia Tech shooting prompted states to dramatically step up their reporting of mental health records. And the response has been impressive: Since then, those reports have more than quadrupled.

But other factors can block a gun sale, including a felony conviction, drug addiction, or a history domestic violence. And that full range of information sent by the states and the military to the FBI, which conducts the background checks, remains frustratingly incomplete.

The Air Force is deep into an investigation of how it failed to report information that would have blocked Devin Kelley from buying the rifle he used to attack a Baptist church in Sutherland Springs, Texas.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But that's far from the only gap in the federal database used to conduct background checks.

Related: Mass Public Shootings Are Getting Deadlier, Experts Say

AR-15 rifles are on display during the Nation's Gun Show at Dulles Expo Center on November 18, 2016 in Chantilly, Virginia. Alex Wong / Getty Images file

"Let's not pretend we just woke up yesterday in amazement that the records of people who are seriously mentally ill or have been convicted of crimes aren't ending up on the background checks," Sen. Chris Murphy, a Connecticut Democrat, said during a Senate debate sessions last week.

The massive databases maintained by the FBI handle an average of 52 checks every second — 27.5 million last year, according to federal data. Roughly 120,000 gun sales, less than one percent, were blocked in 2016 because of disqualifying information in a would-be-buyer's background, the feds say.

Related: If Trump’s Blaming Mental Health, Why Did He Gut This Obama Gun-Check Rule?

The Defense Department says it's now reviewing how the military reports information to the federal databases, after the Air Force admitted it failed to flag Texas gunman Devin Kelley's conviction for domestic violence.

"The offenses for which the shooter in Texas was court-martialed should have been reported," says Air Force Secretary Heather Wilson. "We are looking at all of our databases. And if we have problems that we find, we will fix them."

It's a long-standing problem for the Pentagon, one first identified 20 years ago by the Defense Department's inspector general, who found "a high level of non-compliance with reporting requirements."

Former FBI officials say it's still a mixed picture for the states, too, with some actually unable to pass along all the data because of local laws that prohibit sharing some mental health records.

Related: Who Were the Victims of the Sutherland Springs Massacre?

But gun control advocates say the background check system remains an effective tool, blocking nearly 1.4 million gun sales since its inception in 1998.

"It's not that the system is weak. The system has a lot of records in in it. The problem is, we can't afford to have a single record missing," said William Rosen of Everytown for Gun Safety, which advocates stricter gun control.

All sides on the gun issue agree that the Texas church shooting exposed continued flaws in a system that even the NRA says is important for keeping guns out of the wrong hands.