zabbix-tools / g2z Goto Github PK
View Code? Open in Web Editor NEWWrite Zabbix modules in Go!
License: Other
Write Zabbix modules in Go!
License: Other
When under load with zabbix_agent_bench
, if all zabbix_agentd: listener
pids happen to process identical item keys at the same time, they appear to deadlock at futex()
.
I didn't find any calls to futex()
in the Zabbix or g2z codebase, so I'm assuming it's occurring somewhere in Go's concurrency logic.
When run zabbix_agentd -t key
all is working fine. When try zabbix_get with the same key the library hangs on net.Dial.
g2z.LogInfof("Before dial")
conn, err := net.DialTimeout("tcp", servAddr, time.Duration(2*time.Second) )
g2z.LogInfof("After dial")
if err != nil {
g2z.LogInfof("Dial failed")
return "", errors.New("Dial failed")
}
g2z.LogInfof("Dial ok")
Log file have "Before dial" and never "After dial" and "Dial ok". Timeout in Dial also doesn't work.
I use gopkg.in/cavaliercoder/g2z.v3/,but it is not support,the log is
`` 19834:20170611:183512.625 Starting Zabbix Agent [Zabbix server]. Zabbix 3.2.6 (revision 67849).
19834:20170611:183512.625 **** Enabled features ****
19834:20170611:183512.625 IPv6 support: NO
19834:20170611:183512.625 TLS support: NO
19834:20170611:183512.625 **************************
19834:20170611:183512.625 using configuration file: /usr/local/zabbix/etc/zabbix_agentd.conf
19834:20170611:183512.628 unsupported module "dummy.so" version: 1
19834:20170611:183512.628 loading modules failed, exiting...
~
For the life of me I couldn't think of a better name for this project. Maybe zmod
?? Seems too ambiguous.
Suggestions are welcomed!
When testing keys in a Go module with zabbix_agentd -t
, occasionally the agent segfaults before exiting with no stack trace printed. This is also observed although much less frequently in zabbix_agentd -p
.
This does not appear to be an issue in the daemonized agent.
Since updating to Go v1.6, zbx_module_item_list()
produces the following issue:
$ zabbix_agentd -p
zabbix_agentd [391]: Dummy module initialized
panic: runtime error: cgo result has Go pointer
goroutine 17 [running, locked to thread]:
panic(0x7ff6bba66340, 0xc82002e320)
/usr/local/go/src/runtime/panic.go:464 +0x3ea
github.com/cavaliercoder/g2z._cgoexpwrap_d7801daa201c_zbx_module_item_list.func1(0xc82002aee0)
??:0 +0x3c
github.com/cavaliercoder/g2z._cgoexpwrap_d7801daa201c_zbx_module_item_list(0xc82000c180)
??:0 +0x5d
Aborted
Tests work fine in the Dummy module, but any tests run for the g2z package fail with:
$ go test -v
# testmain
2015/08/29 15:41:53 duplicate symbol _cgoexp_d7801daa201c_zbx_module_api_version (types 1 and 1) in _/usr/src/g2z and $WORK/github.com/cavaliercoder/g2z.a(_go_.o)
FAIL _/usr/src/g2z [build failed]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.