View Issue Details

IDProjectCategoryView StatusLast Update
0001477Anope Development (1.9.x series)Chanservpublic2013-02-09 20:28
ReporterRaphael Assigned ToAdam  
Status closedResolutionfixed 
Summary0001477: Deleted user appears on Access List after the services restarted or turned off and turned on
DescriptionAn 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.
Steps To Reproduce/chanserv access #channel del nickname

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

/chanserv access #channel list
Additional InformationAnope-1.9.8-may-cause-insanity :InspIRCd 2.0 - (enc_sha1) -- build 0000002, compiled 08:17:20 Dec 30 2012, flags DG
TagsNo tags attached.



2013-02-09 20:28

administrator   ~0006353

Your steps to reproduce shows you sigkilling services and then complaining that they lost data.


2013-02-09 18:10

reporter   ~0006351

Thanks Adam. After we will update the services and test it.


2013-02-09 18:08

reporter   ~0006350

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

administrator   ~0006349

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

reporter   ~0006348

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

developer   ~0006346

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

reporter   ~0006345

And how the Anope is recovering the data when it was deleted?


2013-02-09 16:13

developer   ~0006344

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

reporter   ~0006343

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

developer   ~0006341

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.

Issue History

Date Modified Username Field Change
2013-02-09 15:39 Raphael New Issue
2013-02-09 16:02 jobe Note Added: 0006341
2013-02-09 16:10 Raphael Note Added: 0006343
2013-02-09 16:13 jobe Note Added: 0006344
2013-02-09 16:18 Raphael Note Added: 0006345
2013-02-09 16:22 jobe Note Added: 0006346
2013-02-09 16:58 Adam Status new => closed
2013-02-09 16:58 Adam Resolution open => invalid
2013-02-09 17:36 Raphael Note Added: 0006348
2013-02-09 17:36 Raphael Status closed => feedback
2013-02-09 17:36 Raphael Resolution invalid => reopened
2013-02-09 18:05 Adam Note Added: 0006349
2013-02-09 18:08 Raphael Note Added: 0006350
2013-02-09 18:08 Raphael Status feedback => new
2013-02-09 18:10 Raphael Note Added: 0006351
2013-02-09 20:28 Adam Note Added: 0006353
2013-02-09 20:28 Adam Status new => closed
2013-02-09 20:28 Adam Assigned To => Adam
2013-02-09 20:28 Adam Resolution reopened => fixed