Giter Club home page Giter Club logo

Comments (7)

myzhan avatar myzhan commented on August 24, 2024

之前我也遇到过这个问题,但是不能稳定重现。你那边是否能稳定重现?

是上游 gomq 的一个问题。

from boomer.

weigun avatar weigun commented on August 24, 2024

我这边也有这个问题,脚本参考的是http://myzhan.github.io/2016/03/01/write-a-load-testing-tool-in-golang/
go版本是1.10
./stest --master-host=127.0.0.1 --master-port=5557 --rpc=zeromq

from boomer.

myzhan avatar myzhan commented on August 24, 2024

from boomer.

weigun avatar weigun commented on August 24, 2024

除了遇到这个问题外,还有其他报错,master收到u'runtime error: invalid memory address or nil pointer dereference'的报错

另外,如果rpc使用socket,会提示out of memory
环境:
Linux VM_106_14_centos 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
go:1.10.3
gomq:go get -u github.com/zeromq/gomq
`package main

import boomer "github.com/myzhan/boomer"

import (
"time"
"net/http"
"log"
)

func now() int64 {
return time.Now().UnixNano() / int64(time.Millisecond)
}

func test_http() {
/*
一个常规的 HTTP GET 操作,实际使用时,这里放业务自身的处理过程
只要将处理结果,通过 boomer 暴露出来的函数汇报就行了
请求成功,类似 Locust 的 events.request_success.fire
boomer.Events.Publish("request_success", type, name, 处理时间, 响应耗时)
请求失败,类似 Locust 的 events.request_failure.fire
boomer.Events.Publish("request_failure", type, name, 处理时间, 错误信息)
*/
startTime := now()
resp, err := http.Get("http://10.112.225.241/api/test")
defer resp.Body.Close()
endTime := now()
log.Println(float64(endTime - startTime))
if err != nil {
boomer.Events.Publish("request_failure", "http", "/api/test", 0.0, err.Error())
}else {
boomer.Events.Publish("request_success", "http", "/api/test", float64(endTime - startTime), resp.ContentLength)
}
}

func main() {

    task := &boomer.Task{
    // Weight 权重,和 Locust 的 task 权重类似,在有多个 task 的时候生效
                            // FIXED: 之前误写为Weith
                            Weight: 10,
    // Fn 类似于 Locust 的 task
            Fn: test_http,
            Name: "json",
    }

    /*
    通知 boomer 去执行自定义函数,支持多个
    boomer.Run(task1, task2, task3)
    */

    boomer.Run(task)

}`
log:

