Opened 7 years ago

Closed 3 years ago

#760 closed enhancement (wontfix)

"Instant Death" debug mode

Reported by: Zlatin Balevsky Owned by:
Priority: maintenance Milestone:
Component: api/utils Version: 0.9.3
Keywords: Cc: zab@…
Parent Tickets: Sensitive: no

Description

Sometimes an error state is entered that is really a symptom of something else. It's hard to discover the underlying cause by looking at logs or stack traces alone. (example #758).

We could have an opt-in "instant death debug mode" where selected (or all) error states trigger a thread dump, heap dump, any other diagnostic info and then restart the router. Such mode would be enabled by default for -dev builds.

Subtickets

Change History (5)

comment:1 Changed 7 years ago by zzz

How do you propose to specify such error states?

comment:2 Changed 7 years ago by Zlatin Balevsky

Cc: zab@… added

There are many ways to do it, depending on how fancy you want to get. The simplest thing is to explicitly/manually define these states and call a static utility method.

There is also a Thread.UncaughtExceptionHandler interface and a Thread.setDefaultUncaughtExceptionHandler setter that will intercept all uncaught exceptions.

comment:3 Changed 7 years ago by zzz

Component: router/generalapi/utils
Priority: minormaintenance

There's already a hook in net.i2p.util.I2PThread that we could expand. I ripped out the logging a while ago because of the problems it caused. But perhaps with more careful coding and/or using only the System logging we could bring it back.

comment:4 Changed 4 years ago by str4d

Status: newopen

comment:5 Changed 3 years ago by zzz

Resolution: wontfix
Status: openclosed
Note: See TracTickets for help on using tickets.