grafana / xk6-browser

The browser module adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol to k6.
https://grafana.com/docs/k6/latest/javascript-api/k6-browser/
GNU Affero General Public License v3.0
343 stars 41 forks source link

Network deadlocks on remote #1036

Closed inancgumus closed 12 months ago

inancgumus commented 1 year ago

Brief summary

The browser test deadlocks on networking when more VUs are added.

Test run ID: 1944201 (prod).

xk6-browser version

Remote

OS

Remote

Chrome version

Remote

Docker version and image (if applicable)

No response

Steps to reproduce the problem

Expected behaviour

No deadlock.

Actual behaviour

Further investigation is needed, but it seems like a network/communication problem:

github.com/grafana/xk6-browser/common.(*NetworkManager).handleEvents(0xc00904dce0, 0xc005aaf4a0)
    github.com/grafana/xk6-browser@v1.0.2/common/network_manager.go:308 +0x99 fp=0xc00426cfb0 sp=0xc00426cf18 pc=0x11e1299
github.com/grafana/xk6-browser/common.(*NetworkManager).initEvents.func1()
    github.com/grafana/xk6-browser@v1.0.2/common/network_manager.go:302 +0x37 fp=0xc00426cfe0 sp=0xc00426cfb0 pc=0x11e11d7
runtime.goexit()
    runtime/asm_amd64.s:1598 +0x1 fp=0xc00426cfe8 sp=0xc00426cfe0 pc=0x46fbe1
created by github.com/grafana/xk6-browser/common.(*NetworkManager).initEvents
    github.com/grafana/xk6-browser@v1.0.2/common/network_manager.go:301 +0x14d
goroutine 344777 [select, 4 minutes]:
runtime.gopark(0xc0083e2788?, 0x2?, 0x88?, 0x5a?, 0xc0083e277c?)
    runtime/proc.go:381 +0xd6 fp=0xc0083e2608 sp=0xc0083e25e8 pc=0x43bb16
runtime.selectgo(0xc0083e2788, 0xc0083e2778, 0x0?, 0x0, 0xc0072d2b40?, 0x1)
    runtime/select.go:327 +0x7be fp=0xc0083e2748 sp=0xc0083e2608 pc=0x44c1be
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0xc0071cf180, {0x1a0c660, 0xc008141310})
    github.com/grafana/xk6-browser@v1.0.2/common/event_emitter.go:130 +0xab fp=0xc0083e27b8 sp=0xc0083e2748 pc=0x11a574b
github.com/grafana/xk6-browser/common.NewBaseEventEmitter.func1()
    github.com/grafana/xk6-browser@v1.0.2/common/event_emitter.go:120 +0x2e fp=0xc0083e27e0 sp=0xc0083e27b8 pc=0x11a566e
runtime.goexit()
    runtime/asm_amd64.s:1598 +0x1 fp=0xc0083e27e8 sp=0xc0083e27e0 pc=0x46fbe1
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter
    github.com/grafana/xk6-browser@v1.0.2/common/event_emitter.go:120 +0x1aa
inancgumus commented 12 months ago

Closed by #1072.