I actually spend a long time to figure out what happened, since i just updating sdk from 1.38.11 to 1.38.21.
The projects compiled by 1.38.21 with USE_PTHREADS and emscripten_webgl_create_context run correctly, but it failed with USE_PTHREADS and SDL.
please test sdl_gl_mapbuffers.c (in emscripten's tests)
sdl_gl_mapbuffers:
emcc [email protected] -g3 -o [email protected] -s USE_PTHREADS=1 -s FULL_ES3=1 -lSDL -lGL
maybe not InitWebGLTls in 1.38.21\system\lib\gl\webgl1.c