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

Fix autotools build #4

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Fix autotools build #4

wants to merge 6 commits into from

Conversation

mszabo-wikia
Copy link
Owner

No description provided.

@mszabo-wikia mszabo-wikia force-pushed the fix-autotools-build branch 5 times, most recently from 623594a to 2bb88b8 Compare December 11, 2024 13:14
Summary:
After 6c2142a, standalone mcrouter now deadlocks if the router configuration was incorrect. Spotted on facebook#449, where `test_unknown_named_handles` started failing due to the mcrouter process being tested never exiting.

GDB [indicates](https://gist.github.com/mszabo-wikia/47916c5655deffdb95332e972a52caf8) a deadlock between three threads:
```
(gdb) info threads
  Id   Target Id                                          Frame
* 1    Thread 0x7f7b4cce1e00 (LWP 211878) "mcrouter"      syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  2    Thread 0x7f7b43fff6c0 (LWP 211882) "mcr-cpuaux-0"  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  3    Thread 0x7f7b49e0a6c0 (LWP 211879) "IOThreadPool0" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
```

* Thread 1, the main thread, has triggered exit() and is waiting on the auxiliary thread pool to be destroyed.
* Thread 2, an auxiliary thread pool thread, is in the process of destroying the CarbonRouterInstance due to
6c2142a and is blocked on destroying the virtual EVBs by child proxies. These however are ultimately sourced from the IO thread pool which is also used by AsyncMcServer.
* Thread 3, an IO thread pool thread, is blocked by AsyncMcServer which is waiting to be started by later initialization code that never runs due to the config error, preventing the IO thread pool itself from being destroyed.

Fix it by initializing the AsyncMcServer only after the router has been initialized.

Pull Request resolved: facebook#455

Reviewed By: lenar-f

Differential Revision: D67069250

Pulled By: disylh

fbshipit-source-id: d6edff40b9f40ee7925e94c4ee9cf985c10a98de
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

Successfully merging this pull request may close these issues.

1 participant