Debian Bug report logs - #634890
klibc-utils: sh.shared segmentation fault (armhf)

version graph

Package: klibc-utils; Maintainer for klibc-utils is maximilian attems <maks@debian.org>; Source for klibc-utils is src:klibc.

Reported by: Julian Andres Klode <jak@debian.org>

Date: Wed, 20 Jul 2011 20:00:01 UTC

Severity: serious

Tags: fixed-upstream, help

Found in version klibc/1.5.23-2

Fixed in version klibc/2.0.1-2

Done: maximilian attems <maks@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, jak@debian.org, debian-arm@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Wed, 20 Jul 2011 20:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julian Andres Klode <jak@debian.org>:
New Bug report received and forwarded. Copy sent to jak@debian.org, debian-arm@lists.debian.org, maximilian attems <maks@debian.org>. (Wed, 20 Jul 2011 20:00:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Julian Andres Klode <jak@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: klibc-utils: sh.shared segmentation fault (armhf)
Date: Wed, 20 Jul 2011 21:56:23 +0200
Package: klibc-utils
Version: 1.5.23-2
Severity: important

klibc's sh.shared currently just segfaults when started
on a Toshiba AC100 (Tegra 2) running the armhf port. This
breaks booting for users not having busybox installed
which in turn cost me support time today.

The other tools seem to work perfectly. Do you want a
backtrace? If so, how should I create one for a binary
using klib?

-- System Information:
Debian Release: wheezy/sid
Architecture: armhf (armv7l)

Kernel: Linux 2.6.38-ac1-ac100 (SMP w/2 CPU cores)
Locale: LANG=en_IE.utf8, LC_CTYPE=en_IE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages klibc-utils depends on:
ii  libklibc                      1.5.23-2   minimal libc subset for use with i

klibc-utils recommends no packages.

klibc-utils suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Wed, 20 Jul 2011 20:30:17 GMT) Full text and rfc822 format available.

Acknowledgement sent to Loïc Minier <lool@dooz.org>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Wed, 20 Jul 2011 20:30:17 GMT) Full text and rfc822 format available.

Message #10 received at 634890@bugs.debian.org (full text, mbox):

From: Loïc Minier <lool@dooz.org>
To: Julian Andres Klode <jak@debian.org>, 634890@bugs.debian.org
Cc: debian-arm@bee.dooz.org
Subject: Re: Bug#634890: klibc-utils: sh.shared segmentation fault (armhf)
Date: Wed, 20 Jul 2011 22:28:15 +0200
 Might be related to the hardware bug described in:
    https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/739374
 which has a workaround in linux, bionic and possibly glibc; I wouldn't
 be surprized if klibc needed similar care.

-- 
Loïc Minier




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 27 May 2012 14:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to maximilian attems <max@stro.at>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 27 May 2012 14:57:03 GMT) Full text and rfc822 format available.

Message #15 received at 634890@bugs.debian.org (full text, mbox):

From: maximilian attems <max@stro.at>
To: klibc@zytor.com, debian-arm@lists.debian.org
Cc: Thorsten Glaser <tg@mirbsd.de>, 634890@bugs.debian.org
Subject: Re: [klibc] klibc issues on armhf (not Debian/armel)
Date: Sun, 27 May 2012 14:47:48 +0000
On Sun, May 27, 2012 at 02:34:00PM +0000, Thorsten Glaser wrote:
> maximilian attems dixit:
> 
> >I don't know if klibc-utils provided binaries do work on armhf?
> 
> In this case, sh and sh.shared don’t work on armhf, either with
> or without thumb. The Debian package builds without thumb.

ok I see, thus #634890 has rc severity.
 
> >not sure that klibc picks those up?
> 
> I built klibc with those very same flags on harris, yes. (And
> added CONFIG_KLIBC_THUMB=y just to see whether that helps.)
> 
> The problem is that “random” pointers suddenly contain NULL,
> and that some code is apparently not run despite being in
> between oder two codes that are run. Also, setjmp() seems to
> exhibit issues.
> 

cc'ing bug report to have the info there as well.

-- 
maks




Severity set to 'serious' from 'important' Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Sun, 27 May 2012 14:57:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 27 May 2012 15:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 27 May 2012 15:03:03 GMT) Full text and rfc822 format available.

