Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"fatal error: runtime: out of memory" occurs on OpenBSD #2191

Open
TechnicalSuwako opened this issue Oct 17, 2024 · 4 comments
Open

"fatal error: runtime: out of memory" occurs on OpenBSD #2191

TechnicalSuwako opened this issue Oct 17, 2024 · 4 comments
Labels

Comments

@TechnicalSuwako
Copy link

TechnicalSuwako commented Oct 17, 2024

Describe the bug
When running "go build" I get the error "fatal error: runtime: out of memory"

To Reproduce
Try running "go build" on OpenBSD 7.5 or 7.6

Expected behavior
Compilation is successful

Screenshots/debug logs

$ go build
# github.com/yaegashi/msgraph.go/beta
fatal error: runtime: out of memory

runtime stack:
runtime.throw({0xe5a5f0?, 0x15?})
  runtime/panic.go:1067 +0x4c fp=0x7794e46dbd18 sp=0x7794e46dbce8 pc=0x4815ec
runtime.sysMapOS(0xc05ac00000, 0x400000)
  runtime/mem_bsd.go:81 +0x11b fp=0x7794e46dbd58 sp=0x7794e46dbd18 pc=0x41b73b
runtime.sysMap(0xc05ac00000, 0x400000, 0x0?)
  runtime/mem.go:155 +0x34 fp=0x7794e46dbd78 sp=0x7794e46dbd58 pc=0x41b4d4
runtime.(*mheap).grow(0x15abfe0, 0x1?)
  runtime/mheap.go:1539 +0x23b fp=0x7794e46dbde8 sp=0x7794e46dbd78 pc=0x43223b
runtime.(*mheap).allocSpan(0x15abfe0, 0x1, 0x0, 0x1e)
  runtime/mheap.go:1244 +0x5e9 fp=0x7794e46dbef8 sp=0x7794e46dbde8 pc=0x4315e9
runtime.(*mheap).alloc.func1()
  runtime/mheap.go:962 +0x65 fp=0x7794e46dbf40 sp=0x7794e46dbef8 pc=0x430ac5
runtime.systemstack(0x158cc40)
  runtime/asm_amd64.s:514 +0x4e fp=0x7794e46dbf50 sp=0x7794e46dbf40 pc=0x487cae

goroutine 24850 gp=0xc03a285a40 m=0 mp=0x158f4e0 [running]:
runtime.systemstack_switch()
  runtime/asm_amd64.s:475 +0x8 fp=0xc05305f5c0 sp=0xc05305f5b0 pc=0x487c48
runtime.(*mheap).alloc(0xc01203b550?, 0x8?, 0x1?)
  runtime/mheap.go:956 +0x5f fp=0xc05305f608 sp=0xc05305f5c0 pc=0x4309ff
runtime.(*mcentral).grow(0x0?)
  runtime/mcentral.go:254 +0x53 fp=0xc05305f648 sp=0xc05305f608 pc=0x41af73
runtime.(*mcentral).cacheSpan(0x15bd8e8)
  runtime/mcentral.go:170 +0x52a fp=0xc05305f700 sp=0xc05305f648 pc=0x41a52a
runtime.(*mcache).refill(...)
  runtime/mcache.go:182
runtime.(*mcache).nextFree(0x20beb9108, 0x1e)
  runtime/malloc.go:945 +0x1af fp=0xc05305f758 sp=0xc05305f700 pc=0x4123af
runtime.mallocgc(0xc8, 0xe31d60, 0x1)
  runtime/malloc.go:1161 +0x505 fp=0xc05305f820 sp=0xc05305f758 pc=0x47b005
runtime.newobject(0xc020266c80?)
  runtime/malloc.go:1386 +0x25 fp=0xc05305f848 sp=0xc05305f820 pc=0x412965
cmd/internal/obj/x86.span6(0xc00016c488, 0xc020266c80, 0xc05aac7950)
  cmd/internal/obj/x86/asm6.go:2262 +0xce5 fp=0xc05305fa08 sp=0xc05305f848 pc=0x72cce5
cmd/internal/obj.Flushplist(0xc00016c488, 0xc05305ff20, 0xc05aac7950)
  cmd/internal/obj/plist.go:168 +0xb67 fp=0xc05305fea0 sp=0xc05305fa08 pc=0x58aee7
cmd/compile/internal/objw.(*Progs).Flush(...)
  cmd/compile/internal/objw/prog.go:112
