https://github.com/osquery/osquery logo
#general
Title
# general
s

Subash Rajaa

10/17/2022, 1:22 PM
void run() { size_t waited = 0; while (true) { if (interrupted()) { return; } std:this thread:sleep_for(std:chrono:milliseconds(200)); waited += 200; if (waited > FLAGS_alarm_timeout * 1000) { fflush(stdout); //==> FIX Initializer::shutdownNow(EXIT_CATASTROPHIC); } } }
v

Vivek Uppal

10/17/2022, 2:47 PM
If this is appropriate for a different channel, please let us know and we can move the conversation there. If it would be helpful
Subash could we link the files here, where we are proposing the change
s

Subash Rajaa

10/17/2022, 3:32 PM
Sure.
osquery\core\init.cpp
diff --git a/osquery/core/init.cpp b/osquery/core/init.cpp index 3b9c245c..3f82ecd8 100644 --- a/osquery/core/init.cpp +++ b/osquery/core/init.cpp @@ -684,6 +684,7 @@ class AlarmRunnable : public InterruptibleRunnable { std:this thread:sleep_for(std:chrono:milliseconds(200)); waited += 200; if (waited > FLAGS_alarm_timeout * 1000) { + fflush(stdout); Initializer::shutdownNow(EXIT_CATASTROPHIC); } }
v

Vivek Uppal

10/18/2022, 2:24 PM
Is this a better question for #windows channel
s

seph

10/19/2022, 4:16 AM
Given that there’s a suggested diff here, this is probably best in a github pull request.
You could file it in an issue if thats easier
s

Subash Rajaa

10/19/2022, 11:47 AM
Thanks
v

Vivek Uppal

10/19/2022, 7:47 PM
Hey Seph! great to e-meet you again
s

seph

10/19/2022, 7:48 PM
I thought that might be you Vivek! Nice to say hi. I’m still here, much the same. How’s Carbon Black treating you?
v

Vivek Uppal

10/19/2022, 7:48 PM
Pretty good, couldn't ask for more. It is a fun env!
s

seph

10/19/2022, 7:49 PM
Most we can hope for. That and growth oppertunities
v

Vivek Uppal

10/19/2022, 7:50 PM
So the open source contribution aspects for us is a little onerous given the corporate lay of the land around here
@Subash Rajaa has tried this patch internally and it works for the use case he outlined above. We are in a situation where we have to patch this one line every time we decide to upgrade the shipping version of osquery with our product
We are wondering if there might be a way to get this change into mainline
s

seph

10/19/2022, 7:55 PM
So your corporate makes it hard to sign off on a CLA? That makes it hard to accept patches 😐
Can y’all file issues or does that bump into corporate?
v

Vivek Uppal

10/19/2022, 7:56 PM
hmm.. filing issues would be ok I believe. Let me check on that
s

seph

10/19/2022, 7:57 PM
If you can file an issue, file it, and maybe don’t include the patch? (It should be fairly obvious from needing a flush) If you can’t, I’ll file it
v

Vivek Uppal

10/19/2022, 7:58 PM
Appreciate the help man. I will get back on this
s

seph

10/19/2022, 7:58 PM
Agree on getting it fixed. Now it’s just logistics 🙂
s

Subash Rajaa

10/20/2022, 2:42 PM
thanks gentlemen for the help. Will file the issue and notify.
3 Views