Message #22 received at 634890@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: klibc@zytor.com
Cc: debian-arm@lists.debian.org, 634890@bugs.debian.org
Subject: Re: [klibc] klibc issues on armhf (not Debian/armel)
Date: Sun, 27 May 2012 14:57:02 +0000 (UTC)
maximilian attems dixit:

>ok I see, thus #634890 has rc severity.

No, last time I’ve thought armhf were RC just because they ended up
being in the main archive I was told off; armhf and s390x still are
not RC. But “we” should process it as if it were RC, probably.

On the other hand, my Latin is at its end (does this saying translate
into English?), I’ve got no idea how to track this down.

bye,
//mirabilos
-- 
13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good
guy. But he's always right! In every fsckin' situation, he's right. Even
with his deeply perverted taste in software and borked ambition towards
broken OSes - in the end, he's damn right about it :(! […] works in mksh




Added tag(s) help. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Thu, 31 May 2012 16:39:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Thu, 31 May 2012 18:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to shawn <shawnlandden@gmail.com>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Thu, 31 May 2012 18:09:02 GMT) Full text and rfc822 format available.

Message #29 received at 634890@bugs.debian.org (full text, mbox):

From: shawn <shawnlandden@gmail.com>
To: 634890@bugs.debian.org
Subject: Re: [klibc] klibc issues on armhf (not Debian/armel)
Date: Thu, 31 May 2012 11:07:25 -0700
>On the other hand, my Latin is at its end (does this saying translate
>into English?), I’ve got no idea how to track this down.

"I am at wit's end." would be how I would translate it.

http://www.thefreedictionary.com/at+%28one%27s%29+wits%27+end
Idioms:
at (one's) wits' end
At the limit of one's mental resources; utterly at a loss.
have/keep (one's) wits about (one)
To remain alert or calm, especially in a crisis.

no idea how to fix segfaults, sorry :).

However I don't think the linked issue is the right one, as it has been
described as not being regular, and has been reported as being turned
off.

https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/739374/comments/9
-- 
-Shawn Landden





Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Thu, 31 May 2012 19:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Thu, 31 May 2012 19:33:03 GMT) Full text and rfc822 format available.

Message #34 received at 634890@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: shawn <shawnlandden@gmail.com>, 634890@bugs.debian.org
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Thu, 31 May 2012 19:18:51 +0000 (UTC)
shawn dixit:

>"I am at wit's end." would be how I would translate it.

Ah, thanks ;-)

>no idea how to fix segfaults, sorry :).

No problem. I think I’ve done my share too, though…

>However I don't think the linked issue is the right one, as it has been
>described as not being regular, and has been reported as being turned
>off.

Yes, this is not the case, we’re seeing segfaults on nōn-Tegra hw.

bye,
//mirabilos
-- 
13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good
guy. But he's always right! In every fsckin' situation, he's right. Even
with his deeply perverted taste in software and borked ambition towards
broken OSes - in the end, he's damn right about it :(! […] works in mksh




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 17 Jun 2012 21:48:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve McIntyre <steve@einval.com>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 17 Jun 2012 21:48:15 GMT) Full text and rfc822 format available.

Message #39 received at 634890@bugs.debian.org (full text, mbox):

From: Steve McIntyre <steve@einval.com>
To: Thorsten Glaser <tg@mirbsd.de>, 634890@bugs.debian.org
Cc: shawn <shawnlandden@gmail.com>
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Sun, 17 Jun 2012 22:44:52 +0100
On Thu, May 31, 2012 at 07:18:51PM +0000, Thorsten Glaser wrote:
>shawn dixit:
>
>>"I am at wit's end." would be how I would translate it.
>
>Ah, thanks ;-)
>
>>no idea how to fix segfaults, sorry :).
>
>No problem. I think I’ve done my share too, though…
>
>>However I don't think the linked issue is the right one, as it has been
>>described as not being regular, and has been reported as being turned
>>off.
>
>Yes, this is not the case, we’re seeing segfaults on nōn-Tegra hw.

I can confirm that I can reliably see this on the imx53 porter box
(abel) too.

Digging further with the built-in debug TRACE function, I can see
problems in usr/dash/eval.c:evalcommand(). The place where cmd
switches from non-NULL to NULL is

  status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);

Interestingly, adding more TRACE() calls makes the problem go
away. \o/ Classic Heisenbug behaviour.

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
We don't need no education.
We don't need no thought control.





Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 17 Jun 2012 22:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 17 Jun 2012 22:09:11 GMT) Full text and rfc822 format available.

