systemd / systemd/systemd

A repeated call of signal handler and cause a stack exhaustion

Open
#5,267 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pid1
Dominant language
C
Stars
16.7k
Forks
4.7k
Avg merge
1d 6h
Merged PRs (30d)
140

Description

Submission type
  • [ x ] Bug report
  • Request for enhancement (RFE)

NOTE: Do not submit anything other than bug reports or RFEs via the issue tracker!

systemd version the issue has been seen with

All

NOTE: Do not submit bug reports about anything but the two most recently released systemd versions upstream!

The issue just appear on our system one time and we didn't get symbols information in the core file.
the bt in gdb is like this:
...
#8240 < signal handler called >
#8241 0x0000000000000000 in ?? ()
...
I found a risk in exec_child() that may cause similar issue, rename_process_from_path() is invoked before default_signals().
If there is anything wrong occur in rename_process_from_path() and trigger a signal defined in SIGNALS_CRASH_HANDLER, the crash() will be invoked repeatedly

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting exec_child(), rename_process_from_path(), default_signals(), SIGNALS_CRASH_HANDLER, and crash(), then trace how a signal during process renaming is handled. Confirm whether the ordering can repeatedly invoke the signal handler and exhaust the stack; done means the reported recursive crash path is prevented or clearly ruled out.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.