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

race condition of monkey's flb_libco #4266

Closed
nokute78 opened this issue Oct 31, 2021 · 2 comments
Closed

race condition of monkey's flb_libco #4266

nokute78 opened this issue Oct 31, 2021 · 2 comments
Labels

Comments

@nokute78
Copy link
Collaborator

Bug Report

Describe the bug

I tested http_server api, valgrind reported Invalid read of co_swap_function.

==40851== Invalid read of size 8
==40851==    at 0x724A1F: co_swap_function (in /home/taka/git/fluent-bit/build/bin/fluent-bit)
==40851==  Address 0x78031f8 is 8 bytes inside a block of size 25,088 alloc'd
==40851==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==40851==    by 0x725B30: co_create (amd64.c:142)
==40851==    by 0x719C2D: mk_http_thread_create (mk_http_thread.c:217)
==40851==    by 0x715E4B: mk_http_init (mk_http.c:748)
==40851==    by 0x714C94: mk_http_request_prepare (mk_http.c:232)
==40851==    by 0x717C76: mk_http_sched_read (mk_http.c:1568)
==40851==    by 0x713892: mk_sched_event_read (mk_scheduler.c:693)
==40851==    by 0x71C613: mk_server_worker_loop (mk_server.c:487)
==40851==    by 0x7131ED: mk_sched_launch_worker_loop (mk_scheduler.c:416)
==40851==    by 0x4865608: start_thread (pthread_create.c:477)
==40851==    by 0x4B11292: clone (clone.S:95)
==40851== 

Similar issue was reported #3055 and it was fixed fluent-bit's libco.
b058feb
b48e658

I don't know whether monkey's flb_libco is fixed or not.

To Reproduce

  • Rubular link if applicable: None

  • Example log message if applicable: None

  • Steps to reproduce the problem:
    a.conf:

[SERVICE]
    HTTP_Server on
    storage.metrics on
[INPUT]
    Name dummy

[OUTPUT]
    Name null
  1. valgrind --leak-check=full fluent-bit -c a.conf
  2. curl localhost:2020/api/v1/uptime
  3. (wait 30sec)
  4. curl localhost:2020/api/v1/uptime (uptime_sec >= 30)

Expected behavior

Valgrind reports no error.

Screenshots

None

Your Environment

  • Version used: master
  • Configuration: Above config
  • Environment name and version (e.g. Kubernetes? What version?): Ubuntu 20.04
  • Server type and version: Ubuntu 20.04
  • Operating System and version: Ubuntu 20.04
  • Filters and plugins: None

Additional context

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 1, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2021

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant