Skip to content
This repository was archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-234283] Flaw in the new llGetAgentInfo() and the AGENT_AUTOMATED constant #11239

Closed
1 task
sl-service-account opened this issue Aug 19, 2023 · 11 comments
Closed
1 task

Comments

@sl-service-account
Copy link

sl-service-account commented Aug 19, 2023

What just happened?

I recently submitted a bug report about this but it was closed because it wasn't understood (jira.secondlife.com/browse/BUG-234064).

llGetAgentInfo(AGENT_AUTOMATED) is supposed to return only agents that are registered as scripted agents, but it also returns too many that are not registered as such.

It uses bit 15 (if I remember correctly) as a scripted agent flag, but that bit is being used, or has been used in the past, for something else, and it is sometimes set even though the agent is not registered as scripted.

Since my previous jira on this bug, I've logged in 5 or 6 avatars, 2 of which are always returned as scripted agents, even though they are not. It is quite a large percentage.

It is bug in the system, and nothing to do with the agents/accounts. I can only imagine that the person who programmed the AGENT_AUTOMATED option wasn't aware that the bit used was already allocated to something else.

What were you doing when it happened?

Writing a script.

What were you expecting to happen instead?

I expected AGENT_AUTOMATED to return actual scripted agents and not some that are not registered as such.

Other information

I have 2 avatars/accounts that are not registered as scripted agents but are always returned as scripted agents. They can be used for testing.

Links

Related

Original Jira Fields
Field Value
Issue BUG-234283
Summary Flaw in the new llGetAgentInfo() and the AGENT_AUTOMATED constant
Type Bug
Priority Unset
Status Closed
Resolution Contact Support
Reporter Phil Deakins (phil.deakins)
Created at 2023-08-19T13:30:34Z
Updated at 2023-08-27T17:36:10Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2023-08-20T02:12:54.817-0500',
  "Is there anything you'd like to add?": 'I have 2 avatars/accounts that are not registered as scripted agents but are always returned as scripted agents. They can be used for testing.',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': "I recently submitted a bug report about this but it was closed because it wasn't understood (jira.secondlife.com/browse/BUG-234064).\r\n\r\nllGetAgentInfo(AGENT_AUTOMATED) is supposed to return only agents that are registered as scripted agents, but it also returns too many that are not registered as such.\r\n\r\nIt uses bit 15 (if I remember correctly) as a scripted agent flag, but that bit is being used, or has been used in the past, for something else, and it is sometimes set even though the agent is not registered as scripted.\r\n\r\nSince my previous jira on this bug, I've logged in 5 or 6 avatars, 2 of which are always returned as scripted agents, even though they are not. It is quite a large percentage.\r\n\r\nIt is bug in the system, and nothing to do with the agents/accounts. I can only imagine that the person who programmed the AGENT_AUTOMATED option wasn't aware that the bit used was already allocated to something else.",
  'What were you doing when it happened?': 'Writing a script.',
  'What were you expecting to happen instead?': 'I expected AGENT_AUTOMATED to return actual scripted agents and not some that are not registered as such.',
  'Where': 'Everywhere in the Gwydion sim/region.',
}
@sl-service-account
Copy link
Author

Phil Deakins commented at 2023-08-19T14:07:17Z

I've just done a test with 16 avatars, none of which are registered as scripted agents, but 4 of them were returned as scripted agents. That's 25% of false positives.

@sl-service-account
Copy link
Author

Peter Stindberg commented at 2023-08-20T07:12:55Z

I am running scripted-agent detection at a scale and distributed, and had not a single false positive so far. In fact, very very few agents who show up with the flag, were not previously known already to be scripted agents. The perecentage of those who were previously known to be scripted agents but do NOT have that flag set is about 0,05 %.

A 25 % false positive rate on your end sounds like an odd cumulation. We can run some tests with my detector, if you like.

@sl-service-account
Copy link
Author

Peter Stindberg commented at 2023-08-20T07:14:53Z

As an afterthought: Your two testing agents - what does the SL backend show when you go to https://secondlife.com/my/account/sisa.php ? What do the detectors show when you use that page to toggle the status?

@sl-service-account
Copy link
Author

Peter Stindberg commented at 2023-08-20T07:53:51Z