cmd/compile/internal/ssagen.Compile(0xc0120152c0, 0x2, 0xc000481650?)
  cmd/compile/internal/ssagen/pgen.go:327 +0x6e5 fp=0xc05305ff70 sp=0xc05305fea0 pc=0xb28a85
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
  cmd/compile/internal/gc/compile.go:188 +0x3c fp=0xc05305ffb0 sp=0xc05305ff70 pc=0xd3ccfc
cmd/compile/internal/gc.compileFunctions.func3.1()
  cmd/compile/internal/gc/compile.go:170 +0x34 fp=0xc05305ffe0 sp=0xc05305ffb0 pc=0xd3d134
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc05305ffe8 sp=0xc05305ffe0 pc=0x489b61
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 1080
  cmd/compile/internal/gc/compile.go:169 +0x247

goroutine 1 gp=0xc0000061c0 m=nil [semacquire]:
runtime.gopark(0xc0000061c0?, 0x0?, 0xa0?, 0xbd?, 0xc028f6f8e0?)
  runtime/proc.go:424 +0xce fp=0xc019151898 sp=0xc019151878 pc=0x48170e
runtime.goparkunlock(...)
  runtime/proc.go:430
runtime.semacquire1(0xc00ff50528, 0x0, 0x1, 0x0, 0x12)
  runtime/sema.go:178 +0x225 fp=0xc019151900 sp=0xc019151898 pc=0x45b0a5
sync.runtime_Semacquire(0xc004f74140?)
  runtime/sema.go:71 +0x25 fp=0xc019151938 sp=0xc019151900 pc=0x482cc5
sync.(*WaitGroup).Wait(0xc036676000?)
  sync/waitgroup.go:118 +0x49 fp=0xc019151960 sp=0xc019151938 pc=0x4a2409
cmd/compile/internal/gc.compileFunctions(0x0)
  cmd/compile/internal/gc/compile.go:200 +0x23d fp=0xc0191519d0 sp=0xc019151960 pc=0xd3cb3d
cmd/compile/internal/gc.Main(0xe852b8)
  cmd/compile/internal/gc/main.go:306 +0x127a fp=0xc019151ef0 sp=0xc0191519d0 pc=0xd3e4ba
main.main()
  cmd/compile/main.go:57 +0xfc fp=0xc019151f50 sp=0xc019151ef0 pc=0xd6811c
runtime.main()
  runtime/proc.go:272 +0x28b fp=0xc019151fe0 sp=0xc019151f50 pc=0x446f4b
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc019151fe8 sp=0xc019151fe0 pc=0x489b61

goroutine 2 gp=0xc000006700 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
  runtime/proc.go:424 +0xce fp=0xc00004cfa8 sp=0xc00004cf88 pc=0x48170e
runtime.goparkunlock(...)
  runtime/proc.go:430
runtime.forcegchelper()
  runtime/proc.go:337 +0xa9 fp=0xc00004cfe0 sp=0xc00004cfa8 pc=0x447289
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc00004cfe8 sp=0xc00004cfe0 pc=0x489b61
created by runtime.init.7 in goroutine 1
  runtime/proc.go:325 +0x1e

goroutine 3 gp=0xc000006c40 m=nil [GC sweep wait]:
runtime.gopark(0x15abf01?, 0x29a97e200?, 0x0?, 0x0?, 0x0?)
  runtime/proc.go:424 +0xce fp=0xc00004d750 sp=0xc00004d730 pc=0x48170e
runtime.goparkunlock(...)
  runtime/proc.go:430
runtime.bgsweep(0xc000066000)
  runtime/mgcsweep.go:317 +0xe5 fp=0xc00004d7c8 sp=0xc00004d750 pc=0x42ba65
runtime.gcenable.gowrap1()
  runtime/mgc.go:203 +0x25 fp=0xc00004d7e0 sp=0xc00004d7c8 pc=0x41e965
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc00004d7e8 sp=0xc00004d7e0 pc=0x489b61
created by runtime.gcenable in goroutine 1
  runtime/mgc.go:203 +0x68

goroutine 4 gp=0xc000006e00 m=nil [GC scavenge wait]:
runtime.gopark(0x10000?, 0xfaeec8?, 0x0?, 0x0?, 0x0?)
  runtime/proc.go:424 +0xce fp=0xc00004df78 sp=0xc00004df58 pc=0x48170e
runtime.goparkunlock(...)
  runtime/proc.go:430
