All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] netstress: explicitly set a thread stack size
Date: Tue, 1 Dec 2020 15:01:28 +0300	[thread overview]
Message-ID: <28ab3390-a16b-6183-62c8-50d782da2ad6@oracle.com> (raw)
In-Reply-To: <OF2BEB2003.14B7181E-ONC125862D.003F33FC-C125862D.003FF6BA@avm.de>

On 27.11.2020 14:38, Johannes Nixdorf via ltp wrote:
> Musl libc uses a relatively small thread stack size (128k [1]). This
> gets used up on 2 local buffers sized max_msg_len (64k by default),
> which causes a segfault due to a stack overflow in the error reporting
> path.
> 
> Set the stack size to 256k instead, which is enough for both buffers
> with an additional allowance for the remaining stack usage by netstress
> and called libc or ltp helper functions.
> 
> [1]: https://urldefense.com/v3/__https://wiki.musl-libc.org/functional-differences-from-glibc.html*Thread_stack_size__;Iw!!GqivPVa7Brio!Nat9ZPBR2P2QxOM2IsBWR2WdfOQ1ZNM4IJzjNy5a_bTsHUko9bULz88kJAVK8yQ7Kk8-$ 
> 
> Signed-off-by: Johannes Nixdorf <j.nixdorf@avm.de>
> 
> ---
> 
> v2:
>   - Use a static limit of 256k.
>   - Document the requested stack size in the error message.
>   - Coding style fixup.
> 

Added extra parenthesis to silence possible compiler warnings
and applied, thanks Johannes!

      reply	other threads:[~2020-12-01 12:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 13:06 [LTP] [PATCH] netstress: explicitly set a thread stack size j.nixdorf
2020-11-26 14:05 ` Alexey Kodanev
2020-11-26 14:52 ` j.nixdorf
2020-11-26 15:03   ` Cyril Hrubis
2020-11-27  9:15     ` Alexey Kodanev
2020-11-27 11:28       ` Cyril Hrubis
2020-11-27  8:54   ` Alexey Kodanev
2020-11-27 10:58   ` j.nixdorf
2020-11-27 11:38 ` [LTP] [PATCH v2] " j.nixdorf
2020-12-01 12:01   ` Alexey Kodanev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28ab3390-a16b-6183-62c8-50d782da2ad6@oracle.com \
    --to=alexey.kodanev@oracle.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.