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

[BUG]Segmentation fault(core dumped) error when use --fored-shutdown #514

Open
MANGOPIE3 opened this issue Sep 15, 2023 · 0 comments
Open

Comments

@MANGOPIE3
Copy link

Hi, everyone. I find a Segmentation fault (core dumped) when use --fored-shutdown=1 option.
I read up the related code, and I have double point,

The analysis is as follows:

  if (sb_globals.force_shutdown)
  {
    /* Set the alarm to force shutdown */
    signal(SIGALRM, sigalrm_forced_shutdown_handler);

    alarm(NS2SEC(sb_globals.max_time_ns) + sb_globals.timeout);
  }

Look this free interm_slots process:
sigalrm_forced_shutdown_handler -> log_done -> sb_histogram_done -> free(interm_slots)

when one thread process sigalrm_forced_shutdown_handler, it will free interm_slots but other thread still can vist it.

@MANGOPIE3 MANGOPIE3 changed the title Segmentation fault(core dumped) error when use --fored-shutdown [BUG]Segmentation fault(core dumped) error when use --fored-shutdown Sep 16, 2023
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

1 participant