Message #44 received at 634890@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: Steve McIntyre <steve@einval.com>, 634890@bugs.debian.org
Cc: shawn <shawnlandden@gmail.com>, debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Sun, 17 Jun 2012 21:58:46 +0000 (UTC)
Steve McIntyre dixit:

>Digging further with the built-in debug TRACE function, I can see
>problems in usr/dash/eval.c:evalcommand(). The place where cmd
>switches from non-NULL to NULL is
>
>  status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);

Yeah, I got approximately so far too, with gdb (despite my
extremely limited gdb-fu).

>Interestingly, adding more TRACE() calls makes the problem go
>away. \o/ Classic Heisenbug behaviour.

Right. Interestingly it’s always the shells you notice this in.
Last time I saw this, it was a problem having to do with argument
passing (registers vs. stack, how many, which, and where), including
return value placement. But I’m out of guesses.

Good luck,
//mirabilos
-- 
13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good
guy. But he's always right! In every fsckin' situation, he's right. Even
with his deeply perverted taste in software and borked ambition towards
broken OSes - in the end, he's damn right about it :(! […] works in mksh




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Mon, 18 Jun 2012 23:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve McIntyre <steve@einval.com>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Mon, 18 Jun 2012 23:33:03 GMT) Full text and rfc822 format available.

Message #49 received at 634890@bugs.debian.org (full text, mbox):

From: Steve McIntyre <steve@einval.com>
To: Thorsten Glaser <tg@mirbsd.de>
Cc: 634890@bugs.debian.org, shawn <shawnlandden@gmail.com>, maximilian attems <maks@debian.org>
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Tue, 19 Jun 2012 00:30:29 +0100
On Sun, Jun 17, 2012 at 09:58:46PM +0000, Thorsten Glaser wrote:
>Steve McIntyre dixit:
>
>>Digging further with the built-in debug TRACE function, I can see
>>problems in usr/dash/eval.c:evalcommand(). The place where cmd
>>switches from non-NULL to NULL is
>>
>>  status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);
>
>Yeah, I got approximately so far too, with gdb (despite my
>extremely limited gdb-fu).
>
>>Interestingly, adding more TRACE() calls makes the problem go
>>away. \o/ Classic Heisenbug behaviour.
>
>Right. Interestingly it’s always the shells you notice this in.
>Last time I saw this, it was a problem having to do with argument
>passing (registers vs. stack, how many, which, and where), including
>return value placement. But I’m out of guesses.

More debugging results:

 * If I replace -Os with -O0 to disable optimisation, the crash goes
   away too. Suggests (maybe) a compiler bug here...

 * There's a real bug in the ARM assembly version of longjmp in
   usr/klibc/arch/arm/setjmp.S: it will always pass back its first
   argument as a return value, even if it's 0 (see the man page for
   more details). Oddly, the Thumb implementation in the same file
   *is* correct!

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
We don't need no education.
We don't need no thought control.





Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Thu, 28 Jun 2012 17:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to maximilian attems <max@stro.at>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Thu, 28 Jun 2012 17:03:03 GMT) Full text and rfc822 format available.

Message #54 received at 634890@bugs.debian.org (full text, mbox):

From: maximilian attems <max@stro.at>
To: Steve McIntyre <steve@einval.com>
Cc: Thorsten Glaser <tg@mirbsd.de>, 634890@bugs.debian.org, shawn <shawnlandden@gmail.com>, klibc@zytor.com
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Thu, 28 Jun 2012 18:59:34 +0200
On Tue, 19 Jun 2012, Steve McIntyre wrote:

> 
> More debugging results:
> 
>  * If I replace -Os with -O0 to disable optimisation, the crash goes
>    away too. Suggests (maybe) a compiler bug here...

nasty. :|
 
>  * There's a real bug in the ARM assembly version of longjmp in
>    usr/klibc/arch/arm/setjmp.S: it will always pass back its first
>    argument as a return value, even if it's 0 (see the man page for
>    more details). Oddly, the Thumb implementation in the same file
>    *is* correct!

care to cook up a patch, please?

thank you.

-- 
maks




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Fri, 29 Jun 2012 17:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve McIntyre <steve@einval.com>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Fri, 29 Jun 2012 17:15:03 GMT) Full text and rfc822 format available.