goroutine 8 [running]:
runtime/debug.Stack(0xc4203f1d10, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4203f1f20, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420208150, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420208360, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420208570, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420208780, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420208990, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420208ba0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420208db0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420208fc0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4202091d0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4202093e0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4202095f0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420209800, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420209a10, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420209c20, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc420209e30, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e0060, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e0270, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e0480, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e0690, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e08a0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e0ab0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e0cc0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e0ed0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e10e0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e12f0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e1500, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf
goroutine 8 [running]:
runtime/debug.Stack(0xc4201e1710, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/myzhan/boomer.(*runner).safeRun.func1()
/root/golang/src/github.com/myzhan/boomer/runner.go:48 +0x5a
panic(0x8b98a0, 0xbff5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
main.test_http()
/root/golang/login.go:28 +0x60
github.com/myzhan/boomer.(*runner).safeRun(0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:52 +0x43
github.com/myzhan/boomer.(*runner).spawnGoRoutines.func1(0xc420072240, 0xc420070300, 0x983168)
/root/golang/src/github.com/myzhan/boomer/runner.go:98 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnGoRoutines
/root/golang/src/github.com/myzhan/boomer/runner.go:83 +0x1cf

  • 使用socket的log

[root@VM_106_14_centos golang]# ./stest --master-host=127.0.0.1 --master-port=5557 --rpc=socket
2018/07/23 13:42:51 Boomer is built with gomq support.
2018/07/23 13:42:51 Boomer is connected to master(127.0.0.1:5557) press Ctrl+c to quit.
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x96e899, 0x16)
/usr/local/go/src/runtime/panic.go:616 +0x81
runtime.sysMap(0xc420200000, 0xff000000, 0x0, 0xc304b8)
/usr/local/go/src/runtime/mem_linux.go:216 +0x20a
runtime.(*mheap).sysAlloc(0xc17160, 0xff000000, 0x0)
/usr/local/go/src/runtime/malloc.go:470 +0xd4
runtime.(*mheap).grow(0xc17160, 0x7f800, 0x0)
/usr/local/go/src/runtime/mheap.go:907 +0x60
runtime.(*mheap).allocSpanLocked(0xc17160, 0x7f800, 0xc304c8, 0xc420026500)
/usr/local/go/src/runtime/mheap.go:820 +0x301
runtime.(*mheap).alloc_m(0xc17160, 0x7f800, 0x200000101, 0x100000000)
/usr/local/go/src/runtime/mheap.go:686 +0x118
runtime.(*mheap).alloc.func1()
/usr/local/go/src/runtime/mheap.go:753 +0x4d
runtime.(*mheap).alloc(0xc17160, 0x7f800, 0xc420010101, 0xc420074a80)
/usr/local/go/src/runtime/mheap.go:752 +0x8a
runtime.largeAlloc(0xff000000, 0xc420060101, 0x1)
/usr/local/go/src/runtime/malloc.go:826 +0x94
runtime.mallocgc.func1()
/usr/local/go/src/runtime/malloc.go:721 +0x46
runtime.systemstack(0x0)
/usr/local/go/src/runtime/asm_amd64.s:409 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1175

goroutine 21 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:363 fp=0xc420033e50 sp=0xc420033e48 pc=0x4564f0
runtime.mallocgc(0xff000000, 0x8913e0, 0x1, 0xc42008c5cc)
/usr/local/go/src/runtime/malloc.go:720 +0x8a2 fp=0xc420033ef0 sp=0xc420033e50 pc=0x4120c2
runtime.makeslice(0x8913e0, 0xff000000, 0xff000000, 0x4, 0x4, 0x0)
/usr/local/go/src/runtime/slice.go:61 +0x77 fp=0xc420033f20 sp=0xc420033ef0 pc=0x4423f7
github.com/myzhan/boomer.(*socketClient).recvBytes(0xc4200904b8, 0xff000000, 0xc42008c5cc, 0x4, 0x4)
/root/golang/src/github.com/myzhan/boomer/client_socket.go:32 +0x43 fp=0xc420033f98 sp=0xc420033f20 pc=0x8366a3
github.com/myzhan/boomer.(*socketClient).recv(0xc4200904b8)
/root/golang/src/github.com/myzhan/boomer/client_socket.go:47 +0x3a fp=0xc420033fd8 sp=0xc420033f98 pc=0x8367da
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420033fe0 sp=0xc420033fd8 pc=0x459061
created by github.com/myzhan/boomer.newSocketClient
/root/golang/src/github.com/myzhan/boomer/client_socket.go:26 +0x2ab

goroutine 1 [chan receive]:
github.com/myzhan/boomer.Run(0xc42000e020, 0x1, 0x1)
/root/golang/src/github.com/myzhan/boomer/boomer.go:147 +0x47e
main.main()
/root/golang/login.go:55 +0xc2

goroutine 19 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:139 +0xa6
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
/usr/local/go/src/os/signal/signal_unix.go:28 +0x41

goroutine 4 [select]:
github.com/myzhan/boomer.initStats.func1()
/root/golang/src/github.com/myzhan/boomer/stats.go:283 +0x15c
created by github.com/myzhan/boomer.initStats
/root/golang/src/github.com/myzhan/boomer/stats.go:280 +0x7c

goroutine 5 [chan receive]:
github.com/myzhan/boomer.initStats.func2()
/root/golang/src/github.com/myzhan/boomer/stats.go:302 +0x7a
created by github.com/myzhan/boomer.initStats
/root/golang/src/github.com/myzhan/boomer/stats.go:298 +0x94

goroutine 22 [running]:
goroutine running on other thread; stack unavailable
created by github.com/myzhan/boomer.newSocketClient
/root/golang/src/github.com/myzhan/boomer/client_socket.go:27 +0x2cd

goroutine 23 [chan receive]:
github.com/myzhan/boomer.(*runner).listener(0xc42009e120)
/root/golang/src/github.com/myzhan/boomer/runner.go:159 +0x58
created by github.com/myzhan/boomer.(*runner).getReady
/root/golang/src/github.com/myzhan/boomer/runner.go:250 +0x68

goroutine 24 [chan receive]:
github.com/myzhan/boomer.(*runner).getReady.func1(0xc42009e120)
/root/golang/src/github.com/myzhan/boomer/runner.go:259 +0x6e
created by github.com/myzhan/boomer.(*runner).getReady
/root/golang/src/github.com/myzhan/boomer/runner.go:256 +0x121

goroutine 25 [select, locked to thread]:
runtime.gopark(0x983830, 0x0, 0x96636a, 0x6, 0x18, 0x1)
/usr/local/go/src/runtime/proc.go:291 +0x11a
runtime.selectgo(0xc420035f50, 0xc4200702a0)
/usr/local/go/src/runtime/select.go:392 +0xe50
runtime.ensureSigM.func1()
/usr/local/go/src/runtime/signal_unix.go:549 +0x1f4
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2361 +0x1

from boomer.

myzhan avatar myzhan commented on August 24, 2024

@weigun 两个问题

  1. invalid memory address or nil pointer dereference,是 HTTP Body 为 nil,blog 里面的代码有点问题,请参考 https://github.com/myzhan/boomer/blob/master/examples/http_benchmark.go 的写法。
  2. boomer 你用 socket 的话,请确认 locust 用的也是 socket,因为 locust 的 socket 实现已经被废弃了。

from boomer.

weigun avatar weigun commented on August 24, 2024

@myzhan
好的

from boomer.

myzhan avatar myzhan commented on August 24, 2024

zeromq/gomq#75

from boomer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.