Skip to content

metricbeat test modules panics #18789

@jsoriano

Description

@jsoriano

metricbeat test modules panics, at least since 7.7.0, and at least with a local build. It doesn't panic with the same configurations on 7.6.X.

For confirmed bugs, please report:

  • Version: At least since 7.7.0
  • Operating System: Linux
  • Steps to Reproduce: Run metricbeat test modules.

I think that many configs reproduce this failure, if not all, I have reproduced it for example with:

metricbeat.modules:
  - module: system
    metricsets:
      - filesystem
      - fsstat
    period: 10s
    processors:
    - drop_event.when.regexp:
        system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)'

output.console.pretty: true

Trace with a local build:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x2f171b9]

goroutine 1 [running]:
github.com/elastic/beats/v7/metricbeat/mb/module.(*Connector).Connect(0xc000abb130, 0x55546a0, 0xc00009e3c0, 0xc0004081f8, 0x6)
	/home/jaime/gocode/src/github.com/elastic/beats/metricbeat/mb/module/connector.go:101 +0xb9
github.com/elastic/beats/v7/metricbeat/mb/module.(*Factory).Create(0xc0000cb900, 0x0, 0x0, 0xc0005e4840, 0x0, 0x2, 0x2, 0x2, 0x0)
	/home/jaime/gocode/src/github.com/elastic/beats/metricbeat/mb/module/factory.go:66 +0x319
github.com/elastic/beats/v7/metricbeat/beater.newMetricbeat(0xc0004f2240, 0xc0005e47e0, 0xc000296670, 0x2, 0x2, 0x0, 0x0, 0xc0004f2240)
	/home/jaime/gocode/src/github.com/elastic/beats/metricbeat/beater/metricbeat.go:166 +0x4a1
github.com/elastic/beats/v7/metricbeat/beater.Creator.func1(0xc0004f2240, 0xc0005e47e0, 0x0, 0x0, 0x0, 0x0)
	/home/jaime/gocode/src/github.com/elastic/beats/metricbeat/beater/metricbeat.go:78 +0x50
github.com/elastic/beats/v7/metricbeat/cmd/test.GenTestModulesCmd.func1(0xc0003a5b80, 0xc000159d40, 0x0, 0x4)
	/home/jaime/gocode/src/github.com/elastic/beats/metricbeat/cmd/test/modules.go:52 +0x1ab
github.com/spf13/cobra.(*Command).execute(0xc0003a5b80, 0xc000159c80, 0x4, 0x4, 0xc0003a5b80, 0xc000159c80)
	/home/jaime/gocode/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:766 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xc000383600, 0x0, 0x78e00, 0xc0000600b8)
	/home/jaime/gocode/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:852 +0x2ea
github.com/spf13/cobra.(*Command).Execute(...)
	/home/jaime/gocode/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:800
main.main()
	/home/jaime/gocode/src/github.com/elastic/beats/x-pack/metricbeat/main.go:21 +0x2f

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions