[CONTROLLER-1793] Exceptions in listener threads are going to stdout instead of karaf.log Created: 17/Nov/17  Updated: 24/Nov/17  Resolved: 24/Nov/17

Status: Resolved
Project: controller
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Sai Sindhur Malleni Assignee: Michael Vorburger
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File gistfile1.txt    

 Description   

The following exceptions are being seen in the stdout of the JVM instead of karaf.log
https://gist.githubusercontent.com/smalleni/4cf2e299dbe96ee76c44f3d2f1ba2f8d/raw/6277b1632d8ed1eeaab19314408e220c12354000/gistfile1.txt



 Comments   
Comment by Michael Vorburger [ 17/Nov/17 ]

> https://gist.github.com/smalleni/f896c79a388779ed1f7d82d795f85e05

now attached as gistfile1.txt here so that its JIRA indexed...

MDSAL-296 will see about doing something about exceptions cause; this issue is (only) about getting them into the ODL log instead STDOUT.

This is, of course, caused by new threads somewhere not having this kind of thing:

setUncaughtExceptionHandler(LoggingThreadUncaughtExceptionHandler.toLogger(logger()));

which e.g. the org.opendaylight.yangtools.util.concurrent.ThreadFactoryProvider (from org.opendaylight.infrautils.utils.concurrent.ThreadFactoryProvider) enforces every new Thread of having, and which the new non-deprecated methods in org.opendaylight.yangtools.util.concurrent.SpecialExecutors now correctly set.

But WHERE exactly is this missing? It's not immediately apparent from the attachment...

Comment by Michael Vorburger [ 21/Nov/17 ]

https://git.opendaylight.org/gerrit/#/c/65805/ is part of resolving this in general, although I'm not 100% certain it will make the particular case in this log go into logging, but I'll probably fix this one anyway in MDSAL-296, so it won't matter; let's use this bug for the general case and do c/65805 instead of the narrow down to only the specific IllegalStateException attached.

Comment by Michael Vorburger [ 24/Nov/17 ]

Done (but only on master and will only become active up once projects switch to yangtools 2.0.0).

Generated at Wed Feb 07 19:56:28 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.