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

dbus.Store: length mismatch #4

Open
XiJinyu opened this issue Aug 12, 2021 · 1 comment
Open

dbus.Store: length mismatch #4

XiJinyu opened this issue Aug 12, 2021 · 1 comment

Comments

@XiJinyu
Copy link

XiJinyu commented Aug 12, 2021

When I use this tool, it report the following error:

[root@localhost bin]# ./ganesha_exporter
2021/08/12 10:59:44 dbus.Store: length mismatch
panic: dbus.Store: length mismatch

goroutine 9 [running]:
log.Panic(0xc0002056c0, 0x1, 0x1)
/usr/lib/golang/src/log/log.go:351 +0xae
github.com/Gandi/ganesha_exporter/dbus.ExportMgr.GetNFSv41IO(0x9bc080, 0xc0000a2000, 0x2711, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/!gandi/[email protected]/dbus/export_mgr.go:105 +0x58a
main.ExportsCollector.Collect(0x9bc080, 0xc0000a2000, 0xc0000260c0, 0xc0000260c1, 0xc0000260c2, 0xc0000260c3, 0xc0000b0120)
/root/go/pkg/mod/github.com/!gandi/[email protected]/exportsCollector.go:282 +0x2e98
github.com/prometheus/client_golang/prometheus.DescribeByCollect.func1(0x9b6620, 0xc0000a2d50, 0xc0000b0120)
/root/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/collector.go:90 +0x3b
created by github.com/prometheus/client_golang/prometheus.DescribeByCollect
/root/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/collector.go:89 +0x75

[root@localhost bin]# ./ganesha_exporter --web.telemetry-path="/1m"
2021/08/12 11:07:02 dbus.Store: length mismatch
panic: dbus.Store: length mismatch

goroutine 38 [running]:
log.Panic(0xc0002896c0, 0x1, 0x1)
/usr/lib/golang/src/log/log.go:351 +0xae
github.com/Gandi/ganesha_exporter/dbus.ExportMgr.GetNFSv41IO(0x9bc080, 0xc000214000, 0x2711, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/!gandi/[email protected]/dbus/export_mgr.go:105 +0x58a
main.ExportsCollector.Collect(0x9bc080, 0xc000214000, 0xc000208008, 0xc000208009, 0xc00020800a, 0xc00020800b, 0xc000226120)
/root/go/pkg/mod/github.com/!gandi/[email protected]/exportsCollector.go:282 +0x2e98
github.com/prometheus/client_golang/prometheus.DescribeByCollect.func1(0x9b6620, 0xc000214d50, 0xc000226120)
/root/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/collector.go:90 +0x3b
created by github.com/prometheus/client_golang/prometheus.DescribeByCollect
/root/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/collector.go:89 +0x75

[root@localhost bin]# ./ganesha_exporter --collector.exports.nfsv3
2021/08/12 11:13:10 dbus.Store: length mismatch
panic: dbus.Store: length mismatch

goroutine 25 [running]:
log.Panic(0xc0000ef6c0, 0x1, 0x1)
/usr/lib/golang/src/log/log.go:351 +0xae
github.com/Gandi/ganesha_exporter/dbus.ExportMgr.GetNFSv41IO(0x9bc080, 0xc0000ab8f0, 0x2711, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/root/go/pkg/mod/github.com/!gandi/[email protected]/dbus/export_mgr.go:105 +0x58a
main.ExportsCollector.Collect(0x9bc080, 0xc0000ab8f0, 0xc0000c0aa0, 0xc0000c0aa1, 0xc0000c0aa2, 0xc0000c0aa3, 0xc00009e300)
/root/go/pkg/mod/github.com/!gandi/[email protected]/exportsCollector.go:282 +0x2e98
github.com/prometheus/client_golang/prometheus.DescribeByCollect.func1(0x9b6620, 0xc0001d6660, 0xc00009e300)
/root/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/collector.go:90 +0x3b
created by github.com/prometheus/client_golang/prometheus.DescribeByCollect
/root/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/collector.go:89 +0x75

How to slove it ?

@hit1943
Copy link

hit1943 commented Mar 14, 2022

in file export_mgr.go:"ExportID" should be "uint16",not "uint32", and all functions that use exportID as input param should also modified,because the ganesha dbus interface define export_id type for uint16

you can use this command to check dbus interface define:
dbus-send --system --type=method_call --print-reply --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.freedesktop.DBus.Introspectable.Introspect
then you can see the params type define like this:

the input param exp_id's type is 'q',which means uint16:
image

so if your ganesha has more than 256 exports,you may need to midify your ganesha dbus interface define

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

No branches or pull requests

2 participants