runtime.(*scavengerState).park(0x158c740)
  runtime/mgcscavenge.go:425 +0x4d fp=0xc00004dfa8 sp=0xc00004df78 pc=0x4290cd
runtime.bgscavenge(0xc000066000)
  runtime/mgcscavenge.go:658 +0x65 fp=0xc00004dfc8 sp=0xc00004dfa8 pc=0x429665
runtime.gcenable.gowrap2()
  runtime/mgc.go:204 +0x25 fp=0xc00004dfe0 sp=0xc00004dfc8 pc=0x41e905
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc00004dfe8 sp=0xc00004dfe0 pc=0x489b61
created by runtime.gcenable in goroutine 1
  runtime/mgc.go:204 +0xa5

goroutine 5 gp=0xc000007340 m=nil [finalizer wait]:
runtime.gopark(0x0?, 0xc0000106f0?, 0x0?, 0xfe?, 0x1000000010?)
  runtime/proc.go:424 +0xce fp=0xc004e64e20 sp=0xc004e64e00 pc=0x48170e
runtime.runfinq()
  runtime/mfinal.go:193 +0x10d fp=0xc004e64fe0 sp=0xc004e64e20 pc=0x41d92d
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc004e64fe8 sp=0xc004e64fe0 pc=0x489b61
created by runtime.createfing in goroutine 1
  runtime/mfinal.go:163 +0x45

goroutine 1080 gp=0xc000496a80 m=nil [select]:
runtime.gopark(0xc004e63fb0?, 0x2?, 0x80?, 0x3f?, 0xc004e63f24?)
  runtime/proc.go:424 +0xce fp=0xc004e63db8 sp=0xc004e63d98 pc=0x48170e
runtime.selectgo(0xc004e63fb0, 0xc004e63f20, 0x0?, 0x0, 0xd9ef20?, 0x1)
  runtime/select.go:335 +0x7ba fp=0xc004e63ee0 sp=0xc004e63db8 pc=0x459f7a
cmd/compile/internal/gc.compileFunctions.func3()
  cmd/compile/internal/gc/compile.go:158 +0x126 fp=0xc004e63fe0 sp=0xc004e63ee0 pc=0xd3cee6
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc004e63fe8 sp=0xc004e63fe0 pc=0x489b61
created by cmd/compile/internal/gc.compileFunctions in goroutine 1
  cmd/compile/internal/gc/compile.go:151 +0xf4

goroutine 915 gp=0xc001ee8380 m=nil [GC worker (idle)]:
runtime.gopark(0xe85eb0?, 0xc003c73c20?, 0x1a?, 0xa?, 0x0?)
  runtime/proc.go:424 +0xce fp=0xc000498728 sp=0xc000498708 pc=0x48170e
runtime.gcBgMarkWorker(0xc0027908c0)
  runtime/mgc.go:1363 +0xf0 fp=0xc0004987c8 sp=0xc000498728 pc=0x420ed0
runtime.gcBgMarkStartWorkers.gowrap1()
  runtime/mgc.go:1279 +0x25 fp=0xc0004987e0 sp=0xc0004987c8 pc=0x420da5
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc0004987e8 sp=0xc0004987e0 pc=0x489b61
created by runtime.gcBgMarkStartWorkers in goroutine 914
  runtime/mgc.go:1279 +0x105

goroutine 916 gp=0xc001ee8540 m=nil [GC worker (idle)]:
runtime.gopark(0x15c3ce0?, 0xc003c73c40?, 0x1a?, 0xa?, 0x0?)
  runtime/proc.go:424 +0xce fp=0xc000498f28 sp=0xc000498f08 pc=0x48170e
runtime.gcBgMarkWorker(0xc0027908c0)
  runtime/mgc.go:1363 +0xf0 fp=0xc000498fc8 sp=0xc000498f28 pc=0x420ed0
runtime.gcBgMarkStartWorkers.gowrap1()
  runtime/mgc.go:1279 +0x25 fp=0xc000498fe0 sp=0xc000498fc8 pc=0x420da5
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc000498fe8 sp=0xc000498fe0 pc=0x489b61
created by runtime.gcBgMarkStartWorkers in goroutine 914
  runtime/mgc.go:1279 +0x105

goroutine 917 gp=0xc001ee8700 m=nil [GC worker (idle)]:
runtime.gopark(0x15c3ce0?, 0xc003c73c60?, 0x1a?, 0xa?, 0x0?)
  runtime/proc.go:424 +0xce fp=0xc000499728 sp=0xc000499708 pc=0x48170e
