Stacktrace Memory related?

runtime.throw(0x1272bba, 0x16)
        runtime/panic.go:1117 +0x72
runtime.sysMap(0xc1d0000000, 0x44000000, 0x1de93f0)
        runtime/mem_linux.go:169 +0xc6
runtime.(*mheap).sysAlloc(0x1dcf280, 0x41000000, 0x42c1f7, 0x1dcf288)
        runtime/malloc.go:729 +0x1e5
runtime.(*mheap).grow(0x1dcf280, 0x20800, 0x0)
        runtime/mheap.go:1346 +0x85
runtime.(*mheap).allocSpan(0x1dcf280, 0x20800, 0xc000090100, 0x4418bd)
        runtime/mheap.go:1173 +0x609
runtime.(*mheap).alloc.func1()
        runtime/mheap.go:910 +0x59
runtime.systemstack(0x0)
        runtime/asm_amd64.s:379 +0x66
runtime.mstart()
        runtime/proc.go:1246

goroutine 31 [running]:
runtime.systemstack_switch()
        runtime/asm_amd64.s:339 fp=0xc002c665e0 sp=0xc002c665d8 pc=0x46cc40
runtime.(*mheap).alloc(0x1dcf280, 0x20800, 0x4f0001, 0x148dec0)
        runtime/mheap.go:904 +0x85 fp=0xc002c66630 sp=0xc002c665e0 pc=0x427ea5
runtime.(*mcache).allocLarge(0x7fc1f4f57f18, 0x41000000, 0x1370100, 0xc002c666f0)
        runtime/mcache.go:224 +0x97 fp=0xc002c66688 sp=0xc002c66630 pc=0x418517
runtime.mallocgc(0x41000000, 0x0, 0xc00229fd00, 0xc0019b9a01)
        runtime/malloc.go:1078 +0x925 fp=0xc002c66710 sp=0xc002c66688 pc=0x40df65
runtime.slicebytetostring(0x0, 0xc082e1e000, 0x41000000, 0x0, 0x0)
        runtime/string.go:110 +0x90 fp=0xc002c66740 sp=0xc002c66710 pc=0x453fb0
bytes.(*Buffer).String(...)
        bytes/buffer.go:65