Message #59 received at 634890@bugs.debian.org (full text, mbox):

From: Steve McIntyre <steve@einval.com>
To: maximilian attems <max@stro.at>
Cc: Thorsten Glaser <tg@mirbsd.de>, 634890@bugs.debian.org, shawn <shawnlandden@gmail.com>, klibc@zytor.com
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Fri, 29 Jun 2012 18:13:34 +0100
On Thu, Jun 28, 2012 at 06:59:34PM +0200, maximilian attems wrote:
>On Tue, 19 Jun 2012, Steve McIntyre wrote:
>
>> 
>> More debugging results:
>> 
>>  * If I replace -Os with -O0 to disable optimisation, the crash goes
>>    away too. Suggests (maybe) a compiler bug here...
>
>nasty. :|
> 
>>  * There's a real bug in the ARM assembly version of longjmp in
>>    usr/klibc/arch/arm/setjmp.S: it will always pass back its first
>>    argument as a return value, even if it's 0 (see the man page for
>>    more details). Oddly, the Thumb implementation in the same file
>>    *is* correct!
>
>care to cook up a patch, please?

Sure, no problem:

--- klibc-2.0.old/usr/klibc/arch/arm/setjmp.S   2012-05-29 21:41:34.000000000 +0000
+++ klibc-2.0/usr/klibc/arch/arm/setjmp.S       2012-06-29 16:53:25.000000000 +0000
@@ -41,7 +41,9 @@
 longjmp:
        ldmia   r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
        mov     r0, r1
-       BX(lr)
+       bne     1f
+       mov     r0, #1
+1:     BX(lr)
        .size longjmp,.-longjmp
 
 #else /* __thumb__ */


-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
You lock the door
And throw away the key
There's someone in my head but it's not me 





Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 01 Jul 2012 21:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to maximilian attems <max@stro.at>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 01 Jul 2012 21:06:04 GMT) Full text and rfc822 format available.

Message #64 received at 634890@bugs.debian.org (full text, mbox):

From: maximilian attems <max@stro.at>
To: Steve McIntyre <steve@einval.com>
Cc: Thorsten Glaser <tg@mirbsd.de>, 634890@bugs.debian.org, shawn <shawnlandden@gmail.com>, klibc@zytor.com
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Sun, 1 Jul 2012 20:57:30 +0000
On Fri, Jun 29, 2012 at 06:13:34PM +0100, Steve McIntyre wrote:
> On Thu, Jun 28, 2012 at 06:59:34PM +0200, maximilian attems wrote:
> >On Tue, 19 Jun 2012, Steve McIntyre wrote:
> >>  * There's a real bug in the ARM assembly version of longjmp in
> >>    usr/klibc/arch/arm/setjmp.S: it will always pass back its first
> >>    argument as a return value, even if it's 0 (see the man page for
> >>    more details). Oddly, the Thumb implementation in the same file
> >>    *is* correct!
> >
> >care to cook up a patch, please?
> 
> Sure, no problem:

thanks, applied and pushed out:
(your email client seems to have messed up whitespace, plus added
 your signed-off, hope that is ok):
http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=d7d16afbdae9bdea83aeb26ac572e6fc4d7d4940


so could it be out of blindness that we didn't properly build with
thumb instruction in Debian?

sunny greetings

-- 
maks




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 01 Jul 2012 21:33:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 01 Jul 2012 21:33:11 GMT) Full text and rfc822 format available.

Message #69 received at 634890@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: klibc@zytor.com
Cc: Steve McIntyre <steve@einval.com>, 634890@bugs.debian.org, shawn <shawnlandden@gmail.com>
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Sun, 1 Jul 2012 21:15:45 +0000 (UTC)
maximilian attems dixit:

>so could it be out of blindness that we didn't properly build with
>thumb instruction in Debian?

I’ve tried enabling thumb, but the bugs didn’t go away with
that either.

bye,
//mirabilos
-- 
13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good
guy. But he's always right! In every fsckin' situation, he's right. Even
with his deeply perverted taste in software and borked ambition towards
broken OSes - in the end, he's damn right about it :(! […] works in mksh




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 01 Jul 2012 22:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve McIntyre <steve@einval.com>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 01 Jul 2012 22:09:03 GMT) Full text and rfc822 format available.

Message #74 received at 634890@bugs.debian.org (full text, mbox):

