Page MenuHomePhabricator

Error when deleting empty global accounts
Open, Needs TriagePublic


On this thread there are a list of empty global accounts which were not deleted when SUL finalization happened. I've tried to manually delete those, but the system returns me an error. Before that, the CentralAuth page goes totally blank, and is after reloading that I get this message:

Error message:

Error: the global account ":ex::" does not exist.
There is no global account for ":ex::"

API sandox was also tried:

    "servedby": "mw1226",
    "error": {
        "code": "nosuchuser",
        "info": "User \":ex::\" doesn't exist",
        "*": "See for API usage"

However the global account is there.

There's a maintenance script at /diffusion/ECAU/browse/master/maintenance/deleteEmptyAccounts.php which I think was used to do this back in the days. There might be others with the same problem.

Btw, I think those usernames are "invalid" and should've also be renamed to Invalid username as happened to some?

Event Timeline

Restricted Application added subscribers: JEumerus, Matanya, Aklapper. · View Herald TranscriptOct 12 2016, 8:36 AM

:ex:: is now gone, but andi:: is still there for example

I've tried to delete the account via CentralAuth, but the page went blank.

::andi is now gone too. I see a pattern here: I did tried to delete those via CentralAuth, but failed. Notwithstanding it seems that the account is deleted few days later...

MarcoAurelio added a subscriber: Legoktm.EditedJan 12 2017, 12:07 AM


are the remaining ones whose global accounts are empty but weren't deleted. Shall we run /diffusion/ECAU/browse/master/maintenance/deleteEmptyAccounts.php or individual work on those two is best @Keegan @Legoktm ?

@hoo Can you do a dry run of deleteEmptyAccounts.php to see how many of those are left? Thanks.

Dereckson added a subscriber: Dereckson.EditedJan 24 2017, 12:43 PM

Dry run result


@hoo Can you do a dry run of deleteEmptyAccounts.php to see how many of those are left? Thanks.

@MarcoAurelio asked on Freenode wikimedia-operations the dry run.

The script started at 12:12 UTC and ended at 12:34 UTC.

I'd recommend to check with dba before running it in production.


We have 2 148 empty accounts.

$ script logs/T147915.log
$ mwscript extensions/CentralAuth/maintenance/deleteEmptyAccounts.php --wiki=aawiki
PROGRESS: 0 / 49140559
PROGRESS: 500 / 49140559
PROGRESS: 1000 / 49140559

PROGRESS: 49140500 / 49140559
$ ^D
$ grep -v PROGRESS logs/T147915.log > T147915-accounts-to-delete.log
$ wc T147915-accounts-to-delete.log
 2148  9785 79897 T147915-accounts-to-delete.log

The accounts list is available on Terbium at ~dereckson/data/T147915-accounts-to-delete.log.

Example accounts

These two accounts are included in the 2 148 list.

So could you explain to us what these accounts are, artefacts left after renames? Is that valuable to keep them or should we run the script to actually delete these accounts?

@Dereckson I think Marco haven't got access to terbium.

The point of SUL-Finalization was that all accounts on WMF public wikis were unified.
This caused that some accounts got renamed locally after unifying
everything, and those were left empty. Some of them were renamed to Invalid
username~1234. Without being able to check the usernames I can only guess,
but I do remember that this script was run shortly after the SUL
finalization with thousands of empty global accounts being deleted by the
User:Maintenance script (bug filled somewhere because results for that
account couldn't be queryied using the wiki logs).

I'd say that we could again delete those global accounts if they're really
empty as an empty global account makes no sense, but given that I can't see
the results and that there might be a reason for those to stay there I'd
ask @Legoktm and @hoo for their opinion before going ahead and deleting
them. If the script worked as expected in the past, then no empty global
account had to be left. If it didn't, maybe that's the reason why there are
two thousand empty accounts not deleted.

Or the worst case: the script did worked but something went wrong
afterwards and empty global accounts started to be generated. Maybe looking
at the date of those accounts we can get an idea of about when this started
to happen if this scenario is confirmed.

In any case, I insist, Kunal and Marius will know better for sure and can
advice on next steps, but it is kind of strange to find so many empty


@Urbanecm You're right, I don't.

Stinger added a comment.EditedJan 25 2017, 1:53 PM

The following accounts that I've mentioned on MarcoAurelio's talk page are now vanished (or deleted) from the CentralAuth:


"{FoM}Gurkbuster" and ": harping.mike ::" are the two remaining non-unified accounts at a Wikimedia Project that I've mentioned on MarcoAurelio's discussion page on meta. These accounts how did they vanish (or deleted) from the CentralAuth? and the 2148 restant empty accounts can be deleted or isn't possible to run this? I don't think it makes sense that a global account is completely empty, so it should be deleted, but it looks like that there is an error in the system to delete those accounts (like : harping.mike :: as an example).

Do all of the accounts have colons in their names? I wonder if that's related. I do agree that 2k invalid/empty accounts seems very weird - I suspect a bug somewhere when we made colon invalid for *new* accounts only.

Only 18 accounts have ;, 2130 doesn't.

Some accounts name are alphanumeric.

Hi. Any updates here? Thanks!

T160296 may be related. Just discovered a bunch of invalid usernames that ought not to be there.

Hi. Any updates here @Dereckson @hoo @Legoktm ? Thanks.

Restricted Application added a project: User-MarcoAurelio. · View Herald TranscriptAug 2 2017, 3:36 AM
Sau226 added a subscriber: Sau226.Oct 19 2017, 11:12 AM

Someone should get back to this if there are accounts to be deleted. Could the people pinged by marco @Dereckson @hoo @Legoktm respond to this please? If everything is fine I think 2000 strangely blank global accounts be deleted but naturally its the sysadmins' decision. If this task is done or dealt with please set the relevant flags on this task. Thanks!

I'd like to request that the script be run again, so we can know if the number of empty accounts is increasing. Also, please see if the script catches the accounts listed at T160296. @Dereckson @Legoktm @hoo - would you be able to do that? Thanks.

Sau226 added a comment.Mar 1 2018, 5:52 PM

It's been just under a month (which appears to be a reasonable time for response). Could @Dereckson @Legoktm and @hoo please attend to this task if/when they can?

hoo added a comment.Apr 4 2018, 8:07 PM
$ mwscript extensions/CentralAuth/maintenance/deleteEmptyAccounts.php --wiki=aawiki | tee deleteEmptyAccounts.php-2018-04-04
$ grep -v PROGRESS deleteEmptyAccounts.php-2018-04-04 | wc -l

This means that the number of empty global accounts increased since the last check.

The newest account I could find in the list is Mmoore11 which is 7 months old by now.

Thanks for having again a look @hoo

I think we should attach those with valid usernames and rename the ones with invalid usernames.

As for Mmoore11 it is not really empty. It has an account, but it is unnatached (why?)