Jira (PDB-5633) Investigate why (some?) command discards aren't including the stack

0 views
Skip to first unread message

Rob Browning (Jira)

unread,
Apr 27, 2023, 2:20:01 PM4/27/23
to puppe...@googlegroups.com
Rob Browning created an issue
 
PuppetDB / Task PDB-5633
Investigate why (some?) command discards aren't including the stack
Issue Type: Task Task
Assignee: Unassigned
Created: 2023/04/27 11:19 AM
Priority: Normal Normal
Reporter: Rob Browning

When pdb discards a command, it includes the stacktrace via .printStackTrace (see dlo.clj), but during an escalation, the json.gz_err.txt file just had something like:

Attempt 3 @ ...
java.lang.NullPointerException

Attempt 2 @ ...
java.lang.NullPointerException

Attempt 1 @ ...
java.lang.NullPointerException

Is that expected/intended?

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Charmaine Pritchett (Jira)

unread,
May 9, 2023, 7:20:03 AM5/9/23
to puppe...@googlegroups.com

Charmaine Pritchett (Jira)

unread,
May 9, 2023, 7:20:03 AM5/9/23
to puppe...@googlegroups.com
Charmaine Pritchett updated an issue
Change By: Charmaine Pritchett
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 51495

Gareth McGrillan (Jira)

unread,
May 10, 2023, 11:35:03 AM5/10/23
to puppe...@googlegroups.com
Gareth McGrillan commented on Task PDB-5633
 
Re: Investigate why (some?) command discards aren't including the stack

Hi Rob - let m know if there is anything you need me to grab from our customer that may be of use here?

Gareth...

Gareth McGrillan (Jira)

unread,
May 10, 2023, 11:42:03 AM5/10/23
to puppe...@googlegroups.com

Rob - just as an aside  - Blackrock seem to be suffering from files building up in the discards dir constantly  - so knowing what the issue is would be really useful.

g....

Andy Troup (Jira)

unread,
May 16, 2023, 5:27:01 AM5/16/23
to puppe...@googlegroups.com
Andy Troup updated an issue
 
Change By: Andy Troup
Labels: BlackRock jira_escalated

Saurabh Dikshit (Jira)

unread,
May 19, 2023, 10:36:02 AM5/19/23
to puppe...@googlegroups.com
Saurabh Dikshit updated an issue
Change By: Saurabh Dikshit
Zendesk Ticket Count: 1 2
Zendesk Ticket IDs: 51495 ,52057
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo

Gareth McGrillan (Jira)

unread,
May 23, 2023, 5:29:01 AM5/23/23
to puppe...@googlegroups.com
 
Re: Investigate why (some?) command discards aren't including the stack

Hi Rob Browning  - let us know if there's anything else we need to provide here for further investigation  - We had another case of this with SCB in https://tickets.puppetlabs.com/browse/PE-36108 

Cas Donoghue (Jira)

unread,
May 24, 2023, 2:22:01 PM5/24/23
to puppe...@googlegroups.com

Rob Browning (Jira)

unread,
May 25, 2023, 5:51:02 PM5/25/23
to puppe...@googlegroups.com

Rob Browning (Jira)

unread,
May 25, 2023, 6:41:03 PM5/25/23
to puppe...@googlegroups.com

Rob Browning (Jira)

unread,
May 25, 2023, 6:41:03 PM5/25/23
to puppe...@googlegroups.com
Rob Browning assigned an issue to Unassigned
Change By: Rob Browning
Assignee: Rob Browning

Rob Browning (Jira)

unread,
May 26, 2023, 3:42:02 PM5/26/23
to puppe...@googlegroups.com
Rob Browning commented on Task PDB-5633
 
Re: Investigate why (some?) command discards aren't including the stack

So this ticket was originally intended to (at least) figure out how to fix the (presumed) pdb bug that was preventing the stack traces from printing, but after I investigated for a bit, it didn't look like there was a pdb bug. My search for other culprits didn't hit the mark, but then we think Austin probably found the cause: https://bugs.openjdk.org/browse/JDK-8273392

Assuming that's right, and perhaps even as a test to see if it's right, we thought one possible approach would be to turn that option off at one of the sites and see if the stack traces appear. That would also (more importantly in the short term) hopefully allow us to see what's causing the command failures.

We think we should be able to disable the optimization, which should restore the stack traces by adding this JVM argument to the pdb invocation: -XX:-OmitStackTraceInFastThrow