From: Steve McIntyre <steve@einval.com>
To: maximilian attems <max@stro.at>
Cc: Thorsten Glaser <tg@mirbsd.de>, 634890@bugs.debian.org, shawn <shawnlandden@gmail.com>, klibc@zytor.com
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Sun, 1 Jul 2012 22:24:56 +0100
On Sun, Jul 01, 2012 at 08:57:30PM +0000, maximilian attems wrote:
>On Fri, Jun 29, 2012 at 06:13:34PM +0100, Steve McIntyre wrote:
>> On Thu, Jun 28, 2012 at 06:59:34PM +0200, maximilian attems wrote:
>> >On Tue, 19 Jun 2012, Steve McIntyre wrote:
>> >>  * There's a real bug in the ARM assembly version of longjmp in
>> >>    usr/klibc/arch/arm/setjmp.S: it will always pass back its first
>> >>    argument as a return value, even if it's 0 (see the man page for
>> >>    more details). Oddly, the Thumb implementation in the same file
>> >>    *is* correct!
>> >
>> >care to cook up a patch, please?
>> 
>> Sure, no problem:
>
>thanks, applied and pushed out:
>(your email client seems to have messed up whitespace, plus added
> your signed-off, hope that is ok):
>http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=d7d16afbdae9bdea83aeb26ac572e6fc4d7d4940

Yup, cool. Thanks. I'll continue looking at the main bug if I get time
this week.

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
"I've only once written 'SQL is my bitch' in a comment. But that code 
 is in use on a military site..." -- Simon Booth





Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Mon, 02 Jul 2012 14:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve McIntyre <steve@einval.com>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Mon, 02 Jul 2012 14:33:03 GMT) Full text and rfc822 format available.

Message #79 received at 634890@bugs.debian.org (full text, mbox):

From: Steve McIntyre <steve@einval.com>
To: Thorsten Glaser <tg@mirbsd.de>
Cc: klibc@zytor.com, 634890@bugs.debian.org, shawn <shawnlandden@gmail.com>
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Mon, 2 Jul 2012 15:29:55 +0100
On Sun, Jul 01, 2012 at 09:15:45PM +0000, Thorsten Glaser wrote:
>maximilian attems dixit:
>
>>so could it be out of blindness that we didn't properly build with
>>thumb instruction in Debian?
>
>I’ve tried enabling thumb, but the bugs didn’t go away with
>that either.

There's a reason for that - it's already defaulting to Thumb anyway,
as that's the compiler default for armhf. Along the same lines as
changing the optimisation level (-O0 and -O1 both work fine),
switching to ARM code by adding -marm also makes the bug go away.

Maks, would you like a trivial patch to do that?

I'm also pondering the other Thumb settings in MCONFIG - as far as I
can see, CONFIG_KLIBC_THUMB is not set at the moment even though we
*are* clearly building with Thumb. Investigating now...

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
Who needs computer imagery when you've got Brian Blessed?





Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Mon, 02 Jul 2012 14:39:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve McIntyre <steve@einval.com>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Mon, 02 Jul 2012 14:39:10 GMT) Full text and rfc822 format available.

Message #84 received at 634890@bugs.debian.org (full text, mbox):

From: Steve McIntyre <steve@einval.com>
To: Thorsten Glaser <tg@mirbsd.de>
Cc: klibc@zytor.com, 634890@bugs.debian.org, shawn <shawnlandden@gmail.com>
Subject: Re: Bug#634890: [klibc] klibc issues on armhf (not Debian/armel)
Date: Mon, 2 Jul 2012 15:36:34 +0100
On Mon, Jul 02, 2012 at 03:29:55PM +0100, Steve McIntyre wrote:
>On Sun, Jul 01, 2012 at 09:15:45PM +0000, Thorsten Glaser wrote:
>>maximilian attems dixit:
>>
>>>so could it be out of blindness that we didn't properly build with
>>>thumb instruction in Debian?
>>
>>I’ve tried enabling thumb, but the bugs didn’t go away with
>>that either.
>
>There's a reason for that - it's already defaulting to Thumb anyway,
>as that's the compiler default for armhf. Along the same lines as
>changing the optimisation level (-O0 and -O1 both work fine),
>switching to ARM code by adding -marm also makes the bug go away.
>
>Maks, would you like a trivial patch to do that?
>
>I'm also pondering the other Thumb settings in MCONFIG - as far as I
>can see, CONFIG_KLIBC_THUMB is not set at the moment even though we
>*are* clearly building with Thumb. Investigating now...