runtime.gcBgMarkWorker(0xc0027908c0)
  runtime/mgc.go:1363 +0xf0 fp=0xc0004997c8 sp=0xc000499728 pc=0x420ed0
runtime.gcBgMarkStartWorkers.gowrap1()
  runtime/mgc.go:1279 +0x25 fp=0xc0004997e0 sp=0xc0004997c8 pc=0x420da5
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc0004997e8 sp=0xc0004997e0 pc=0x489b61
created by runtime.gcBgMarkStartWorkers in goroutine 914
  runtime/mgc.go:1279 +0x105

goroutine 918 gp=0xc001ee88c0 m=nil [GC worker (idle)]:
runtime.gopark(0xc000499fa0?, 0xc003c73c80?, 0x1a?, 0xa?, 0x0?)
  runtime/proc.go:424 +0xce fp=0xc000499f28 sp=0xc000499f08 pc=0x48170e
runtime.gcBgMarkWorker(0xc0027908c0)
  runtime/mgc.go:1363 +0xf0 fp=0xc000499fc8 sp=0xc000499f28 pc=0x420ed0
runtime.gcBgMarkStartWorkers.gowrap1()
  runtime/mgc.go:1279 +0x25 fp=0xc000499fe0 sp=0xc000499fc8 pc=0x420da5
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc000499fe8 sp=0xc000499fe0 pc=0x489b61
created by runtime.gcBgMarkStartWorkers in goroutine 914
  runtime/mgc.go:1279 +0x105

goroutine 24842 gp=0xc03a2848c0 m=nil [runnable]:
cmd/compile/internal/abi.(*ABIConfig).ABIAnalyze.(*ABIConfig).ABIAnalyzeFuncType.func1({0xc0358aeb40, 0x3, 0x4?}, 0x0)
  cmd/compile/internal/abi/abiutils.go:364 +0x1e7 fp=0xc000031f60 sp=0xc000031f58 pc=0x64cdc7
cmd/compile/internal/abi.(*ABIConfig).ABIAnalyzeFuncType(...)
  cmd/compile/internal/abi/abiutils.go:379
cmd/compile/internal/abi.(*ABIConfig).ABIAnalyze(0xc004db0c60, 0xc0358b7ab0, 0x0)
  cmd/compile/internal/abi/abiutils.go:402 +0xed fp=0xc0000320d0 sp=0xc000031f60 pc=0x64c6ad
cmd/compile/internal/ssagen.(*state).call(0xc05abad400, 0xc0358a9360, 0x0, 0x0, {0x0, 0x0})
  cmd/compile/internal/ssagen/ssa.go:5418 +0x669 fp=0xc000032390 sp=0xc0000320d0 pc=0xb62029
cmd/compile/internal/ssagen.(*state).callResult(...)
  cmd/compile/internal/ssagen/ssa.go:5344
cmd/compile/internal/ssagen.(*state).exprCheckPtr(0xc05abad400, {0xfbc278, 0xc0358a9360}, 0x1)
  cmd/compile/internal/ssagen/ssa.go:3444 +0x1a07 fp=0xc000032988 sp=0xc000032390 pc=0xb42787
cmd/compile/internal/ssagen.(*state).expr(...)
  cmd/compile/internal/ssagen/ssa.go:2776
cmd/compile/internal/ssagen.(*state).stmt(0xc05abad400, {0xfbd6b8, 0xc0358c60a0})
  cmd/compile/internal/ssagen/ssa.go:1699 +0x70f1 fp=0xc000032f58 sp=0xc000032988 pc=0xb3de71
cmd/compile/internal/ssagen.(*state).stmtList(...)
  cmd/compile/internal/ssagen/ssa.go:1442
cmd/compile/internal/ssagen.(*state).stmt(0xc05abad400, {0xfbd6b8, 0xc0358bdb80})
  cmd/compile/internal/ssagen/ssa.go:1457 +0x265 fp=0xc000033528 sp=0xc000032f58 pc=0xb36fe5
cmd/compile/internal/ssagen.(*state).stmtList(...)
  cmd/compile/internal/ssagen/ssa.go:1442
cmd/compile/internal/ssagen.(*state).stmt(0xc05abad400, {0xfbd778, 0xc0120b5500})
  cmd/compile/internal/ssagen/ssa.go:1769 +0x5b65 fp=0xc000033af8 sp=0xc000033528 pc=0xb3c8e5
