mailing list of musl libc
 help / color / mirror / code / Atom feed
From: u-uy74@aetey.se
To: musl@lists.openwall.com
Subject: Re: pthread_getattr_np() vs explicit runtime loader
Date: Wed, 30 Sep 2015 17:43:37 +0200	[thread overview]
Message-ID: <20150930154337.GC13149@example.net> (raw)
In-Reply-To: <20150920194132.GO17773@brightrain.aerifal.cx>

On Sun, Sep 20, 2015 at 03:41:32PM -0400, Rich Felker wrote:
> I don't see anywhere this code has any interacton whatsoever with how
> the program was loaded. So I suspect plain old undefined behavior if
> the crash depends on how it was loaded.

> > You can easily test this if you have got say a jv-convert binary of
> > gcc-5.2.0, dynamically linked with musl and run this binary via the
> > explicit loader. Yours and mine environments are different but I would
> > not be surprised if the binary crashes for you too.

An update:

The observed crashes were both very consequent and confusing
for the debuggers which I tried. Then I had to put this on wait.

Now when I returned to testing, the crashes do not appear any longer.

This is most probably related to the fact that the host has been rebooted
meanwhile (to the same kernel, ~ 3.18.11).

Note that I saw the crashes earlier with binaries from gcc-5.1.0 too,
i.e. this was a consistent pattern under quite some time, with different
builds, on many occasions. No similar problems with other programs
during the same time, nor any problem if using the implicit loader.

So either this was an artifact of a "somehow specifically corrupt"
kernel or this is some assumption which blows up, given a certain state
(not necessarily corrupt) of the kernel. I believe more in the latter
(is there a contract about how/where the kernel shall allocate the
thread stacks?).

I still think that the crashes are caused by errors
while guessing the stack placement in pthread_getattr_np(),
simply because of the kernel doing something else than usual.

Unfortunately, in practical terms: no misbehaviour to analyze for
the moment.

Rune



  parent reply	other threads:[~2015-09-30 15:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-20  6:39 u-wsnj
2015-09-20 16:34 ` Rich Felker
2015-09-20 17:22   ` u-wsnj
2015-09-20 18:27     ` Rich Felker
2015-09-20 19:30       ` u-wsnj
2015-09-20 19:41         ` Rich Felker
2015-09-21  7:57           ` u-wsnj
2015-09-30 15:43           ` u-uy74 [this message]
2015-09-30 20:35             ` Update: [musl] " u-uy74
2015-10-06 11:34               ` musl bug or not, real or not? (Was: [musl] Update: [musl] pthread_getattr_np() vs explicit runtime) loader u-uy74
2015-10-06 14:36                 ` Isaac Dunham
2015-10-07  6:48                   ` u-uy74
2015-10-06 17:07                 ` Rich Felker
2015-10-07  7:27                   ` u-uy74
2015-10-07  7:43                     ` Timo Teras
2015-10-07 10:59                       ` u-uy74
2015-10-08 16:48                       ` Rich Felker
2015-10-09  5:39                         ` Timo Teras

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=20150930154337.GC13149@example.net \
    --to=u-uy74@aetey.se \
    --cc=musl@lists.openwall.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).