Nope, same segfault even with that turned on.

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
  Armed with "Valor": "Centurion" represents quality of Discipline,
  Honor, Integrity and Loyalty. Now you don't have to be a Caesar to
  concord the digital world while feeling safe and proud.





Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sat, 29 Sep 2012 20:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sat, 29 Sep 2012 20:33:03 GMT) Full text and rfc822 format available.

Message #89 received at 634890@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: 634890@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: klibc does not work on armhf
Date: Sat, 29 Sep 2012 20:25:01 +0000 (UTC)
tags 634890 + fixed-upstream
thanks

Hi,

I’ve submitted upstream a number of commits that fix this, plus one for
the Debian packaging:

• fix http://www.zytor.com/pipermail/klibc/2012-September/003366.html
• fix http://www.zytor.com/pipermail/klibc/2012-September/003368.html
• pkg http://www.zytor.com/pipermail/klibc/2012-September/003367.html

maks, are you available or should I NMU?

bye,
//mirabilos
-- 
21:27⎜[Natureshadow] BÄH! Wer hatn das Bier neben den Notebooklüfter
     ⎜    gestellt ...
21:27⎜>Natureshadow< lol                         21:27⎜>Natureshadow< du?
21:27⎜[Natureshadow] vermutlich ...   -- Kev^WNatureshadow allein zu Haus



Added tag(s) fixed-upstream. Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Sat, 29 Sep 2012 20:33:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 30 Sep 2012 11:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to maximilian attems <max@stro.at>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 30 Sep 2012 11:03:03 GMT) Full text and rfc822 format available.

Message #96 received at 634890@bugs.debian.org (full text, mbox):

From: maximilian attems <max@stro.at>
To: Thorsten Glaser <tg@mirbsd.de>, 634890@bugs.debian.org
Subject: Re: Bug#634890: klibc does not work on armhf
Date: Sun, 30 Sep 2012 12:51:12 +0200
On Sat, 29 Sep 2012, Thorsten Glaser wrote:

> I’ve submitted upstream a number of commits that fix this, plus one for
> the Debian packaging:
> 
> • fix http://www.zytor.com/pipermail/klibc/2012-September/003366.html
> • fix http://www.zytor.com/pipermail/klibc/2012-September/003368.html
> • pkg http://www.zytor.com/pipermail/klibc/2012-September/003367.html
> 
> maks, are you available or should I NMU?

nice, work!!

Just flacky internet today, I'll have a full look tomorrow to incorporate.

thank you.

-- 
maks




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Sun, 30 Sep 2012 12:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Sun, 30 Sep 2012 12:45:03 GMT) Full text and rfc822 format available.

Message #101 received at 634890@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: maximilian attems <max@stro.at>, 634890@bugs.debian.org
Subject: Re: Bug#634890: klibc does not work on armhf
Date: Sun, 30 Sep 2012 12:34:15 +0000 (UTC)
maximilian attems dixit:

>nice, work!!

Thanks. This was bugging me for a while already, and
yesterday I looked at it with “a fresh mind”.

(Also had a look at IA64 and SH4, but the former is
really strange, and no gdb on the latter’s porterbox.)

>Just flacky internet today, I'll have a full look tomorrow to incorporate.

OK, thanks. I think one of the ARM guys or jak can do
a test-boot with an initrd made from the fixed klibc
and without busybox, and rebuilding mksh on armhf with
it would also show success (in fact, once you uploaded,
I’ll ask for a binNMU of mksh on armhf anyway).

bye,
//mirabilos
-- 
<gcc> ncal.c: In function 'parsemonth': warning: comparison between pointer
and integer  • <mirabilos> ↑ hab da „in function parselmouth“ gelesen
<Natureshadow> ICH AUCH! • <Natureshadow> Ich hab gerade gedacht "Häh? Wie,
hab da parselmouth gelesen ... steht da doch auch :o?"	-- too much fanfic…



Reply sent to maximilian attems <maks@debian.org>:
You have taken responsibility. (Mon, 01 Oct 2012 17:51:08 GMT) Full text and rfc822 format available.

