Giter VIP home page Giter VIP logo

Comments (2)

braydonk avatar braydonk commented on June 3, 2024

FYI @edsiper @leonardo-albertovich @nokute78 this likely affects any threaded input plugin on this platform, not just out_stackdriver. The segfault occurs in the generic output thread loop:

flb_net_dns_lookup_context_cleanup(&dns_ctx);

Haven't actually run it but the only way a segfault makes sense in this stacktrace is if &dns_ctx is a bad address.

from fluent-bit.

rmsaad avatar rmsaad commented on June 3, 2024
(gdb) break /src/fluent-bit/src/flb_output_thread.c:329
Breakpoint 1 at 0xe9718: file /src/fluent-bit/src/flb_output_thread.c, line 329.
(gdb) define print_sp
Type commands for definition of "print_sp".
End with a line saying just "end".
>x/40x $sp
>print &dns_ctx
>step
>print dns_ctx
>continue
>end
(gdb) run -c /etc/fluent/fluent-bit.conf

I created a command in gdb to print out stack memory, &dns_ctx, then step into flb_net_dns_lookup_context_cleanup() and print out dns_ctx. The stack memory looks weird right before the seg fault.

Thread 4 "flb-out-stackdr" hit Breakpoint 1, output_thread (data=0x760f7b80) at /src/fluent-bit/src/flb_output_thread.c:329
329     /src/fluent-bit/src/flb_output_thread.c: No such file or directory.
(gdb)
0x749f9920:     0x00890664      0x76170200      0x00000000      0x00000000
0x749f9930:     0x00000000      0x00000000      0x00000000      0x00000008
0x749f9940:     0x00000000      0x00000008      0x00000000      0x755d0000
0x749f9950:     0x761701c0      0x00000000      0x00000000      0xdeadbeef
0x749f9960:     0x760f7bdc      0x00000000      0x00000000      0x00000000
0x749f9970:     0x00000000      0x00000000      0x00000000      0x00000000
0x749f9980:     0x00000000      0x00000000      0x00000000      0x00000000
0x749f9990:     0x00000000      0x749f9994      0x749f9994      0x749f999c
0x749f99a0:     0x749f999c      0x00000023      0x00008000      0x00000001
0x749f99b0:     0x00000002      0x00000000      0x00000000      0x00000000
$47 = (struct flb_net_dns *) 0x749f9994
flb_net_dns_lookup_context_cleanup (dns_ctx=0x749f9994) at /src/fluent-bit/src/flb_network.c:613
613     /src/fluent-bit/src/flb_network.c: No such file or directory.
$48 = (struct flb_net_dns *) 0x749f9994

Thread 4 "flb-out-stackdr" hit Breakpoint 1, output_thread (data=0x760f7b80) at /src/fluent-bit/src/flb_output_thread.c:329
329     /src/fluent-bit/src/flb_output_thread.c: No such file or directory.
(gdb)
0x749f9920:     0x00890664      0x76170200      0x00000000      0x00000000
0x749f9930:     0x00000000      0x00000000      0x00000000      0x00000008
0x749f9940:     0x00000000      0x00000008      0x00000000      0x755d0000
0x749f9950:     0x761701c0      0x00000000      0x00000000      0xdeadbeef
0x749f9960:     0x760f7bdc      0x00000000      0x00000000      0x00000000
0x749f9970:     0x00000000      0x00000000      0x00000000      0x00000000
0x749f9980:     0x00000000      0x00000000      0x00000000      0x00000000
0x749f9990:     0x00000000      0x749f9994      0x749f9994      0x749f999c
0x749f99a0:     0x749f999c      0x00000023      0x00008000      0x00000001
0x749f99b0:     0x00000002      0x00000000      0x00000000      0x00000000
$49 = (struct flb_net_dns *) 0x749f9994
flb_net_dns_lookup_context_cleanup (dns_ctx=0x749f9994) at /src/fluent-bit/src/flb_network.c:613
613     /src/fluent-bit/src/flb_network.c: No such file or directory.
$50 = (struct flb_net_dns *) 0x749f9994

Thread 4 "flb-out-stackdr" hit Breakpoint 1, output_thread (data=0x760f7b80) at /src/fluent-bit/src/flb_output_thread.c:329
329     /src/fluent-bit/src/flb_output_thread.c: No such file or directory.
(gdb)
0x749f9920:     0x00890664      0x76170200      0x00000000      0x00000000
0x749f9930:     0x00000000      0x00000000      0x00000000      0x00000008
0x749f9940:     0x00000000      0x00000008      0x00000000      0x755d0000
0x749f9950:     0x761701c0      0x00000000      0x00000000      0xdeadbeef
0x749f9960:     0x760f7bdc      0x00000000      0x00000000      0x00000000
0x749f9970:     0x00000000      0x00000000      0x00000000      0x00000000
0x749f9980:     0x00000000      0x00000000      0x00000000      0x00000000
0x749f9990:     0x00000000      0x749f9994      0x749f9994      0x749f999c
0x749f99a0:     0x749f999c      0x00000023      0x00008000      0x00000001
0x749f99b0:     0x00000002      0x00000000      0x00000000      0x00000000
$51 = (struct flb_net_dns *) 0x749f9994
flb_net_dns_lookup_context_cleanup (dns_ctx=0x749f9994) at /src/fluent-bit/src/flb_network.c:613
613     /src/fluent-bit/src/flb_network.c: No such file or directory.
$52 = (struct flb_net_dns *) 0x749f9994

Thread 4 "flb-out-stackdr" hit Breakpoint 1, output_thread (data=0x760f7b80) at /src/fluent-bit/src/flb_output_thread.c:329
329     /src/fluent-bit/src/flb_output_thread.c: No such file or directory.
(gdb)
0x749f9920:     0x00890664      0x76170200      0x00000000      0x00000000
0x749f9930:     0x00000000      0x00000000      0x00000000      0x7552f000
0x749f9940:     0x760c1560      0x761b6000      0x760f7bec      0x755d0000
0x749f9950:     0x761701c0      0x00000000      0x00000000      0xdeadbeef
0x749f9960:     0x760f7bdc      0x00000000      0x760c1560      0x00000000
0x749f9970:     0x00000000      0x00006100      0x00000000      0x00000000
0x749f9980:     0x00000000      0x00000000      0x00000000      0x00000000
0x749f9990:     0x00000000      0x754e7074      0x754e7074      0x749f999c
0x749f99a0:     0x749f999c      0x00000023      0x00008000      0x00000001
0x749f99b0:     0x00000002      0x00000000      0x00000000      0x00000000
$53 = (struct flb_net_dns *) 0x749f9994
flb_net_dns_lookup_context_cleanup (dns_ctx=0x17cbc827) at /src/fluent-bit/src/flb_network.c:613
613     /src/fluent-bit/src/flb_network.c: No such file or directory.
$54 = (struct flb_net_dns *) 0x17cbc827

Thread 4 "flb-out-stackdr" received signal SIGSEGV, Segmentation fault.
0x004eefd8 in flb_net_dns_lookup_context_cleanup (dns_ctx=0x17cbc827) at /src/fluent-bit/src/flb_network.c:613

from fluent-bit.

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.