All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: sparclinux@vger.kernel.org
Subject: Re: Suspected bug in wait syscall or similar
Date: Mon, 30 Mar 2020 19:26:45 +0000	[thread overview]
Message-ID: <31e71908-3508-5f71-01c8-49f861257835@linaro.org> (raw)
In-Reply-To: <1848982.8N1hjUtedq@eto.sf-tec.de>



On 30/03/2020 07:18, John Paul Adrian Glaubitz wrote:
> Hi Rolf!
> 
> On 3/30/20 10:41 AM, Rolf Eike Beer wrote:
>> I run a 32 bit Gentoo userspace on my T5120 with a 64 bit kernel (5.5.7 at the 
>> moment). This is nothing really new, I see this for a while, but it seems to 
>> got a bit worse lately.
> 
> Debian's glibc maintainer told me that the glibc testsuite on SPARC has more failures
> on 32-bit than on 64-bit. Maybe we should look into trying to get some of these failures
> fixed first. CC'ing Adhemerval from glibc upstream who has done a lot of bug fixing
> on SPARC in glibc.

I have been seeing some sparc32 issues on 64-bit kernels as well. I have
documented some on glibc release wiki [1].  I noted the wait and nanosleep
issue on 2.31 and after the changes required for y2038 safeness and some
refactoring in syscall handling on master branch I didn't see them anymore.
So I am not sure if they are related to kernel, code generation or glibc
itself.

The sparc32 master still show some issues:

FAIL: nptl/tst-cancel24-static
FAIL: nptl/tst-cancelx20
FAIL: nptl/tst-cancelx21
FAIL: nptl/tst-cond8-static
FAIL: nptl/tst-mutex8-static
FAIL: nptl/tst-mutexpi8-static

> 
> It could be useful in this context if Gentoo could provide a small Gentoo SPARC LDOM
> running 32-bit userland for the GCC Compile Farm. This way upstream developers get
> easy access to a Gentoo SPARC instance to be able to reproduce issues like this.
> 
>> When I read about https://sourceware.org/git/?
>> p=glibc.git;a=commit;h³3e946fbb1659d2c5937c4dd756a7c49a132dff I thought that 
>> this may solve the issue, but I rebuild my glibc in a chroot with that patch 
>> and at least the fish testsuite hangs are unchanged.
>>
>> Has anyone a clue what's going on there?

Funny thing about b33e946fbb1659d2c5937c4dd756a7c49a132dff is the original code
has been working for age (in fact since the port has been included), meaning
that gcc used to *not* generate a stack frame for:

static void
__rt_sigreturn_stub (void)
{
  __asm__ ("mov %0, %%g1\n\t"
	   "ta	0x6d\n\t"
	   : /* no outputs */
	   : "i" (__NR_rt_sigreturn));
}

static void
__sigreturn_stub (void)
{
  __asm__ ("mov %0, %%g1\n\t"
	   "ta	0x6d\n\t"
	   : /* no outputs */
	   : "i" (__NR_sigreturn));
}

The only recent change prior the move to assembly was on 2.25 where we had
to disable the stack protector.  For 2.31 release, for instance, I used the
gcc 7.5.0 since it didn't trigger this issue.

> I know that there have been some stability issues with the Linux kernel on SPARC
> with older hardware like the UltraSPARC IIIi. The T5120 we have and newer machines
> seem to run relatively fine with a 64-bit userland.

Not only stability issues, but I noticed that kernel developers had 
fixed a SysV IPC kernel issue on 32-bits kernels that has been 
lingering for years.  So I am not sure how well maintained is
32-bit sparc is in general.

[1] https://sourceware.org/glibc/wiki/Release/2.31

  parent reply	other threads:[~2020-03-30 19:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30  8:41 Suspected bug in wait syscall or similar Rolf Eike Beer
2020-03-30 10:18 ` John Paul Adrian Glaubitz
2020-03-30 19:26 ` Adhemerval Zanella [this message]
2020-04-02 14:57 ` Rolf Eike Beer
2020-04-02 15:04 ` John Paul Adrian Glaubitz
2020-04-02 18:53 ` Adhemerval Zanella
2020-04-09  8:11 ` Rolf Eike Beer
2020-04-09  8:47 ` John Paul Adrian Glaubitz
2020-04-09 18:50 ` Rolf Eike Beer
2020-06-07  7:34 ` Rolf Eike Beer
2020-06-07  9:11 ` John Paul Adrian Glaubitz

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=31e71908-3508-5f71-01c8-49f861257835@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=sparclinux@vger.kernel.org \
    /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.