Skip to contentSkip to conversation

linux-next: Signal handling and coredump regression in LTP coredump_pipe()

BUG Jan Polensky 2 participants 4 messages Jul 7, 2025 VFS

lore
Share & tools
lore
#0 lore raw

Hi all,

While testing the latest linux-next kernel (next-20250704), I encountered a reproducible issue during LTP (Linux Test Project) runs related to signal handling and core dumps.

The issue appears to be introduced by commit:

ef4744dc9960 ("coredump: split pipe coredumping into coredump_pipe()")

This commit seems to contain a typo or logic error that causes several LTP tests to fail due to missing or incorrect core dump behavior.

### Affected LTP tests and output:

- abort01:
abort01.c:58: TFAIL: abort() failed to dump core

- kill11:
kill11.c:84: TFAIL: core dump bit not set for SIGQUIT kill11.c:84: TFAIL: core dump bit not set for SIGILL kill11.c:84: TFAIL: core dump bit not set for SIGTRAP kill11.c:84: TFAIL: core dump bit not set for SIGIOT/SIGABRT kill11.c:84: TFAIL: core dump bit not set for SIGBUS kill11.c:84: TFAIL: core dump bit not set for SIGFPE kill11.c:84: TFAIL: core dump bit not set for SIGSEGV kill11.c:84: TFAIL: core dump bit not set for SIGXCPU kill11.c:84: TFAIL: core dump bit not set for SIGXFSZ kill11.c:84: TFAIL: core dump bit not set for SIGSYS/SIGUNUSED

- waitpid01:
waitpid01.c:140: TFAIL: Child did not dump core when expected

Best regards,
Jan

---
Only a suggestion for a fix:

 fs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/coredump.c +1 -1
index 081b5e9d16e2..f4f7f0a0ae40 100644
@@ -1019,7 +1019,7 @@ static bool coredump_pipe(struct core_name *cn, struct coredump_params *cprm,
 	if (!sub_info)
 		return false;
 
-	if (!call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC)) {
+	if (call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC)) {
 		coredump_report_failure("|%s pipe failed", cn->corename);
 		return false;
 	}

--
2.48.1

#1 lore raw
Quoted 30 lines · Jan Polensky

Hi all,

While testing the latest linux-next kernel (next-20250704), I encountered a reproducible issue during LTP (Linux Test Project) runs related to signal handling and core dumps.

The issue appears to be introduced by commit:

ef4744dc9960 ("coredump: split pipe coredumping into coredump_pipe()")

This commit seems to contain a typo or logic error that causes several LTP tests to fail due to missing or incorrect core dump behavior.

### Affected LTP tests and output:

- abort01:
abort01.c:58: TFAIL: abort() failed to dump core

- kill11:
kill11.c:84: TFAIL: core dump bit not set for SIGQUIT kill11.c:84: TFAIL: core dump bit not set for SIGILL kill11.c:84: TFAIL: core dump bit not set for SIGTRAP kill11.c:84: TFAIL: core dump bit not set for SIGIOT/SIGABRT kill11.c:84: TFAIL: core dump bit not set for SIGBUS kill11.c:84: TFAIL: core dump bit not set for SIGFPE kill11.c:84: TFAIL: core dump bit not set for SIGSEGV kill11.c:84: TFAIL: core dump bit not set for SIGXCPU kill11.c:84: TFAIL: core dump bit not set for SIGXFSZ kill11.c:84: TFAIL: core dump bit not set for SIGSYS/SIGUNUSED

Quoted 8 lines

- waitpid01:
waitpid01.c:140: TFAIL: Child did not dump core when expected

Best regards,
Jan

---

Very odd because I run the coredump tests. Can you please give me the exact LTP command so I can make sure I'm running those tests?

Quoted 20 lines

Only a suggestion for a fix:

 fs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/coredump.c +1 -2
index 081b5e9d16e2..f4f7f0a0ae40 100644
@@ -1019,7 +1019,7 @@ static bool coredump_pipe(struct core_name *cn, struct coredump_params *cprm,
 	if (!sub_info)
 		return false;
 
-	if (!call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC)) {
+	if (call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC)) {
 		coredump_report_failure("|%s pipe failed", cn->corename);
 		return false;
 	}
--

2.48.1

#2 lore raw
Quoted 2 lines · Christian Brauner
Quoted 1 line · Jan Polensky

Hi all,

[skip]

Quoted 4 lines
Quoted 1 line

---

Very odd because I run the coredump tests. Can you please give me the exact LTP command so I can make sure I'm running those tests?

I ran them without kirk to avoid testing overhead, e.g.:

runltp -f syscalls
runltp -f syscalls -s kill11
ltp-bin/testcases/bin/kill11

Some tests may be skipped depending on kernel config, system capabilities, and installed software.
Let me know if you'd prefer a kirk run for comparison.

[skip]

#3 lore raw
In reply to Jan Polensky
Quoted 30 lines · Jan Polensky

Hi all,

While testing the latest linux-next kernel (next-20250704), I encountered a reproducible issue during LTP (Linux Test Project) runs related to signal handling and core dumps.

The issue appears to be introduced by commit:

ef4744dc9960 ("coredump: split pipe coredumping into coredump_pipe()")

This commit seems to contain a typo or logic error that causes several LTP tests to fail due to missing or incorrect core dump behavior.

### Affected LTP tests and output:

- abort01:
abort01.c:58: TFAIL: abort() failed to dump core

- kill11:
kill11.c:84: TFAIL: core dump bit not set for SIGQUIT kill11.c:84: TFAIL: core dump bit not set for SIGILL kill11.c:84: TFAIL: core dump bit not set for SIGTRAP kill11.c:84: TFAIL: core dump bit not set for SIGIOT/SIGABRT kill11.c:84: TFAIL: core dump bit not set for SIGBUS kill11.c:84: TFAIL: core dump bit not set for SIGFPE kill11.c:84: TFAIL: core dump bit not set for SIGSEGV kill11.c:84: TFAIL: core dump bit not set for SIGXCPU kill11.c:84: TFAIL: core dump bit not set for SIGXFSZ kill11.c:84: TFAIL: core dump bit not set for SIGSYS/SIGUNUSED

Quoted 8 lines

- waitpid01:
waitpid01.c:140: TFAIL: Child did not dump core when expected

Best regards,
Jan

---

Folded, thank you!