This problem is similar to the issue 11787. The culprit here is the __start_helper_thread() function in nptl/sysdeps/unix/sysv/linux/timer_routines.c, which tries to create a thread with the stack size attribute fixed at PTHREAD_STACK_MIN (16K). As a result, call to pthread_create() fails when allocating thread stack in nptl/allocatestack.c if the TLS segment does not fit this artificial size constraint.
I would say the bug is that glibc/NPTL treats the stack size attribute as the total size it should allocate, rather than as the size for actual STACK. If it always allocated the requested stack size PLUS the amount needed for TLS, the thread structure, and any other associated data, then this situation could not arise.
I added a patch.