Hi, we encountered a crash in the Linux version of the EOS SDK.
The stack trace (from v1.19.0.7 SDK, but I reproduced the same issue on latest version):
```
Fatal error: [File:Unknown] [Line: 50]
#
# Fatal error in: ../../../rtc_base/platform_thread.cc, line 219
# last system error: 0
# Check failed: 0 == pthread_create(&handle, &attr, &RunPlatformThread, start_thread_function_ptr) (0 vs. 22)
#
```
```
Thread 109 “EOSP2PNetwork” received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=4850133759552) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=4850133759552) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=4850133759552) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=4850133759552, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x7fffe3e42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x7fffe3e287f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x7ffff483ee39 in () at /libEOSSDK-Linux-Shipping.so
…
#15 0x7fffe3e94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#16 0x7fffe3f268d0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
```
The hardcoded stack size of 1MB in rtc_base/platform_thread.cc is too little probably because of TLS we use, I managed to locally work around this by the LD_PRELOAD trick with this file:
```cpp
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) {
if (stacksize < 4 * 1024 * 1024) {
stacksize = 4 * 1024 * 1024;
}
int (*orig_setstacksize)(pthread_attr_t *, size_t) = dlsym(RTLD_NEXT, “pthread_attr_setstacksize”);
return orig_setstacksize(attr, stacksize);
}
```
But we cannot use the LD_PRELOAD trick in customer builds, can you increase the stack size request to 4MB on your side, or expose a C API we can use to set the limit ourselves? Thank you.
Adam