go.k6.io/k6/lib/netext/httpext.readResponseBody(0xc002c70000, 0x0, 0xc000dc8cf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        go.k6.io/k6/lib/netext/httpext/compression.go:211 +0x774 fp=0xc002c66888 sp=0xc002c66740 pc=0xea6f14
go.k6.io/k6/lib/netext/httpext.MakeRequest(0x14a4708, 0xc0014362d0, 0xc000dc8b40, 0x0, 0x0, 0x0)
        go.k6.io/k6/lib/netext/httpext/request.go:298 +0x1407 fp=0xc002c66e48 sp=0xc002c66888 pc=0xeaa907
go.k6.io/k6/js/modules/k6/http.(*HTTP).Request(0xc0007637c0, 0x14a4708, 0xc0014362d0, 0x125ff49, 0x3, 0x14b60c0, 0xc0027ce230, 0xc000d354a0, 0x2, 0x2, ...)
        go.k6.io/k6/js/modules/k6/http/request.go:123 +0x452 fp=0xc002c66f18 sp=0xc002c66e48 pc=0xec4052
go.k6.io/k6/js/modules/k6/http.(*HTTP).Get(0xc0007637c0, 0x14a4708, 0xc0014362d0, 0x14b60c0, 0xc0027ce230, 0xc0024a19e0, 0x1, 0x2, 0x0, 0x0, ...)
        go.k6.io/k6/js/modules/k6/http/request.go:55 +0x145 fp=0xc002c66fb0 sp=0xc002c66f18 pc=0xec34e5
runtime.call128(0xc0014365a0, 0xc00107e108, 0xc000cefb00, 0x4000000058)
        runtime/asm_amd64.s:553 +0x59 fp=0xc002c67040 sp=0xc002c66fb0 pc=0x46d219
reflect.Value.call(0x11f1c20, 0xc0007637c0, 0x1613, 0x1265e66, 0x9, 0xc000bf9090, 0x3, 0x3, 0xb, 0x11a5b20, ...)
        reflect/value.go:476 +0x8e7 fp=0xc002c67248 sp=0xc002c67040 pc=0x4db067
reflect.Value.CallSlice(0x11f1c20, 0xc0007637c0, 0x1613, 0xc000bf9090, 0x3, 0x3, 0x194, 0x1, 0x2)
        reflect/value.go:350 +0xb9 fp=0xc002c672c8 sp=0xc002c67248 pc=0x4da6b9
go.k6.io/k6/js/common.Bind.func1(0x14b5c98, 0xc0013e6a80, 0xc000d85870, 0x2, 0x5, 0x3, 0x1)
        go.k6.io/k6/js/common/bridge.go:241 +0x749 fp=0xc002c674c0 sp=0xc002c672c8 pc=0xa58bc9
github.com/dop251/goja.(*vm)._nativeCall(0xc0009b6200, 0xc000d849c0, 0x2)
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/vm.go:2357 +0x266 fp=0xc002c67578 sp=0xc002c674c0 pc=0x98f4e6
github.com/dop251/goja.call.exec(0x2, 0xc0009b6200)
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/vm.go:2329 +0x776 fp=0xc002c67668 sp=0xc002c67578 pc=0x98f176
github.com/dop251/goja.(*call).exec(0x1bb3f30, 0xc0009b6200)
        <autogenerated>:1 +0x45 fp=0xc002c67688 sp=0xc002c67668 pc=0x9c8145
github.com/dop251/goja.(*vm).run(0xc0009b6200)
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/vm.go:395 +0x94 fp=0xc002c676c8 sp=0xc002c67688 pc=0x97fdf4
github.com/dop251/goja.(*funcObject).call(0xc002c5e270, 0x14b64e8, 0x1de5c40, 0xc0024a1980, 0x1, 0x1, 0x0, 0x0, 0x203000, 0x8)
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/func.go:161 +0x225 fp=0xc002c67730 sp=0xc002c676c8 pc=0x9300a5
github.com/dop251/goja.(*funcObject).Call(...)
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/func.go:129
github.com/dop251/goja.(*funcObject).Call-fm(0x14b64e8, 0x1de5c40, 0xc0024a1980, 0x1, 0x1, 0x4d00000000203000, 0x3)
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/func.go:128 +0x88 fp=0xc002c677b8 sp=0xc002c67730 pc=0x9b08c8
github.com/dop251/goja.AssertFunction.func1.2()
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/runtime.go:2095 +0x96 fp=0xc002c67830 sp=0xc002c677b8 pc=0x99d1b6
github.com/dop251/goja.(*vm).try(0xc0009b6200, 0xc002c67948, 0x0)
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/vm.go:511 +0x188 fp=0xc002c67918 sp=0xc002c67830 pc=0x980248
github.com/dop251/goja.AssertFunction.func1(0x14b64e8, 0x1de5c40, 0xc0024a1980, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
        github.com/dop251/goja@v0.0.0-20210427212725-462d53687b0d/runtime.go:2094 +0x10b fp=0xc002c679a8 sp=0xc002c67918 pc=0x99d30b
go.k6.io/k6/js.(*VU).runFn(0xc00268e320, 0x14a4708, 0xc0014362d0, 0x1080f01, 0xc00000dda0, 0xc0024a1980, 0x1, 0x1, 0x0, 0x0, ...)
        go.k6.io/k6/js/runner.go:742 +0x154 fp=0xc002c67a88 sp=0xc002c679a8 pc=0xededb4
go.k6.io/k6/js.(*ActiveVU).RunOnce(0xc000261fc0, 0x0, 0x0)
        go.k6.io/k6/js/runner.go:693 +0x414 fp=0xc002c67ba8 sp=0xc002c67a88 pc=0xede8f4
go.k6.io/k6/lib/executor.getIterationRunner.func1(0x14a4708, 0xc001436060, 0x148eb00, 0xc000261fc0, 0xc0028a0e01)
        go.k6.io/k6/lib/executor/helpers.go:88 +0x5e fp=0xc002c67d78 sp=0xc002c67ba8 pc=0xa3b63e
go.k6.io/k6/lib/executor.ConstantVUs.Run.func3(0x14981c8, 0xc00268e320)
        go.k6.io/k6/lib/executor/constant_vus.go:206 +0x347 fp=0xc002c67fd0 sp=0xc002c67d78 pc=0xa3aee7
runtime.goexit()
        runtime/asm_amd64.s:1371 +0x1 fp=0xc002c67fd8 sp=0xc002c67fd0 pc=0x46e941
created by go.k6.io/k6/lib/executor.ConstantVUs.Run
        go.k6.io/k6/lib/executor/constant_vus.go:217 +0x8df

goroutine 1 [chan receive, 51 minutes]:
go.k6.io/k6/core/local.(*ExecutionScheduler).Run(0xc0002e4840, 0x14a4660, 0xc000d836c0, 0x14a4660, 0xc000260bc0, 0xc000c9bb60, 0x0, 0x0)
        go.k6.io/k6/core/local/local.go:391 +0x677
go.k6.io/k6/core.(*Engine).Init.func1(0xc000cb80f0, 0xc00243c898)
        go.k6.io/k6/core/engine.go:201 +0x122
go.k6.io/k6/cmd.getRunCmd.func1(0xc00077bb80, 0xc00007f6d0, 0x1, 0x5, 0x0, 0x0)
        go.k6.io/k6/cmd/run.go:273 +0x167b
github.com/spf13/cobra.(*Command).execute(0xc00077bb80, 0xc00050d300, 0x5, 0x8, 0xc00077bb80, 0xc00050d300)
        github.com/spf13/cobra@v1.1.3/command.go:852 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc00077a000, 0xc00051fdf0, 0xc, 0xc)
        github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.1.3/command.go:897
go.k6.io/k6/cmd.Execute()
        go.k6.io/k6/cmd/root.go:182 +0x591
main.main()
        go.k6.io/k6/main.go:28 +0x25

goroutine 8 [select, 51 minutes]:
io.(*pipe).Read(0xc00025a7e0, 0xc000409000, 0x1000, 0x1000, 0x1081aa0, 0x1, 0xc000409000)
        io/pipe.go:57 +0xcb
io.(*PipeReader).Read(0xc00000e600, 0xc000409000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        io/pipe.go:134 +0x4c
bufio.(*Scanner).Scan(0xc000598f38, 0x0)
        bufio/scan.go:214 +0xa9
github.com/sirupsen/logrus.(*Entry).writerScanner(0xc00076b3b0, 0xc00000e600, 0xc000069b50)
        github.com/sirupsen/logrus@v1.8.1/writer.go:59 +0xb7
created by github.com/sirupsen/logrus.(*Entry).WriterLevel
        github.com/sirupsen/logrus@v1.8.1/writer.go:51 +0x1b7

goroutine 49 [select]:
go.k6.io/k6/cmd.showProgress(0x14a4660, 0xc000d838c0, 0x0, 0x1, 0x1, 0xebbdb3ed0000, 0x1, 0x0, 0x0, 0x0, ...)
        go.k6.io/k6/cmd/ui.go:363 +0x4ea
go.k6.io/k6/cmd.getRunCmd.func1.1(0xc0002e4840, 0x14a4660, 0xc000d838c0, 0xc0015f8780, 0xc00076b1f0, 0xc000c80b20)
        go.k6.io/k6/cmd/run.go:182 +0x1e5
created by go.k6.io/k6/cmd.getRunCmd.func1
        go.k6.io/k6/cmd/run.go:177 +0xdcc

goroutine 50 [IO wait, 51 minutes]:
internal/poll.runtime_pollWait(0x7fc1ce29e9d8, 0x72, 0x0)
        runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc001f16198, 0x72, 0x0, 0x0, 0x1263a36)
        internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
        internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc001f16180, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        internal/poll/fd_unix.go:401 +0x212
net.(*netFD).accept(0xc001f16180, 0x30, 0x30, 0x7fc1f4f57108)
        net/fd_unix.go:172 +0x45
net.(*TCPListener).accept(0xc001078060, 0xc000597d40, 0x40e0f8, 0x30)
        net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc001078060, 0x119a6e0, 0xc001396690, 0x10c1460, 0x1d97450)
        net/tcpsock.go:261 +0x65