cmd/compile/internal/ssagen.(*state).stmtList(...)
  cmd/compile/internal/ssagen/ssa.go:1442
cmd/compile/internal/ssagen.buildssa(0xc0120a2f00, 0x3, 0x0)
  cmd/compile/internal/ssagen/ssa.go:571 +0x2465 fp=0xc000033ea0 sp=0xc000033af8 pc=0xb31a65
cmd/compile/internal/ssagen.Compile(0xc0120a2f00, 0x3, 0xc000481c70?)
  cmd/compile/internal/ssagen/pgen.go:302 +0x88 fp=0xc000033f70 sp=0xc000033ea0 pc=0xb28428
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
  cmd/compile/internal/gc/compile.go:188 +0x3c fp=0xc000033fb0 sp=0xc000033f70 pc=0xd3ccfc
cmd/compile/internal/gc.compileFunctions.func3.1()
  cmd/compile/internal/gc/compile.go:170 +0x34 fp=0xc000033fe0 sp=0xc000033fb0 pc=0xd3d134
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc000033fe8 sp=0xc000033fe0 pc=0x489b61
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 1080
  cmd/compile/internal/gc/compile.go:169 +0x247

goroutine 24546 gp=0xc0481b9500 m=nil [runnable]:
runtime.gopark(0xc0528e2f80?, 0x4666c6?, 0xc0?, 0x9e?, 0xc0528e2fc0?)
  runtime/proc.go:424 +0xce fp=0xc0528e2f50 sp=0xc0528e2f30 pc=0x48170e
runtime.goparkunlock(...)
  runtime/proc.go:430
runtime.semacquire1(0xc00016c4fc, 0x0, 0x3, 0x1, 0x15)
  runtime/sema.go:178 +0x225 fp=0xc0528e2fb8 sp=0xc0528e2f50 pc=0x45b0a5
sync.runtime_SemacquireMutex(0x4631d6?, 0x0?, 0x27?)
  runtime/sema.go:95 +0x25 fp=0xc0528e2ff0 sp=0xc0528e2fb8 pc=0x482de5
sync.(*Mutex).lockSlow(0xc00016c4f8)
  sync/mutex.go:173 +0x15d fp=0xc0528e3040 sp=0xc0528e2ff0 pc=0x4a045d
sync.(*Mutex).Lock(...)
  sync/mutex.go:92
cmd/internal/obj.(*Link).LookupABIInit(0xc00016c488, {0xc05a01f4a0, 0x27}, 0x0, 0xc0528e30c8)
  cmd/internal/obj/sym.go:103 +0x85 fp=0xc0528e3090 sp=0xc0528e3040 pc=0x58ed85
cmd/compile/internal/base.linksym(...)
  cmd/compile/internal/base/link.go:52
cmd/compile/internal/base.PkgLinksym({0xc0003a6052, 0x23}, {0xc013daa7ab, 0x3}, 0x0)
  cmd/compile/internal/base/link.go:40 +0xef fp=0xc0528e30f0 sp=0xc0528e3090 pc=0x5a150f
cmd/compile/internal/types.(*Sym).LinksymABI(...)
  cmd/compile/internal/types/sym.go:92
cmd/compile/internal/types.(*Sym).Linksym(0xc00003c508?)
  cmd/compile/internal/types/sym.go:78 +0x5a fp=0xc0528e3128 sp=0xc0528e30f0 pc=0x5fc4da
cmd/compile/internal/ir.(*Name).Linksym(...)
  cmd/compile/internal/ir/name.go:162
cmd/compile/internal/ssagen.AddrAuto(0xc0001fcdb8, 0xc005a6f770?)
  cmd/compile/internal/ssagen/ssa.go:8120 +0x256 fp=0xc0528e31e8 sp=0xc0528e3128 pc=0xb7b0b6
cmd/compile/internal/amd64.ssaGenValue(0xc05a007d60, 0xc005a6f540)
  cmd/compile/internal/amd64/ssa.go:1021 +0x2ee fp=0xc0528e35e0 sp=0xc0528e31e8 pc=0xb85dee
cmd/compile/internal/ssagen.genssa(0xc05a01a340, 0xc05a0514a0)
  cmd/compile/internal/ssagen/ssa.go:7452 +0x5632 fp=0xc0528e3ea0 sp=0xc0528e35e0 pc=0xb789b2