Notification sent to Julian Andres Klode <jak@debian.org>:
Bug acknowledged by developer. (Mon, 01 Oct 2012 17:51:09 GMT) Full text and rfc822 format available.

Message #106 received at 634890-close@bugs.debian.org (full text, mbox):

From: maximilian attems <maks@debian.org>
To: 634890-close@bugs.debian.org
Subject: Bug#634890: fixed in klibc 2.0.1-2
Date: Mon, 01 Oct 2012 17:47:38 +0000
Source: klibc
Source-Version: 2.0.1-2

We believe that the bug you reported is fixed in the latest version of
klibc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 634890@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
maximilian attems <maks@debian.org> (supplier of updated klibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 01 Oct 2012 15:54:05 +0200
Source: klibc
Binary: libklibc-dev libklibc klibc-utils klibc-utils-udeb klibc-utils-floppy-udeb libklibc-udeb
Architecture: source amd64
Version: 2.0.1-2
Distribution: unstable
Urgency: low
Maintainer: maximilian attems <maks@debian.org>
Changed-By: maximilian attems <maks@debian.org>
Description: 
 klibc-utils - small utilities built with klibc for early boot
 klibc-utils-floppy-udeb - small utilities built with klibc for the boot floppy (udeb)
 klibc-utils-udeb - small utilities built with klibc for early boot (d-i) (udeb)
 libklibc   - minimal libc subset for use with initramfs
 libklibc-dev - kernel headers used during the build of klibc
 libklibc-udeb - minimal libc subset for use with initramfs (d-i) (udeb)
Closes: 634890 677087
Changes: 
 klibc (2.0.1-2) unstable; urgency=low
 .
   [ Sven Joachim ]
   * [08c03cf] klibc: produces 64-bit binaries on i386 with x86_64 kernel
     (Closes: #677087)
 .
   [ Thorsten Glaser ]
   * [d8eae3a] [klibc] arm: fix trashing of callee-saved registers in thumb
      setjmp() (Closes: #634890)
   * [81170b5] [klibc] arm: unbreak armhf shared binaries (those with thumb)
   * [aeb7847] armhf builds are always thumb
 .
   [ Jim Meyering ]
   * [9ba90cd] [klibc] Avoid overflow for very long variable name
Checksums-Sha1: 
 e2ca2a74e5df174936d5aabb1497132dbc3e5a92 2161 klibc_2.0.1-2.dsc
 61794eec90b326fd3a1122470a9e0ddf6ffabc44 23006 klibc_2.0.1-2.debian.tar.gz
 2f081ee4c028e7f156432767f3a254a7e1d98d6c 232336 libklibc-dev_2.0.1-2_amd64.deb
 36d6e9f347395b7dcaf82df38db7ca2c6f900af9 56772 libklibc_2.0.1-2_amd64.deb
 ae9a6d1459d0fabd8ff79aa5a236a076f09f56d7 191562 klibc-utils_2.0.1-2_amd64.deb
 8003d74dabe31a6eb7e366c5b012bcbb2fb1a388 105848 klibc-utils-udeb_2.0.1-2_amd64.udeb
 597232b38f55f855d6af5cf81a28d1b66162612e 23770 klibc-utils-floppy-udeb_2.0.1-2_amd64.udeb
 9fbe1785207ddbd99ae4ce18b107dda3392703d0 33508 libklibc-udeb_2.0.1-2_amd64.udeb
Checksums-Sha256: 
 6a450221de77d1a89d7a438ef4c58209e7524dd40de20eac08c23c5a6c4a1b90 2161 klibc_2.0.1-2.dsc
 613a83e90ed0ee07f421a5d08235df97036f2798ad384821fc4d84a1e31bdde9 23006 klibc_2.0.1-2.debian.tar.gz
 03ddec4e365d8f512ff781db95733deec90fe6387ceb366ced112a659e75794e 232336 libklibc-dev_2.0.1-2_amd64.deb
 42dc6c07f8e79aaf6f55cfe466d139dd030f65da58591267f89c1045296a6f26 56772 libklibc_2.0.1-2_amd64.deb
 b58a64454abff86c543f3f5f112b63c0965a6714c9135ac84bd22a782aa30a19 191562 klibc-utils_2.0.1-2_amd64.deb
 d9e8a5505ca60deb7b80cfb7212a298cd09a7aa60dafbc432bfe768348e3b44a 105848 klibc-utils-udeb_2.0.1-2_amd64.udeb
 08d5604e3cd36dc9acfc1a8e2e4bb34c60533301f560a77d0b3f345f9abd6fb9 23770 klibc-utils-floppy-udeb_2.0.1-2_amd64.udeb
 c24bd4896ddd8ed542377d9dc2ebedc2d335320959876ff4e0255ad5d15eba6e 33508 libklibc-udeb_2.0.1-2_amd64.udeb
Files: 
 9be0934aeea595223254f1ad3fa533b1 2161 libs optional klibc_2.0.1-2.dsc
 025a795cf39c35fb2a9e390df1ddd48a 23006 libs optional klibc_2.0.1-2.debian.tar.gz
 0515e6e1ee7b10b31d810ce2aa8b8e91 232336 libdevel optional libklibc-dev_2.0.1-2_amd64.deb
 dc2ef22e76d1996d4bdfcb0425a7bacc 56772 libs optional libklibc_2.0.1-2_amd64.deb
 99f3db60fe57d495ebd592bc44f6fd71 191562 libs optional klibc-utils_2.0.1-2_amd64.deb
 05bfe5a87b71d028a80c00c1f057750f 105848 debian-installer optional klibc-utils-udeb_2.0.1-2_amd64.udeb
 e51b94c0c144a03d02ef72541459971a 23770 debian-installer optional klibc-utils-floppy-udeb_2.0.1-2_amd64.udeb
 2edc89431c4c454202cfdbec3ae7a4bf 33508 debian-installer optional libklibc-udeb_2.0.1-2_amd64.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQaadrAAoJEDrehzjSGwbGAAYP/jrtHtJ4pBX6IwQcy+tMDyIj
sOOyNd3beyajA0cKcE1y4vxwMDCDXWp/K56Kwr7/Clm3k2xEiycsuWJKMOygx+MX
XlCfA88v42xNL+dBHhvRsbxzQgD3cpFPfZ04mGETDsBql5NbFLDc+8BT38U7A7K3
+cmxMZe3SfQDMD0c+HFKgFfGD+0xrOKSfEg1YgluQH+MZWHIydX8/OTgTdZMiq+a
xpkllUlcJXWves4om8Z758ewnfJqpsUZUyfgF0GMWk1CUoEnDavcj98Fxlo6MN6o
JF9egpQnJn+eqhaP0F7LTbZambPgW1L4bwNeJo0TPnCK+Qy0M5QNtMl/yIEMd+c6
XonUjJJF9vOBYeDWtKYHuTCV2Ej+b+PTdjZ6yFrMHg7WbwNilovjBr5rBUvzlei1
GYHJG7FmQLSUpnXDq5Z5n+65bHsNpuRIna4jUgDNNLw7mEsAtZI0RwWXCA/UJaP0
uuuKk5WBT4a50uOmRriGcNZk277JeBDbehkp3k/XjuRWmdaatJ350s9GnnOtp+qb
KxomXw/ynEZaS8uNo0N6PS1vmkKU3bwpr/2mX6KcBM0WsGu0DLuvATHkNW0pxATF
uqD8orVcVQ2aRs48pBT+ZPiPN3XODZLdCN3LJFdmRpsBFEx2sWK0WSgVl6D6mobR
i4O1pe0OCBJYpA9BCMAd
=/595
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#634890; Package klibc-utils. (Mon, 01 Oct 2012 21:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to maximilian attems <max@stro.at>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>. (Mon, 01 Oct 2012 21:06:03 GMT) Full text and rfc822 format available.

Message #111 received at 634890@bugs.debian.org (full text, mbox):

From: maximilian attems <max@stro.at>
To: Thorsten Glaser <tg@mirbsd.de>
Cc: 634890@bugs.debian.org
Subject: Re: Bug#634890: klibc does not work on armhf
Date: Mon, 1 Oct 2012 23:04:00 +0200
On Sun, 30 Sep 2012, Thorsten Glaser wrote:

> 
> OK, thanks. I think one of the ARM guys or jak can do
> a test-boot with an initrd made from the fixed klibc
> and without busybox, and rebuilding mksh on armhf with
> it would also show success (in fact, once you uploaded,
> I’ll ask for a binNMU of mksh on armhf anyway).

klibc built fine on all archs, go ahead!! :D

-- 
maks



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 30 Oct 2012 07:29:17 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 25 06:38:23 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.