net/http.(*Server).Serve(0xc000bf0000, 0x14a1c40, 0xc001078060, 0x0, 0x0)
        net/http/server.go:2981 +0x285
net/http.(*Server).ListenAndServe(0xc000bf0000, 0xc000bf0000, 0xc001396060)
        net/http/server.go:2910 +0xba
net/http.ListenAndServe(...)
        net/http/server.go:3164
go.k6.io/k6/api.ListenAndServe(0x126b009, 0xe, 0xc000224c00, 0x14b92e0, 0xc00076b1f0, 0x1, 0x1)
        go.k6.io/k6/api/server.go:46 +0xd4
go.k6.io/k6/cmd.getRunCmd.func1.2(0xc00076b1f0, 0xc000224c00, 0xc00077bb80)
        go.k6.io/k6/cmd/run.go:205 +0xf5
created by go.k6.io/k6/cmd.getRunCmd.func1
        go.k6.io/k6/cmd/run.go:203 +0x1f5c

goroutine 52 [syscall, 51 minutes]:
os/signal.signal_recv(0x0)
        runtime/sigqueue.go:168 +0xa5
os/signal.loop()
        os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
        os/signal/signal.go:151 +0x45

goroutine 18 [chan receive, 51 minutes]:
go.k6.io/k6/cmd.getRunCmd.func1.3(0xc000c9bbc0, 0xc00076b1f0, 0xc0027e19c0, 0xc0027e1990)
        go.k6.io/k6/cmd/run.go:234 +0x45
