Anope Bug Tracker - Anope Development (1.9.x series)
View Issue Details
0001477Anope Development (1.9.x series)Chanservpublic2013-02-09 15:392013-02-09 20:28
0001477: Deleted user appears on Access List after the services restarted or turned off and turned on
An error occurs on my network. I see some removed nicknames "reappearing" on the ChanServ access list, when the services were restarted or turned off and turned on.
/chanserv access #channel del nickname

** on server: ps x
** on server: kill -9 pid (services pid)
** on server: ./services

/chanserv access #channel list
Anope-1.9.8-may-cause-insanity :InspIRCd 2.0 - (enc_sha1) -- build 0000002, compiled 08:17:20 Dec 30 2012, flags DG
No tags attached.
Issue History
2013-02-09 15:39RaphaelNew Issue
2013-02-09 16:02jobeNote Added: 0006341
2013-02-09 16:10RaphaelNote Added: 0006343
2013-02-09 16:13jobeNote Added: 0006344
2013-02-09 16:18RaphaelNote Added: 0006345
2013-02-09 16:22jobeNote Added: 0006346
2013-02-09 16:58AdamStatusnew => closed
2013-02-09 16:58AdamResolutionopen => @100@
2013-02-09 17:36RaphaelNote Added: 0006348
2013-02-09 17:36RaphaelStatusclosed => feedback
2013-02-09 17:36RaphaelResolution@100@ => reopened
2013-02-09 18:05AdamNote Added: 0006349
2013-02-09 18:08RaphaelNote Added: 0006350
2013-02-09 18:08RaphaelStatusfeedback => new
2013-02-09 18:10RaphaelNote Added: 0006351
2013-02-09 20:28AdamNote Added: 0006353
2013-02-09 20:28AdamStatusnew => closed
2013-02-09 20:28AdamAssigned To => Adam
2013-02-09 20:28AdamResolutionreopened => fixed

2013-02-09 20:28   
Your steps to reproduce shows you sigkilling services and then complaining that they lost data.
2013-02-09 18:10   
Thanks Adam. After we will update the services and test it.
2013-02-09 18:08   
This method I put just to explain that the services was down (probably crashed)... I didn't do that (kill -9).
2013-02-09 18:05   
This was probably fixed a few days ago in, [^] however your method of "shutting down" services via a sigkill is dumb because it doesn't give services the chance to save anything, they just immediately go down (and you will lose some things if you continue to kill services with kill -9).
2013-02-09 17:36   
But... i deleted the user some days ago and yesterday the services crashed. And when the services returned I saw the user again on access list of the channel.
2013-02-09 16:22   
That's because Anope hadn't had chance to save the changes to the database storage. Meaning that when Anope was started again the un-updated database was loaded.
2013-02-09 16:18   
And how the Anope is recovering the data when it was deleted?
2013-02-09 16:13   
If by fell you mean crashed, then there is nothing you or we can do to make sure Anope is able to save it's databases in that situation.
2013-02-09 16:10   
In effect the service fell, I just put "kill -9" to report that it was off. So cancel the "kill -9" and note only that it fell.
2013-02-09 16:02   
You should NOT be using kill -9 to shutdown Anope properly.

The prescribed "safe" methods to shutdown (and restart) Anope properly and allow it to save its database are:
1) /msg OperServ shutdown or /msg OperServ restart
2) ./anoperc stop or ./anoperc restart
3) kill -15 <pid>
4) kill -TERM <pid>

The reason you are experiencing the issue you are reporting is because kill -9 does NOT allow Anope to handle the shutdown gracefully, preventing it from saving its databases.

It is worth noting that in general on *nix operating systems, "kill -9 <pid>" should ONLY be used as a LAST resort when a process fails to respond to a regular kill request.