mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Cc: musl@lists.openwall.com
Subject: Re: stable 1.1.9 & current GIT broken on mips
Date: Tue, 2 Jun 2015 15:11:33 -0400	[thread overview]
Message-ID: <20150602191133.GJ17573@brightrain.aerifal.cx> (raw)
In-Reply-To: <556DED4F.5040000@dd-wrt.com>

On Tue, Jun 02, 2015 at 07:52:15PM +0200, Sebastian Gottschall wrote:
> Am 02.06.2015 um 19:19 schrieb Rich Felker:
> >On Tue, Jun 02, 2015 at 05:57:23PM +0200, Sebastian Gottschall wrote:
> >>Hello
> >>
> >>i tested today the current 1.1.9 (and later also current git so see
> >>if its the same behaviour)
> >>build on a mipsr2 big endian target (atheros ar7xxx) based on my
> >>dd-wrt firmware.
> >>i found out that mips seems to be broken on musl right now. the
> >>behaviour is
> >>that a call using execvp will not result in calling the desired
> >>application.
> >>on a second call and a following return call, the userspace will
> >>lock up with no way todo anything anymore.

What do you mean by "the userspace will lock up"? The process hangs?
Or the whole system? Is there any way to observe what's going on with
strace?

And can you clarify what you mean about execvp? Are you saying the
first call to execvp returns with an error? I don't get what you mean
about "a second call and a following return call". On success execvp
does not return.

If you're trying to start a dynamic-linked application, it's likely
that something is going wrong in the dynamic linker after execvp
succeeds but before execution passes into the main program. You could
try running a program with global constructors and see if they run.
There's a jump at the end of dynamic linking which is not compatible
with calling into mips16 code, but as long as crt1.o is not mips16
(and it shouldn't be; on mips it's still built from a .s file, and you
said you're not using mips16 in libc) this should not be a problem.

Another possibility I should mention since this is DD-WRT is that
you've got an ancient kernel that's not compatible with TLS. As of
1.1.0 musl deprecated running without a valid thread pointer, but
still worked if you happened not to invoke code that needs it. 1.1.9
removed the last remnants of support for no-thread-pointer and now
aborts with SIGSEGV or SIGILL in the startup code if setting the
thread pointer fails, which will be the case on 2.4 kernels.

Please let me know if you think this might be the case and if it's
blocking an important usage case for you. Since the rdhwr to get the
thread pointer is potentially very expensive on old hardware
(MIPS-I/II) I'm already considering making musl use a non-TLS global
for the thread pointer on mips in single-threaded programs, and this
same mechanism could make it possible to run (without threads, of
course) on kernels without rdhwr emulation or set_thread_area syscall.
But if possible it's really best to just move away from 2.4. It has
lots of bugs and cannot provide a fully-working environment for musl.

Rich


  reply	other threads:[~2015-06-02 19:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02  9:09 time.h define NULL Tomasz Sterna
2015-06-02  9:35 ` Szabolcs Nagy
2015-06-02  9:38   ` Daniel Cegiełka
2015-06-02  9:41     ` Szabolcs Nagy
2015-06-02 11:16   ` Tomasz Sterna
2015-06-02 11:24     ` Szabolcs Nagy
2015-06-02 12:04       ` Tomasz Sterna
2015-06-02 15:57         ` stable 1.1.9 & current GIT broken on mips Sebastian Gottschall
2015-06-02 17:19           ` Rich Felker
2015-06-02 17:52             ` Sebastian Gottschall
2015-06-02 19:11               ` Rich Felker [this message]
2015-06-02 19:59                 ` Sebastian Gottschall
2015-06-04  4:04                   ` Rich Felker
2015-06-04  8:29                     ` Sebastian Gottschall
2015-06-04 12:14                     ` Sebastian Gottschall
2015-06-04 16:07                       ` Rich Felker
2015-06-06 15:42                         ` Anthony G. Basile
2015-06-06 15:59                           ` Anthony G. Basile
2015-06-02 11:32     ` time.h define NULL Jens Gustedt

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=20150602191133.GJ17573@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=s.gottschall@dd-wrt.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).