created by go.k6.io/k6/cmd.getRunCmd.func1
        go.k6.io/k6/cmd/run.go:233 +0x14b9

goroutine 24 [select]:
go.k6.io/k6/core.(*Engine).processMetrics(0xc000224c00, 0x14a4660, 0xc000d836c0, 0xc002c401e0)
        go.k6.io/k6/core/engine.go:341 +0x225
go.k6.io/k6/core.(*Engine).startBackgroundProcesses.func1(0xc002c6a630, 0xc000224c00, 0x14a4660, 0xc000d836c0, 0xc002c401e0)
        go.k6.io/k6/core/engine.go:236 +0x75
created by go.k6.io/k6/core.(*Engine).startBackgroundProcesses
        go.k6.io/k6/core/engine.go:234 +0x9a

goroutine 25 [select]:
go.k6.io/k6/core.(*Engine).runMetricsEmission(0xc000224c00, 0x14a4660, 0xc000d83740)
        go.k6.io/k6/core/engine.go:401 +0xbe
go.k6.io/k6/core.(*Engine).startBackgroundProcesses.func2(0xc002c6a630, 0xc000224c00, 0x14a4660, 0xc000d83740)
        go.k6.io/k6/core/engine.go:245 +0xcd
created by go.k6.io/k6/core.(*Engine).startBackgroundProcesses
        go.k6.io/k6/core/engine.go:242 +0xf7

goroutine 26 [select, 51 minutes]:
go.k6.io/k6/core.(*Engine).startBackgroundProcesses.func3(0xc002c6a630, 0xc002c40180, 0xc000224c00, 0x14a4660, 0xc000d83740, 0xc00285fc80, 0xc002c40240)
        go.k6.io/k6/core/engine.go:254 +0x130
