Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issues with multi-thread execution #5187

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

Conversation

Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented May 15, 2024

Proposed changes

Fixing multiple issues during usage as SDK

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label May 15, 2024
@Mzack9999 Mzack9999 self-assigned this May 15, 2024
@Mzack9999 Mzack9999 changed the title Scheduler Prototype Fixing issues with multi-thread execution May 23, 2024
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict

Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm !

suggested one change about closing shared resources, apart from that i think its time for us to work on possibly removing shared global singletons so i have created a issue to track it #5239

Comment on lines 125 to 127
}
defer tmpEngine.closeInternal()
// create ephemeral nuclei objects/instances/types using base nuclei engine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mzack9999 , the tmpEngine uses shared resources like interactsh,outputwriter etc which are used by every nuclei instance created from threadsafeNucleiExecuter, while fixing memory leaks we accidently closed this here , but this is not expected to be closed here,

shared resources of threadsafeNucleiExecuter are released using .Close() of ThreadSafeNucleiEngine as for temporary resources like ratelimit and stuff they are closed using defer closeEphemeralObjects(unsafeOpts)

i have removed this in my last pr and is included in latest, so we should remove this tmpEngine.closeInternal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
3 participants