Dump stack trace of all threads when InnoDB self-terminates due to long semaphore wait

Description

When InnoDB hits a long semaphore wait, it will enable the monitor output to the error log, but this is usually not enough to diagnose the semaphore deadlock (genuine long waits can usually be troubleshooted with just the monitor output), so the request here is to improve the code that triggers the assertion, such that it will first do a two things:

  • save backtraces of all threads to the error log or to separate <datadir>/pstack.<pid> or such file

  • dump all mutex objects (not sure how feasible is this, but if possible, it would be a massive win)

Environment

None

Activity

Show:

Details

Assignee

Reporter

Needs QA

Yes

Affects versions

Priority

Smart Checklist

Created January 16, 2025 at 5:27 PM
Updated January 16, 2025 at 9:51 PM