Gareth McGrillan (Jira)

unread,
May 30, 2023, 4:39:02 AM5/30/23
to puppe...@googlegroups.com

Rob Browning  - it might be tricky to get Blackrock to make this change  - I can go back and see if they can but they'll not be able to change this directly in production so it could be some time before the change would hot "production" where the issue lies for them.

SCB may be in a similar position also  - they are just large orgs and making changes is difficult

Andy Troup (Jira)

unread,
May 30, 2023, 5:12:01 AM5/30/23
to puppe...@googlegroups.com
Andy Troup commented on Task PDB-5633

Gareth McGrillan theres no harm in asking. I'm also speaking with them today

Andy Troup (Jira)

unread,
Jun 1, 2023, 5:16:01 AM6/1/23
to puppe...@googlegroups.com

Andy Troup (Jira)

unread,
Jun 1, 2023, 5:24:02 AM6/1/23
to puppe...@googlegroups.com

Gareth McGrillan (Jira)

unread,
Jun 2, 2023, 5:54:02 AM6/2/23
to puppe...@googlegroups.com
Gareth McGrillan commented on Task PDB-5633
 
Re: Investigate why (some?) command discards aren't including the stack

Rob Browning  - forgive my ignorance  - do we add this in the `/etc/sysconfig/pe-puppetdb` invocation or is this added as part of their heira?

g...

Joshua Partlow (Jira)

unread,
Jun 2, 2023, 1:49:01 PM6/2/23
to puppe...@googlegroups.com

Hi Gareth; yes, that's the file that has pe-puppetdb's JAVA_ARGS. One thing to note is that that env var is managed by puppet; so if you need any reliability or permanence around the change, I believe you will want to adjust puppet_enterprise::profile::puppetdb::java_args where they probably already have memory settings set. I think you'd be adding a "XX:-OmitStackTraceInFastThrow" => "" to the map.

But I would double check with someone else in support that I'm not leading you astray on the best way to provide these kind of one off java args overrides for customers.

Gareth McGrillan (Jira)

unread,
Jun 7, 2023, 12:55:01 PM6/7/23
to puppe...@googlegroups.com

Joshua Partlow  - do you guys have a way to provoke the system to create a discard file ? 

We can make the change to config bugt we can't see reproduce the actual issue

G...

Gareth McGrillan (Jira)

unread,
Jun 8, 2023, 12:26:02 PM6/8/23
to puppe...@googlegroups.com

Joshua Partlow  - is this a configuration option that's available  to set in the console  - I've tried *_

{"XX":"-OmitStackTraceInFastThrow"}

* under Class: puppet_enterprise::profile::puppetdb_ but it keeps dropping the :

Would you have the correct syntax to configure in the console ?
I would like to do it there as this is something that i would like the customers to add and then remove until we fix it in a release

g... 
 

Gareth McGrillan (Jira)

unread,
Jun 9, 2023, 11:25:01 AM6/9/23
to puppe...@googlegroups.com

I think I've got it sorted :

 

{"XX:-OmitStackTraceInFastThrow":""}

is the syntax...

Do you know of any way to provoke the discards to see if it actually works  - I'd like to test it before giving it out to BlackRock or SCB (Saurabh Dikshit)

Thanks,
G...

 

 

Joshua Partlow (Jira)

unread,
Jun 12, 2023, 12:04:02 PM6/12/23
to puppe...@googlegroups.com

Sorry, Gareth, there must be something going on with Jira. I didn't get notified about any of these comments until today for some reason. Yes, your syntax is correct now, but I'm not sure about the best way to force a discard. Rob Browning?

Gareth McGrillan (Jira)

unread,
Jun 12, 2023, 12:34:01 PM6/12/23
to puppe...@googlegroups.com

No worries - any pointers to poke would be gratefully received!

 

Rob Browning (Jira)

unread,
Jun 15, 2023, 5:22:02 PM6/15/23
to puppe...@googlegroups.com
Rob Browning commented on Task PDB-5633

Hmm, I don't know if there's any reliable way to provoke the behavior since it's a JVM optimization that may happen "under some circumstances": https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html#getStackTrace--

As a practical matter, with our JVM, it sounds like it depends on various things, including whether or not the jit has decided the code is "hot" enough.  I suppose you could try submitting a bunch of broken commands, and maybe it'd eventually start happening on the discards.

Reply all
Reply to author
Forward
0 new messages