# ROBUST believes offline user is online.

User Valerie Nirvana is unable to log in, and upon login receives an error saying she is already logged in.



With only myself logged in to the grid, ROBUST reports (through 'show grid users online') that there are two users currently online.



00:22:29 - [LLOGIN SERVICE]: Login failed for Valerie Nirvana, reason: already logged in

---

Perhaps ROBUST could use a force logout or force user offline thing?

More to the point, however, this shouldn't be happening.

---

reported=2019-08-11 00:26:59

reporter=Taylor

priority=high

category=Bug

severity=major

resolution=fixed

---

2019-08-11 10:19:59 onefang: This is a known problem called "ghosted avatar".  With SL there's about half a dozen ways of telling if someone is online, and they all disagree. It's even documented. OpenSim might have one or two more.



In Valarie's case, there are four database tables that suggested she may or may not be online.  Presence said she is online, but not in any region.  GridUser gave a login time that was before her logout time, which implies she's logged out.  hg_traveling_data said she's currently hypergridding to nowhere, 10 times.  tokens said she had logged on "recently" and had an authentication token, but doesn't track if she's online now.



I cleared her out of Presence, hg_traveling_data, and tokens.  Hopefully that does the trick.



I'll leave this issue open, coz yeah things need to be fixed.

---

2019-08-11 10:33:47 onefang: The "kick user" command should clear people out of Presence and hg_traveling_data, perhaps tokens as well.



Also it shouldn't be happening in the first place, though that might be very hard to track down, as it only happens rarely.  On the other hand it seems to happen often to Smoothie in IG, so maybe it's some sort of client side issue triggering it?



---

2019-08-12 18:06:46 onefang: The "kick user" command has a --force option.  In the typical "ghosted avatar" case, the avatars record in the Presence table says they are not in any sim at all.  The "kick user" command only checks for user matches with the users in that particular sim.  



The sim console "kick user" command is per sim, so the owners of sims (if they are running external to the grid like my test sims in MG) are the ones that get to choose who to kick.



So as things stand, there's no point modifying the sim "kick user" command, even with the --force option, to make sure the Presence table is cleared of their record, they are not "in" the sim anyway, so wont match.



ROBUST has no kick user command.  It should have one.  It's not something I want to add to 0.9.0.1 though.  Too much work and I'm trying to get this thing released.



I used to have a script that runs once an hour, which checked for these "ghost avatars" and clears out the Presence table.  It also added people to the grid support group, a function I have now moved to OpenSim_SC itself.  That script stopped working after an upgrade ta PHP, it was written in PHP.  I'm tempted to just rewrite that part of the script in some other language.

---

2019-08-12 22:22:39 onefang: What are your thoughts Taylor?  Just clear out ghosts regularly the way I did long ago?

---

2019-08-13 00:18:53 Taylor: For the immediate future, giving me a way to clear out the ghosts?

Or check for ghosts every 10 minutes, and clearing them out automatically?



Both are still work-arounds, and don't address the (unknown) cause.



I will continue to monitor Valerie's logins now she's changed to FireStorm 5.1.7, but seeing Smoothie Girl has these issues on Singularity, I'm not terribly confident right now.

---

2019-08-13 15:13:23 onefang: I've had a better idea.  At the point where it's about to say "You are already logged on" it should check for a ghost, remove the ghost if found, then just let them logon.  I'll have to double check they are not out hypergridding.  It will have to print a "ghost avatar exorcised" warning / error message on the console.



Still a work around, but it doesn't happen often enough, under conditions I can control enough, to hunt down the real bug.  And considering everything will get rewritten for SledjHamr eventually, slapping another bandaid on this OpenSim thing that is held together by gum and hope, is my preferred method of dealing with this.



---

2019-08-14 16:20:13 onefang: There should be a "not really fixed, but worked around" status.



Not yet tested for HGers.