We just tested it with 4 agents Phil has control over, and - to my huge surprise - all 4 showed up as scripted agents in my detector.  So there is defintiely something wrong with THEM - I still don't see this to be a systemic error on a grand scale, because by now I would have noticed (according to what I wrote in https://jira.secondlife.com/browse/BUG-234283?focusedCommentId=712595&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-712595 )

@sl-service-account
Copy link
Author

Phil Deakins commented at 2023-08-20T08:49:36Z, updated at 2023-08-20T08:50:26Z

My 4 avatars are available for checking and testing any time. I won't submit a support ticket about them because (I think) that may just get things fixed for them, but the bug would still apply to others. It needs to be dealt with because it is bug that makes the AGENT_AUTOMATED option unreliable.

@sl-service-account
Copy link
Author

Phil Deakins commented at 2023-08-21T12:36:06Z

All 4 (now 5) accounts' 'Scripted Agent Status' pages are set as "{}being controlled by a human{}", so that page gets that data from somewhere, probably the accounts' flags. When AGENT_AUTOMATED is requested for each of them, the data is got from somewhere. I suspect it's from the same place - a 2 or 4 byte integer of flags for the agent, so they should return the same  'human operated' result, but they don't. Even changing one of the accounts as a scripted agent, and then changing it back to 'human' doesn't fix the problem.

I am now thinking that perhaps there's another bit in the  agent's flags that has been set for another reason, and when AGENT_AUTOMATED is requested for any agent, a logical AND is performed on the agent's flags and returned accordingly. But the flags are not ANDed with 0x400 (the AGENT_AUTOMATED flag), but with a number that inspects 2 flags - the AGENT_AUTOMATED one and another that is set for another reason. The result would be a non-zero number and a 1 would be returned to the script, wrongly indicating that it's a scripted agent.

If there is another flag that also gets inspected, what is it?, and how can it be changed so that AGENT_AUTOMATED stops returning false positives?

 

@sl-service-account
Copy link
Author

Maestro Linden commented at 2023-08-21T18:13:55Z

Can the agents in question (with a positive AGENT_AUTOMATED flag) visit estates that block scripted agents? This location on the "Linden Homes 2" estate is a good test case:
http://maps.secondlife.com/secondlife/Flummox/133/48/1

@sl-service-account
Copy link
Author

Phil Deakins commented at 2023-08-21T19:14:21Z, updated at 2023-08-21T19:16:15Z

4 of the 5 can't get there. Instead they receive the message "{}Sorry, you don't have access to that teleport destination{}".

The other one can get there, but that was caused by me submitting a support ticket for it yesterday. Not to get that account fixed because it genuinely doesn't matter, but in an attempt to find out what's causing the false positives. Somebody clearly misunderstood and fixed it for that account. I'm trying to report a false positives bug that affects the whole of SL, or to at least find out what causes them.

@sl-service-account
Copy link
Author

Maestro Linden commented at 2023-08-23T15:55:06Z

To be clear, does any agent currently have AGENT_AUTOMATED enabled who can currently visit
http://maps.secondlife.com/secondlife/Flummox/133/48/1 ? If so, what's the agent name? The support fix to allow the agent to visit bot-banning regions should also cause the agent to no longer have the AGENT_AUTOMATED flag.

@sl-service-account
Copy link
Author

Phil Deakins commented at 2023-08-23T16:18:43Z

I'm not sure that I understand the question, Maestro, but...

All of the agents that can't TP to Bellisseria have their scripted agent status set as being "controlled by a human".

When AGENT_AUTOMATED is requested for them, using llGetAgentInfo(), they are all returned as scripted agents.

If it helps, Sparrow Woodland is one of them. She's set as being controlled by a human, but she's returned as a scripted agent by AGENT_AUTOMATED. By all means use that account to check what I mean.

I did a test with one of them by setting it as a scripted agent, and then resetting it as being controlled by a human, but it made no difference to it being returned as a scripted agent.

@sl-service-account
Copy link
Author

Maestro Linden commented at 2023-08-23T21:39:44Z

I can confirm that those agents are flagged as scripted agents internally, so the script is returning the correct result (as is the sim refusing entry). If you have an account in this state, I recommend filing a support ticket requesting a fix for the agent.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant