gavinchou opened a new pull request, #68653:
URL: https://github.com/apache/doris/pull/68653
### What problem does this PR solve?
Issue Number: None
Related PR: #68652
Problem Summary:
This PR backports the startup-failure lifecycle fix from #68652 to
`branch-4.1`.
When a BE service fails to start with `enable_graceful_exit_check=true`, the
startup failure path calls `exit(1)` while StorageEngine background workers are
still running. Process-wide static destruction can then race with a path GC
worker that is using the function-local static RE2 matcher in
`TabletManager::get_tablet_id_and_schema_hash_from_path()`, causing a
null-address crash in `re2::Prog::SearchOnePass`.
The fix stops and joins created server starters, releases the backend
service, and explicitly destroys `ExecEnv` before calling `exit(1)`. The
immediate `_exit(1)` path remains unchanged when graceful exit checking is
disabled.
The backport has the same stable patch-id as #68652.
### Release note
None
### Check List (For Author)
- Test:
- [x] Manual test
- Targeted clang-format 16 check passed for
`be/src/service/doris_main.cpp` on `branch-4.1`.
- A local BE build could not start because the macOS environment does
not have Homebrew; `run buildall` is requested below for full build validation.
- Behavior changed:
- [ ] Yes
- [x] No. Only abnormal BE startup cleanup ordering changes.
- Does this need documentation?
- [x] No
- [ ] Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]