cmd/compile/internal/ssagen.Compile(0xc00ef5ba40, 0x1, 0x0?)
  cmd/compile/internal/ssagen/pgen.go:312 +0x4be fp=0xc0528e3f70 sp=0xc0528e3ea0 pc=0xb2885e
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
  cmd/compile/internal/gc/compile.go:188 +0x3c fp=0xc0528e3fb0 sp=0xc0528e3f70 pc=0xd3ccfc
cmd/compile/internal/gc.compileFunctions.func3.1()
  cmd/compile/internal/gc/compile.go:170 +0x34 fp=0xc0528e3fe0 sp=0xc0528e3fb0 pc=0xd3d134
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc0528e3fe8 sp=0xc0528e3fe0 pc=0x489b61
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 1080
  cmd/compile/internal/gc/compile.go:169 +0x247

goroutine 24865 gp=0xc0481b9c00 m=nil [runnable]:
cmd/compile/internal/ssa.(*Value).AddArg(0xc005a207e0?, 0xc005a20620?)
  cmd/compile/internal/ssa/value.go:248 +0x13b fp=0xc05306f8c8 sp=0xc05306f8c0 pc=0xacdd3b
cmd/compile/internal/ssa.(*expandState).rewriteFuncResults(0xc05306fd80, 0xc005a207e0, 0xc005a56c30, 0xc03cf94018)
  cmd/compile/internal/ssa/expand_calls.go:258 +0x75c fp=0xc05306fa48 sp=0xc05306f8c8 pc=0x794c9c
cmd/compile/internal/ssa.expandCalls(0xc05ab39860)
  cmd/compile/internal/ssa/expand_calls.go:212 +0xe85 fp=0xc05306fe48 sp=0xc05306fa48 pc=0x793945
cmd/compile/internal/ssa.Compile(0xc05ab39860)
  cmd/compile/internal/ssa/compile.go:97 +0xa58 fp=0xc053073af8 sp=0xc05306fe48 pc=0x76d058
cmd/compile/internal/ssagen.buildssa(0xc0078b9040, 0x0, 0x0)
  cmd/compile/internal/ssagen/ssa.go:591 +0x26dd fp=0xc053073ea0 sp=0xc053073af8 pc=0xb31cdd
cmd/compile/internal/ssagen.Compile(0xc0078b9040, 0x0, 0xc0000769a0?)
  cmd/compile/internal/ssagen/pgen.go:302 +0x88 fp=0xc053073f70 sp=0xc053073ea0 pc=0xb28428
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
  cmd/compile/internal/gc/compile.go:188 +0x3c fp=0xc053073fb0 sp=0xc053073f70 pc=0xd3ccfc
cmd/compile/internal/gc.compileFunctions.func3.1()
  cmd/compile/internal/gc/compile.go:170 +0x34 fp=0xc053073fe0 sp=0xc053073fb0 pc=0xd3d134
runtime.goexit({})
  runtime/asm_amd64.s:1699 +0x1 fp=0xc053073fe8 sp=0xc053073fe0 pc=0x489b61
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 1080
  cmd/compile/internal/gc/compile.go:169 +0x247

Environment (please complete the following information):

  • OS: OpenBSD 7.5以上
  • Matterbridge version: 1.26.0
  • If self compiled: c4157a4

It compiled fine on OpenBSD 7.4 and earlier.

@BenWiederhake
Copy link
Contributor

That's not a bug in matterbridge. Instead, just don't use all the RAM at the same time.

One way to deal with it is to compile sequentially, and not in parallel. For example, on a machine with particularly low memory I use:
go build -tags nomsteams,nozulip -p 1 -v

@TechnicalSuwako
Copy link
Author

That's not a bug in matterbridge. Instead, just don't use all the RAM at the same time.

This server has 16 GiB of memory, and it's normally not over 2 GiB.
So it can't be a memory issue.

One way to deal with it is to compile sequentially, and not in parallel. For example, on a machine with particularly low memory I use: go build -tags nomsteams,nozulip -p 1 -v

This is in action
thank you

@BenWiederhake
Copy link
Contributor

This server has 16 GiB of memory, and it's normally not over 2 GiB.

The compilation process seems to take (rough estimate) about 1-3 GB per thread. So if you system has 8 or more cores, then GOMAXPROCS defaults to that same "8 or more", resulting in OOM.

Matterbridge really should have a better mechanism of limiting build parallelism. Can you write a PR to add appropriate warnings in the readme or log messages?

@TechnicalSuwako
Copy link
Author

Sorry, I can't speak English (I use an automatic translation to reply)
If I can fix something in the source code, I can make a pull request like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants