An attendee inspects a revolver during the 2013 NRA Annual Meeting and Exhibits at the George R. Brown Convention Center on May 3, 2013, in Houston. (Justin Sullivan/Getty Images)

In most states, you cannot have guns if you’re a felon, or if you have been committed for mental illness. Many also prohibit gun ownership by domestic violence offenders or drug abusers.

You’re supposed to get rid of your guns if you fall into any of these categories. If the police later catch you with one, they can charge you with illegal possession, which should serve as a deterrent. But rarely will officers come knocking on your door asking you give up your firearms.

Except in California, which operates an expensive and unique program to track down illegally-owned guns. The state checks its records to find registered gun owners who have been convicted of felonies or domestic violence crimes, or who have been flagged as being mentally unstable. Roving teams of armed agents in bulletproof vests visit the homes of such people to make sure they have surrendered their guns.

This is a slow, painstaking process, and it has fallen behind in recent years. After the Sandy Hook shooting in 2013, lawmakers gave the gun seizure program a $24 million infusion to fund more agents to knock on more doors. The goal was to investigate every one of the 20,000-some people who remained on the illegal gun owner list.

Two years later, the state has barely made a dent in the backlog.

In March, California’s Department of Justice released its first report on the initiative. At the end of 2014, 17,479 people remained in the illegal gun owner database, down from 21,249 people at the year’s start. About 34,868 registered firearms still are believed to be in the hands of people who are not allowed to own them.

Part of the problem is that it is hard to keep up with the new people being added to the list all the time. Last year, agents conducted 7,573 investigations and seized 3,286 firearms. At the same time, 7,031 gun owners were newly flagged. The state has hired 18 additional agents to bolster its 33-person unit, and has been trying to staff up more.

The results so far are simply not good enough, say Republican members of the state Senate, who note that 40 percent of the $24 million has already been spent. They are seeking an oversight hearing to investigate where all the money went and why the backlog is still so large.

Gun rights advocates, meanwhile, have criticized the program for a different reason. They are concerned that California’s investigations into illegal gun owners might catch innocent people in the dragnet.

It’s true that the state has made mistakes. In November 2013, for instance, agents confiscated several guns from Michael Merritt, who showed up in the database with a felony conviction for pot possession from the 1970s. Later, the agents discovered that Merritt’s case had been a misdemeanor. They returned the guns a few weeks later.

“It’s a loss of your liberty, of your rights,” Merritt told a Bakersfield TV station. “I almost passed out when they said they wanted all my guns.”

The National Rifle Association’s lobbying group claims that, furthermore, most of the people targeted by the gun sweeps aren’t violent criminals. They are “good people who were unwittingly prohibited from firearm possession and typically don’t even know of their prohibited status or that they may be violating the law,” the group says.

California hasn’t issued breakdowns of why the 17,000-plus people on its list are prohibited from owning guns. Aside from felons, these could be people who committed crimes of domestic violence, or who have been treated for mental health problems.

Such restrictions are popular. A 2013 poll published in the New England Journal of Medicine found that 74  percent of Americans support a 10-year gun ban for domestic violence offenders. Only 32 percent agree that mentally ill people should have a way to get their gun rights back “if they are determined not to be dangerous.”

Most states are not proactive in disarming people who have lost their gun rights. Some will order people convicted of disqualifying crimes to turn in their firearms. A few allow police officers to temporarily confiscate guns at scenes of domestic violence. Judges can also issue warrants to seize guns if they believe someone poses an imminent risk.

New York has started keeping a list of mentally unstable people who should not own guns. If it turns out one of those people has a gun permit, local law enforcement officers can contact them.

But California is special in that it has fully linked its gun ownership database with its criminal and mental health databases, and has a state force dedicated to collecting illegal firearms. Though it has had trouble investigating all the gun owners who have lost their gun rights, it at least knows who they are. Most states don’t.

Last year, after a mall shooting in Columbia, Maryland tried to create a similar database. Instead of relying on people to surrender their guns, HB 623 would have required state police to identify and notify illegal gun owners by cross-checking criminal and gun ownership records. That’s currently very hard to do.

“There is no way state police unless they luck out, or get a tip, can on a systematic basis notify that person you must surrender your gun or face serious consequences,” state Del. Luiz Simmons (D) told American University Radio. The bill failed.