RFR: 8225035: Thread stack size issue caused by large TLS size

Florian Weimer fweimer at redhat.com
Mon Jun 17 10:08:08 UTC 2019


* Florian Weimer:

> * Jiangli Zhou:
>
>> Just want to make sure that I understand the above correctly. Do you
>> suggest not to address the insufficient stack space issue caused by
>> the on-stack TLS allocations in Java layer with the workaround in
>> OpenJDK? If that's the case, any user who does face the issue would
>> have no available solution (maybe advanced users could build their own
>> patched JVM, but certainly not feasible for all users).
>
> It should be possible to LD_PRELOAD shared objects with large static TLS
> areas, so that the dynamic linker takes their requirements into account
> at process start.  So that could still be a workaround.

Sorry, this is a workaround for a different issue; it is not applicable
here.

> I think I suggested before to have a JVM knob which specifies a minimum
> stack size for passing to libpthread.  This would be a rather
> straightforward way to deal with applications which specify impossibly
> small thread stacks without having to recompile them.  If users
> encounter a problem and they are on 64-bit architectures, they can just
> set that knob to 1 MiB because it's unlikely that they have to conserve
> address space.

I still stand behind this suggestion.

Thanks,
Florian


More information about the hotspot-runtime-dev mailing list