mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: Tobias Koch <tobias.koch@nonterra.com>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Crash on (qemu'ed) s390x doing prlimit call after probing stack size
Date: Wed, 26 Feb 2020 10:56:24 +0100	[thread overview]
Message-ID: <20200226095624.GG14278@port70.net> (raw)
In-Reply-To: <baa86ef8-df48-8fb4-7af1-df43722e3646@nonterra.com>

* Tobias Koch <tobias.koch@nonterra.com> [2020-02-26 01:07:58 +0300]:
> I have some programs crashing on me under QEMU s390x user emulation. I see
> them probe the stack size using mremaps and then do a prlimit as in this
> snippet
> 
> 24948 mremap(274877911040,4096,8192,0,0,56) = -1 errno=12 (Cannot allocate
> memory)
> 24948 mremap(274877906944,4096,8192,0,0,56) = -1 errno=12 (Cannot allocate
> memory)
> 24948 mremap(274877902848,4096,8192,0,0,56) = -1 errno=14 (Bad address)
> 24948 prlimit64(0,3,0,274889373840,274879934536,56) = 0
> --- SIGSEGV {si_signo=SIGSEGV, si_code=1, si_addr=0x0000004000001000} ---
> Segmentation fault

i'd use

qemu-s390x -d page -strace exe

to see how 0x0000004000001000 is mapped and then

qemu-s390x -d page,in_asm,cpu,nochain -strace exe

to see the exact failing instruction, that may give a hint.

> 
> The same programs on other 64bit arches (such as aarch64 or powerpc64le)
> emluated with QEMU work OK. I'm trying to understand, what musl is doing
> here and why QEMU cannot handle it.Any pointers would be appreciated.
> 
> Tobias

      reply	other threads:[~2020-02-26  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 22:07 Tobias Koch
2020-02-26  9:56 ` Szabolcs Nagy [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=20200226095624.GG14278@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    --cc=tobias.koch@nonterra.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).