Bug 217565 - "yes" command when run as command substitution will crash the linux system.
Summary: "yes" command when run as command substitution will crash the linux system.
Status: REJECTED DOCUMENTED
Alias: None
Product: Tools
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P3 high
Assignee: Tools.Other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-17 03:04 UTC by lithack
Modified: 2023-06-21 11:58 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Screenshot from 2023-06-17 22-02-41.png (84.46 KB, image/png)
2023-06-17 16:47 UTC, lithack
Details
Screenshot from 2023-06-17 22-01-13.png (76.33 KB, image/png)
2023-06-17 16:47 UTC, lithack
Details
attachment-23576-0.html (1.58 KB, text/html)
2023-06-19 01:12 UTC, lithack
Details
attachment-31336-0.html (1.33 KB, text/html)
2023-06-19 04:27 UTC, lithack
Details

Description lithack 2023-06-17 03:04:42 UTC
Running the yes command in command substitution will crash the linux shell. According to me inside command the substitution it is creating multiple process(fork).

Command: `yes`
Comment 1 Bagas Sanjaya 2023-06-17 04:21:32 UTC
(In reply to lithack from comment #0)
> Running the yes command in command substitution will crash the linux shell.
> According to me inside command the substitution it is creating multiple
> process(fork).
> 
> Command: `yes`

Seems like coreutils issue (try posting to its appropriate list instead [1]).

Please don't use Kernel Bugzilla for pure userspace issues like this.

[1]: https://lists.gnu.org/archive/html/coreutils/
Comment 2 Artem S. Tashkinov 2023-06-17 16:11:30 UTC
What's your Linux distribution and version?

What's your device and its RAM/CPU?

What's the exact steps to reproduce the issue?

How do you it's the kernel that crashed? Do you have a kernel panic/oops? What's the kernel version?
Comment 3 Artem S. Tashkinov 2023-06-17 16:13:24 UTC
(In reply to Bagas Sanjaya from comment #1)
> 
> Seems like coreutils issue (try posting to its appropriate list instead [1]).
> 
> Please don't use Kernel Bugzilla for pure userspace issues like this.
> 
> [1]: https://lists.gnu.org/archive/html/coreutils/

It's _not_ necessary to reply to all the bug reports here, specially if you don't have the knowledge of what's going on. This is not a public forum, this is a kernel bug tracker.
Comment 4 lithack 2023-06-17 16:47:38 UTC
Created attachment 304440 [details]
Screenshot from 2023-06-17 22-02-41.png

To recreate it just type the command {`yes` or $(yes)} basically running
the command "yes" inside the command substitution.
Here is all necessary information what you asked for.

Thanks and regards.



On Sat, 17 Jun 2023 at 21:41, <bugzilla-daemon@kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=217565
>
> Artem S. Tashkinov (aros@gmx.com) changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|NEW                         |NEEDINFO
>
> --- Comment #2 from Artem S. Tashkinov (aros@gmx.com) ---
> What's your Linux distribution and version?
>
> What's your device and its RAM/CPU?
>
> What's the exact steps to reproduce the issue?
>
> How do you it's the kernel that crashed? Do you have a kernel panic/oops?
> What's the kernel version?
>
> --
> You may reply to this email to add a comment.
>
> You are receiving this mail because:
> You reported the bug.
Comment 5 lithack 2023-06-17 16:47:38 UTC
Created attachment 304441 [details]
Screenshot from 2023-06-17 22-01-13.png
Comment 6 Artem S. Tashkinov 2023-06-18 20:17:01 UTC
Looks like you ran a fork bomb and it worked.

Please try enabling nproc limits in /etc/security/limits.conf

This is not a kernel bug, this a distribution bug.

Here's the proper bug tracker: https://bugs.launchpad.net/ubuntu
Comment 7 Artem S. Tashkinov 2023-06-18 20:18:56 UTC
https://www.google.com/search?q=linux+fork+bomb

Has all the info.

The kernel does not crash in your case, your system just becomes totally unresponsive since you're running hundreds of thousands of processes.
Comment 8 lithack 2023-06-19 01:12:50 UTC
Created attachment 304450 [details]
attachment-23576-0.html

Ok thanks for the clarification.

On Mon, Jun 19, 2023, 1:47 AM <bugzilla-daemon@kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=217565
>
> Artem S. Tashkinov (aros@gmx.com) changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|NEEDINFO                    |REJECTED
>          Resolution|---                         |DOCUMENTED
>
> --- Comment #6 from Artem S. Tashkinov (aros@gmx.com) ---
> Looks like you ran a fork bomb and it worked.
>
> Please try enabling nproc limits in /etc/security/limits.conf
>
> This is not a kernel bug, this a distribution bug.
>
> Here's the proper bug tracker: https://bugs.launchpad.net/ubuntu
>
> --
> You may reply to this email to add a comment.
>
> You are receiving this mail because:
> You reported the bug.
Comment 9 lithack 2023-06-19 04:27:49 UTC
Created attachment 304451 [details]
attachment-31336-0.html

I have tested this in many linux based kernel distribution and found same
behaviour so I think there is problem in kernel because the way it treats
the signal is fishy.

On Mon, Jun 19, 2023, 1:48 AM <bugzilla-daemon@kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=217565
>
> --- Comment #7 from Artem S. Tashkinov (aros@gmx.com) ---
> https://www.google.com/search?q=linux+fork+bomb
>
> Has all the info.
>
> The kernel does not crash in your case, your system just becomes totally
> unresponsive since you're running hundreds of thousands of processes.
>
> --
> You may reply to this email to add a comment.
>
> You are receiving this mail because:
> You reported the bug.
Comment 10 Artem S. Tashkinov 2023-06-21 10:51:17 UTC
> I think there is problem in kernel because the way it treats
the signal is fishy

Configure maximum nproc limits in /etc/security/limits.conf and be happy.
Comment 11 Artem S. Tashkinov 2023-06-21 11:58:26 UTC
I'm not even sure what "signal" and "fishy" you are talking about.

This is a well defined piece of software which mostly has a deterministic behavior. The word "fishy" doesn't apply to it.

Signals exist, `man kill` and kill -l are for that, but that's definitely not what you had in mind.

Please ask your question on some Unix/Linux forum, e.g. https://unix.stackexchange.com/questions , this a kernel bugzilla.

Note You need to log in before you can comment on or make changes to this bug.