created by go.k6.io/k6/core.(*Engine).startBackgroundProcesses
        go.k6.io/k6/core/engine.go:252 +0x196

goroutine 27 [select]:
go.k6.io/k6/core.(*Engine).startBackgroundProcesses.func4(0xc002c6a630, 0xc000224c00, 0xc002c40240, 0x14a4660, 0xc000d83740)
        go.k6.io/k6/core/engine.go:292 +0x19e
created by go.k6.io/k6/core.(*Engine).startBackgroundProcesses
        go.k6.io/k6/core/engine.go:285 +0x25e

goroutine 28 [chan receive, 51 minutes]:
go.k6.io/k6/cmd.getRunCmd.func1.4(0x14a4660, 0xc000d83740, 0xc0002e4840, 0xc002c402a0)
        go.k6.io/k6/cmd/run.go:259 +0x48
created by go.k6.io/k6/cmd.getRunCmd.func1
        go.k6.io/k6/cmd/run.go:258 +0x1d8b

goroutine 29 [semacquire, 51 minutes]:
sync.runtime_Semacquire(0xc002c6ada8)
        runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc002c6ada0)
        sync/waitgroup.go:130 +0x65
go.k6.io/k6/lib/executor.ConstantVUs.Run(0xc000d83880, 0x1263cc8, 0x7, 0x12691ee, 0xc, 0x0, 0x0, 0x6fc23ac00, 0x0, 0x0, ...)
        go.k6.io/k6/lib/executor/constant_vus.go:220 +0x9e5
go.k6.io/k6/core/local.(*ExecutionScheduler).runExecutor(0xc0002e4840, 0x14a4660, 0xc000260c40, 0xc002c72060, 0xc000c9bb60, 0x14a9c18, 0xc000c97dd0)
        go.k6.io/k6/core/local/local.go:329 +0x41b
created by go.k6.io/k6/core/local.(*ExecutionScheduler).Run
        go.k6.io/k6/core/local/local.go:385 +0x5e5

goroutine 30 [chan receive, 51 minutes]:
go.k6.io/k6/lib/executor.trackProgress(0x14a4660, 0xc000260c40, 0x14a46d0, 0xc002c73da0, 0x14a46d0, 0xc002c73e00, 0x14a9c18, 0xc000dc83f0, 0xc001436030)
        go.k6.io/k6/lib/executor/helpers.go:166 +0xab
created by go.k6.io/k6/lib/executor.ConstantVUs.Run
        go.k6.io/k6/lib/executor/constant_vus.go:170 +0x637

goroutine 32 [chan receive, 51 minutes]:
go.k6.io/k6/js.(*VU).Activate.func4(0x14a4708, 0xc0014362d0, 0xc00268e320, 0xc000261fc0, 0xc002c3c410)
        go.k6.io/k6/js/runner.go:640 +0x4c
created by go.k6.io/k6/js.(*VU).Activate
        go.k6.io/k6/js/runner.go:638 +0x7f9

goroutine 177 [IO wait]:
internal/poll.runtime_pollWait(0x7fc1ce29e8f0, 0x72, 0xffffffffffffffff)
        runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc001e66f18, 0x72, 0x9b00, 0x9b90, 0xffffffffffffffff)
        internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
        internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc001e66f00, 0xc00009e000, 0x9b90, 0x9b90, 0x0, 0x0, 0x0)
        internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc001e66f00, 0xc00009e000, 0x9b90, 0x9b90, 0xc002344640, 0xc00009e00d, 0x0)
        net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc00107e008, 0xc00009e000, 0x9b90, 0x9b90, 0x0, 0x0, 0x0)
        net/net.go:183 +0x91
