Skip to content

Segmentation fault when trying to run custom output plugin using golang #306

@chillaxd

Description

@chillaxd

I am trying to create a new output plugin using golang as per your documentation (https://github.com/fluent/fluent-bit/blob/master/GOLANG_OUTPUT_PLUGIN.md).

But after building this when I try to run the fluent-bit with that output plugin I am getting segmentation fault error. Can you help me to resolve this issue.

This is my go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/centos/GoLang"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

When I am doing ldd over the so file this is my output:
linux-vdso.so.1 => (0x00007ffce3280000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fea5a63d000)
libc.so.6 => /lib64/libc.so.6 (0x00007fea5a27c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fea5b829000)

I am using Centos7 in AWS, here is the details:
Linux ip-x-x-x-x 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

This is the command I am trying:
bin/fluent-bit -e <path_to_go_project>/out_<plugin_name>/out_<plugin_name>.so -i tail -p path=/home/centos/a -o out_<plugin_name> @edsiper

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions