RFR[9u-dev]: 8151442: jstack doesn't close quotation marks properly with threads' name greater than 1996 characters
Rainer Jung
rainer.jung at kippdata.de
Mon Mar 21 09:05:23 UTC 2016
Am 21.03.2016 um 09:18 schrieb Robbin Ehn:
> (I must admit I'm very curious why anyone would have a thread name that
> long)
Since thread dumps are very useful for problem analysis but only contain
stacks but no data, sometimes people switch the thread name on every new
workload the thread handles, so that the thread name in the dump
contains the info, kind of side-channel to tunnel data into the dump.
For example: in a web container one might append the request info (HTTP
method, URI, query string, time the request began) with a separator to
the original thread name at the beginning of the request, and strip it
at the end. So if things hang or get slow and you take a thread dump,
the info on what type or request each thread is working is present in
that dump.
I'm not arguing whether this is a good pattern or not, but I have seen
this pattern in production. Still, 1996 characters isn't easily reached
even with this pattern.
Regards,
Rainer
More information about the serviceability-dev
mailing list