go.k6.io/k6/lib/netext.(*Conn).Read(0xc000d340c0, 0xc00009e000, 0x9b90, 0x9b90, 0x40d99b, 0xc002e1ea08, 0x18)
        go.k6.io/k6/lib/netext/dialer.go:255 +0x55
crypto/tls.(*atLeastReader).Read(0xc002e1ea08, 0xc00009e000, 0x9b90, 0x9b90, 0x9b83, 0xc000080000, 0x0)
        crypto/tls/conn.go:776 +0x63
bytes.(*Buffer).ReadFrom(0xc000315af8, 0x148dd20, 0xc002e1ea08, 0x40b725, 0x10edb40, 0x1190380)
        bytes/buffer.go:204 +0xbe
crypto/tls.(*Conn).readFromUntil(0xc000315880, 0x7fc1cde1e358, 0xc000d340c0, 0x5, 0xc000d340c0, 0x18c)
        crypto/tls/conn.go:798 +0xf3
crypto/tls.(*Conn).readRecordOrCCS(0xc000315880, 0x0, 0x0, 0x10514)
        crypto/tls/conn.go:605 +0x115
crypto/tls.(*Conn).readRecord(...)
        crypto/tls/conn.go:573
crypto/tls.(*Conn).Read(0xc000315880, 0xc0000a8000, 0x10521, 0x10521, 0x0, 0x0, 0x0)
        crypto/tls/conn.go:1276 +0x165
crypto/tls.(*atLeastReader).Read(0xc002e1e9f0, 0xc0000a8000, 0x10521, 0x10521, 0xc002c339f8, 0xc000080000, 0x0)
        crypto/tls/conn.go:776 +0x63
bytes.(*Buffer).ReadFrom(0xc0001153f8, 0x148dd20, 0xc002e1e9f0, 0x40b725, 0x10edb40, 0x1224920)
        bytes/buffer.go:204 +0xbe
crypto/tls.(*Conn).readFromUntil(0xc000115180, 0x7fc1ce113188, 0xc000315880, 0x5, 0xc000315880, 0xd4)
        crypto/tls/conn.go:798 +0xf3
crypto/tls.(*Conn).readRecordOrCCS(0xc000115180, 0x0, 0x0, 0x43abbc)
        crypto/tls/conn.go:605 +0x115
crypto/tls.(*Conn).readRecord(...)
        crypto/tls/conn.go:573
crypto/tls.(*Conn).Read(0xc000115180, 0xc000026000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        crypto/tls/conn.go:1276 +0x165
net/http.(*persistConn).Read(0xc000cbb0e0, 0xc000026000, 0x1000, 0x1000, 0xc000101140, 0xc002c33d40, 0x405755)
        net/http/transport.go:1922 +0x77
bufio.(*Reader).fill(0xc0029819e0)
        bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc0029819e0, 0x1, 0x0, 0x1, 0x4, 0x1, 0x3)
        bufio/bufio.go:139 +0x4f
net/http.(*persistConn).readLoop(0xc000cbb0e0)
        net/http/transport.go:2083 +0x1a8
created by net/http.(*Transport).dialConn
        net/http/transport.go:1743 +0xc77

goroutine 178 [select]:
net/http.(*persistConn).writeLoop(0xc000cbb0e0)
        net/http/transport.go:2382 +0xf7
created by net/http.(*Transport).dialConn
        net/http/transport.go:1744 +0xc9c

Hi @jons, welcome to the community forum :tada:

Given:

I would expect that right above it said ‘fatal error: runtime out of memory’? Which means that the process couldn’t allocate any more memory. So - yes this stacktrace is memory related.

A short list of things that might help(stolen from here):

  1. You are using the latest k6 version, (v0.33.0 was released yesterday) if not - upgrade to it.
  2. Are you reading any files that you need as input, if yes - use SharedArray
  3. Are you importing a lot of js code? Js code needs to be copied and ran per each VU as they are completely separate JS VMs. So if you are importing some big library this can be a problem.

Hope this helps you