RFR: 8225035: Thread stack size issue caused by large TLS size
Florian Weimer
fweimer at redhat.com
Wed Jun 26 12:20:06 UTC 2019
* Jiangli Zhou:
> Since the approach of using a simple on/off switch to control the
> stack size adjustment seems to be the cleanest, I've updated the CSR
> and webrev to go with that. Please help review both of the following:
>
> CSR: https://bugs.openjdk.java.net/browse/JDK-8225498
> webrev: http://cr.openjdk.java.net/~jiangli/8225035/webrev.01/
>
> I've also summarized all approaches brought up in the mailing list
> discussion and added to the comment section in
> https://bugs.openjdk.java.net/browse/JDK-8225035.
Please do not define any symbols of your own using pthread_, _pthread,
or __pthread. This just introduces a risk for a future clash with glibc
facilities, and it's very easy to avoid that.
I would suggest to avoid the weak symbol reference because it will bind
to a GLIBC_PRIVATE symbol. I think I've already explained that this
will trigger QE failures for certain distributions.
You can replace RTLD_NEXT with RTLD_DEFAULT; it will be slightly faster
because the search path is no longer caller-sensitive.
> A note on passing a dummy 'attr' to __pthread_get_minstack (regarding
> Thomas' comment): I've rechecked with that, and did get the correct
> minstack size. I think it's safer to pass a valid 'attr' however.
Passing a pointer is the right thing to do, but you can make it a null
pointer.
Thanks,
Florian
More information about the hotspot-runtime-dev
mailing list