jeroenjanssens / data-science-at-the-command-line

Data Science at the Command Line
https://datascienceatthecommandline.com
Other
3.81k stars 767 forks source link

runtime: failed to create new OS thread (have 2 already; errno=22) #119

Open shinokada opened 3 years ago

shinokada commented 3 years ago

I use the datasciencetoolbox/dsatcl2e image on Docker.

On page 38, when I run curl -s https://news.ycombinator.com/ | pup 'table table tr:nth-last-of-type(n+2) td.title a' I get the following error.

$ curl -s https://news.ycombinator.com/ | pup 'table table tr:nth-last-of-type(n+2) td.title a'
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc

runtime stack:
runtime.throw(0x60b990, 0x9)
    /usr/local/go/src/runtime/panic.go:547 +0x90
runtime.newosproc(0xc820024000, 0xc820033fc0)
    /usr/local/go/src/runtime/os1_linux.go:149 +0x18c
runtime.newm(0x65c6f8, 0x0)
    /usr/local/go/src/runtime/proc.go:1516 +0x135
runtime.main.func1()
    /usr/local/go/src/runtime/proc.go:125 +0x2c
runtime.systemstack(0x7c9800)
    /usr/local/go/src/runtime/asm_amd64.s:291 +0x79
runtime.mstart()
    /usr/local/go/src/runtime/proc.go:1051

goroutine 1 [running]:
runtime.systemstack_switch()
    /usr/local/go/src/runtime/asm_amd64.s:245 fp=0xc82001e770 sp=0xc82001e768
runtime.main()
    /usr/local/go/src/runtime/proc.go:126 +0x62 fp=0xc82001e7c0 sp=0xc82001e770
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc82001e7c8 sp=0xc82001e7c0

$ which pup
/usr/bin/pup
duaneking commented 2 years ago

I got here through a google search for this exact error because I'm on a Mac M1 and this exception is for the GoLang Linux driver despite the way we do builds explicitly for the platform we expect. I'm hoping that its an easy fix but I'm not finding that the M1 has the best platform support.