Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

--extensions_require=extension1,extension2 does not wait correctly for extensions after the first in the list #7256

Copy link
Copy link
@CShearan

Description

@CShearan
Issue body actions

Bug report

What operating system and version are you using?

+----------+-------+----------+
| version  | build | platform |
+----------+-------+----------+
| 6.1.7601 | 7601  | windows  |
+----------+-------+----------+

What version of osquery are you using?

+---------+
| version |
+---------+
| 4.9.0   |
+---------+

What steps did you take to reproduce the issue?

ran osquery with two extensions using --extensions_require=extension1,extension2 --timeout=10

What did you expect to see?

Osquery wait a maximum of 10 seconds for all extensions to be loaded

What did you see instead?

Osquery failed to load all extensions with:

E An error occurred during extension manager startup: Required extension not found or not loaded: extension2

after less then 3 seconds.

It looks like in startExtensionManager in "osquery\osquery\extensions\extensions.cpp", after the first extension in the extensions_require list is loaded, all following extensions will be reported as failed to load after the first loop in applyExtensionDelay. This is because the waited bool is set to true after the first extension is checked, regardless of if it hit the FLAGS_extensions_timeout.

Also, rather than the FLAGS_extensions_timeout being the amount of time that all extensions are given to load, which seems to be what the waited bool is checking for, the applyExtensionDelay method resets the delay which is compared against the FLAGS_extensions_timeout for each extension. This could cause startExtensionManager to wait longer that the given timeout for all extensions to load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextensionsRelated to osquery extension SDK or to extensions themselvesRelated to osquery extension SDK or to extensions themselvestriageIssue needs to be verified, reproduced and prioritizedIssue needs to be verified, reproduced and prioritized

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.