Greetings and Salutations,
$subject, box is Q6600 X86_64 running v2.6.29-rc6-2261-g0fdaeee
marge:/root # xine
This is xine (X11 gui) - a free video player v0.99.6cvs.
(c) 2000-2007 The xine Team.
Floating point exception
[pid 6230] 06:59:50.524473 set_robust_list(0x40e239f0, 0x18 <unfinished ...>
[pid 6230] 06:59:50.524553 <... set_robust_list resumed> ) = 0 <0.000027>
[pid 6230] 06:59:50.524648 select(0, NULL, NULL, NULL, {0, 500000} <unfinished ...>
[pid 6230] 06:59:50.763988 <... select resumed> ) = ? ERESTARTNOHAND (To be restarted) <0.239321>
[pid 6230] 06:59:50.764012 --- SIGRT_1 (Unknown signal 33) @ 0 (0) ---
[pid 6230] 06:59:50.764074 setuid(0) = 0 <0.000014>
[pid 6230] 06:59:50.764151 futex(0x7fff2745e7a0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 6230] 06:59:50.764213 <... futex resumed> ) = 0 <0.000051>
[pid 6230] 06:59:50.764255 futex(0x40e23d2c, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 6230] 06:59:50.764298 <... futex resumed> ) = 0 <0.000028>
[pid 6230] 06:59:50.764346 rt_sigreturn(0x40e23d2c <unfinished ...>
[pid 6230] 06:59:50.778497 <... rt_sigreturn resumed> ) = 0 <0.014136>
[pid 6230] 06:59:50.778524 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[ 1303.345419] xine[6230] bad frame in rt_sigreturn frame:0000000040e22c28 ip:7f051ca28622 sp:40e23070 orax:ffffffffffffffff in libc-2.8.so[7f051c95c000+14f000]
97286a2b64725aac2d584ddd1f94871f9991d5a1 is first bad commit
commit 97286a2b64725aac2d584ddd1f94871f9991d5a1
Author: Hiroshi Shimamoto <[email protected]>
Date: Fri Feb 27 10:28:48 2009 -0800
x86: signal: intrroduce get_sigframe() and replace get_sigstack()
Impact: cleanup
Introduce get_sigframe() like 32-bit to replace get_sigstack().
Move the i387 stuff into get_sigframe().
Signed-off-by: Hiroshi Shimamoto <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
:040000 040000 8362638206eb8aff52e3cfbcff614aac2431c703 81c0844015869d3773673420898f54b55ea36298 M arch
git bisect start
# good: [20f4d6c3a2a23c5d7d9cc7f42fbb943ca7a03d1f] Linux 2.6.29-rc6
git bisect good 20f4d6c3a2a23c5d7d9cc7f42fbb943ca7a03d1f
# bad: [0fdaeee8594f2ce68e497cdabd9c39ff3a12747c] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip into x86-tip
git bisect bad 0fdaeee8594f2ce68e497cdabd9c39ff3a12747c
# good: [d05aaeb333ccc4bee996c684f81dd47014d14c8a] Merge branch 'auto-warnings-next' into auto-latest
git bisect good d05aaeb333ccc4bee996c684f81dd47014d14c8a
# good: [a91607d4fab1edcd14c2063dad4a3128050d009a] Merge branch 'out-of-tree'
git bisect good a91607d4fab1edcd14c2063dad4a3128050d009a
# good: [7f0f13281741d9135e57991160ebdcc57e95ad4b] Merge branch 'kmemcheck'
git bisect good 7f0f13281741d9135e57991160ebdcc57e95ad4b
# skip: [01bb434893fe62d3504ef4a0a9d24ac04209ace5] Merge branch 'kmemcheck'
git bisect skip 01bb434893fe62d3504ef4a0a9d24ac04209ace5
# bad: [2047d5799675f0d8c5fc939475cdd2913bcb77ea] Merge branch 'kmemcheck'
git bisect bad 2047d5799675f0d8c5fc939475cdd2913bcb77ea
# good: [64e71303e44f3697e4568147caa966de74bdb4fb] Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
git bisect good 64e71303e44f3697e4568147caa966de74bdb4fb
# good: [f39e09b3b2c11ad1b008518a05bc2b7c25eabc7d] Merge branch 'tracing/ftrace'
git bisect good f39e09b3b2c11ad1b008518a05bc2b7c25eabc7d
# good: [72e97b0f8d9d1d0842af6b47ac0982dc048cbadd] Merge branch 'x86/fixmap'
git bisect good 72e97b0f8d9d1d0842af6b47ac0982dc048cbadd
# good: [39bc66625d7a761f6e5c5b3d81d88e7c9359ca84] kmemcheck: fix split_page() of the page allocator, fix
git bisect good 39bc66625d7a761f6e5c5b3d81d88e7c9359ca84
# bad: [75779f05264b9968d7ae7ecb4ca5127b08785692] x86: signal: unify get_sigframe()
git bisect bad 75779f05264b9968d7ae7ecb4ca5127b08785692
# bad: [97286a2b64725aac2d584ddd1f94871f9991d5a1] x86: signal: intrroduce get_sigframe() and replace get_sigstack()
git bisect bad 97286a2b64725aac2d584ddd1f94871f9991d5a1
# good: [144b0712dd9dd9ebd4e80c4e5388c9f6afc2b497] x86: signal: add __user annotation
git bisect good 144b0712dd9dd9ebd4e80c4e5388c9f6afc2b497
* Mike Galbraith <[email protected]> wrote:
> Greetings and Salutations,
>
> $subject, box is Q6600 X86_64 running v2.6.29-rc6-2261-g0fdaeee
>
> marge:/root # xine
> This is xine (X11 gui) - a free video player v0.99.6cvs.
> (c) 2000-2007 The xine Team.
> Floating point exception
>
> [pid 6230] 06:59:50.524473 set_robust_list(0x40e239f0, 0x18 <unfinished ...>
> [pid 6230] 06:59:50.524553 <... set_robust_list resumed> ) = 0 <0.000027>
> [pid 6230] 06:59:50.524648 select(0, NULL, NULL, NULL, {0, 500000} <unfinished ...>
> [pid 6230] 06:59:50.763988 <... select resumed> ) = ? ERESTARTNOHAND (To be restarted) <0.239321>
> [pid 6230] 06:59:50.764012 --- SIGRT_1 (Unknown signal 33) @ 0 (0) ---
> [pid 6230] 06:59:50.764074 setuid(0) = 0 <0.000014>
> [pid 6230] 06:59:50.764151 futex(0x7fff2745e7a0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
> [pid 6230] 06:59:50.764213 <... futex resumed> ) = 0 <0.000051>
> [pid 6230] 06:59:50.764255 futex(0x40e23d2c, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
> [pid 6230] 06:59:50.764298 <... futex resumed> ) = 0 <0.000028>
> [pid 6230] 06:59:50.764346 rt_sigreturn(0x40e23d2c <unfinished ...>
> [pid 6230] 06:59:50.778497 <... rt_sigreturn resumed> ) = 0 <0.014136>
> [pid 6230] 06:59:50.778524 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>
> [ 1303.345419] xine[6230] bad frame in rt_sigreturn frame:0000000040e22c28 ip:7f051ca28622 sp:40e23070 orax:ffffffffffffffff in libc-2.8.so[7f051c95c000+14f000]
>
> 97286a2b64725aac2d584ddd1f94871f9991d5a1 is first bad commit
> commit 97286a2b64725aac2d584ddd1f94871f9991d5a1
> Author: Hiroshi Shimamoto <[email protected]>
> Date: Fri Feb 27 10:28:48 2009 -0800
>
> x86: signal: intrroduce get_sigframe() and replace get_sigstack()
>
> Impact: cleanup
ok, that's the same area Jaswinder Singh Rajput bisected a
breakage back to. I've excluded these commits from tip:master
for now and pushed out an updated tip:master tree.
Hiroshi-san, mind having a look at this problem?
Ingo
Ingo Molnar wrote:
> * Mike Galbraith <[email protected]> wrote:
>
>> Greetings and Salutations,
>>
>> $subject, box is Q6600 X86_64 running v2.6.29-rc6-2261-g0fdaeee
>>
>> marge:/root # xine
>> This is xine (X11 gui) - a free video player v0.99.6cvs.
>> (c) 2000-2007 The xine Team.
>> Floating point exception
>>
>> [pid 6230] 06:59:50.524473 set_robust_list(0x40e239f0, 0x18 <unfinished ...>
>> [pid 6230] 06:59:50.524553 <... set_robust_list resumed> ) = 0 <0.000027>
>> [pid 6230] 06:59:50.524648 select(0, NULL, NULL, NULL, {0, 500000} <unfinished ...>
>> [pid 6230] 06:59:50.763988 <... select resumed> ) = ? ERESTARTNOHAND (To be restarted) <0.239321>
>> [pid 6230] 06:59:50.764012 --- SIGRT_1 (Unknown signal 33) @ 0 (0) ---
>> [pid 6230] 06:59:50.764074 setuid(0) = 0 <0.000014>
>> [pid 6230] 06:59:50.764151 futex(0x7fff2745e7a0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
>> [pid 6230] 06:59:50.764213 <... futex resumed> ) = 0 <0.000051>
>> [pid 6230] 06:59:50.764255 futex(0x40e23d2c, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
>> [pid 6230] 06:59:50.764298 <... futex resumed> ) = 0 <0.000028>
>> [pid 6230] 06:59:50.764346 rt_sigreturn(0x40e23d2c <unfinished ...>
>> [pid 6230] 06:59:50.778497 <... rt_sigreturn resumed> ) = 0 <0.014136>
>> [pid 6230] 06:59:50.778524 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>>
>> [ 1303.345419] xine[6230] bad frame in rt_sigreturn frame:0000000040e22c28 ip:7f051ca28622 sp:40e23070 orax:ffffffffffffffff in libc-2.8.so[7f051c95c000+14f000]
>>
>> 97286a2b64725aac2d584ddd1f94871f9991d5a1 is first bad commit
>> commit 97286a2b64725aac2d584ddd1f94871f9991d5a1
>> Author: Hiroshi Shimamoto <[email protected]>
>> Date: Fri Feb 27 10:28:48 2009 -0800
>>
>> x86: signal: intrroduce get_sigframe() and replace get_sigstack()
>>
>> Impact: cleanup
Thanks for reporting and bisecting.
Apparently I did something wrong in this cleanup series.
>
> ok, that's the same area Jaswinder Singh Rajput bisected a
> breakage back to. I've excluded these commits from tip:master
> for now and pushed out an updated tip:master tree.
>
> Hiroshi-san, mind having a look at this problem?
OK, I'll look at this.
Thanks,
Hiroshi
Ingo Molnar wrote:
> * Mike Galbraith <[email protected]> wrote:
>
>> Greetings and Salutations,
>>
>> $subject, box is Q6600 X86_64 running v2.6.29-rc6-2261-g0fdaeee
>>
>> marge:/root # xine
>> This is xine (X11 gui) - a free video player v0.99.6cvs.
>> (c) 2000-2007 The xine Team.
>> Floating point exception
>>
>> [pid 6230] 06:59:50.524473 set_robust_list(0x40e239f0, 0x18 <unfinished ...>
>> [pid 6230] 06:59:50.524553 <... set_robust_list resumed> ) = 0 <0.000027>
>> [pid 6230] 06:59:50.524648 select(0, NULL, NULL, NULL, {0, 500000} <unfinished ...>
>> [pid 6230] 06:59:50.763988 <... select resumed> ) = ? ERESTARTNOHAND (To be restarted) <0.239321>
>> [pid 6230] 06:59:50.764012 --- SIGRT_1 (Unknown signal 33) @ 0 (0) ---
>> [pid 6230] 06:59:50.764074 setuid(0) = 0 <0.000014>
>> [pid 6230] 06:59:50.764151 futex(0x7fff2745e7a0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
>> [pid 6230] 06:59:50.764213 <... futex resumed> ) = 0 <0.000051>
>> [pid 6230] 06:59:50.764255 futex(0x40e23d2c, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
>> [pid 6230] 06:59:50.764298 <... futex resumed> ) = 0 <0.000028>
>> [pid 6230] 06:59:50.764346 rt_sigreturn(0x40e23d2c <unfinished ...>
>> [pid 6230] 06:59:50.778497 <... rt_sigreturn resumed> ) = 0 <0.014136>
>> [pid 6230] 06:59:50.778524 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>>
>> [ 1303.345419] xine[6230] bad frame in rt_sigreturn frame:0000000040e22c28 ip:7f051ca28622 sp:40e23070 orax:ffffffffffffffff in libc-2.8.so[7f051c95c000+14f000]
>>
>> 97286a2b64725aac2d584ddd1f94871f9991d5a1 is first bad commit
>> commit 97286a2b64725aac2d584ddd1f94871f9991d5a1
>> Author: Hiroshi Shimamoto <[email protected]>
>> Date: Fri Feb 27 10:28:48 2009 -0800
>>
>> x86: signal: intrroduce get_sigframe() and replace get_sigstack()
>>
>> Impact: cleanup
>
> ok, that's the same area Jaswinder Singh Rajput bisected a
> breakage back to. I've excluded these commits from tip:master
> for now and pushed out an updated tip:master tree.
>
> Hiroshi-san, mind having a look at this problem?
Hi Ingo,
I made a patch to fix this issue.
This patch is against tip/x86/signal.
I've tried tip/x86/signal and seen bad frame with firefox.
After applied this patch, it looks fine.
Thanks,
Hiroshi
========
From: Hiroshi Shimamoto <[email protected]>
Subject: [PATCH] x86: signal: fix get_sigframe() on 64-bit
Impact: fix bad frame in rt_sigreturn on 64-bit
After commit 97286a2b64725aac2d584ddd1f94871f9991d5a1 some applications fail
to return from signal handler.
[ 145.150133] firefox[3250] bad frame in rt_sigreturn frame:00007f902b44eb28 ip:352e80b307 sp:7f902b44ef70 orax:ffffffffffffffff in libpthread-2.9.so[352e800000+17000]
[ 665.519017] firefox[5420] bad frame in rt_sigreturn frame:00007faa8deaeb28 ip:352e80b307 sp:7faa8deaef70 orax:ffffffffffffffff in libpthread-2.9.so[352e800000+17000]
The root cause is forgetting to keep 64 byte aligned value of fpstate for next
stack pointer calculation.
Reported-by: Jaswinder Singh Rajput <[email protected]>
Reported-by: Mike Galbraith <[email protected]>
Signed-off-by: Hiroshi Shimamoto <[email protected]>
---
arch/x86/kernel/signal.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index dde3f2a..d2cc642 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -240,11 +240,10 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
if (used_math()) {
sp -= sig_xstate_size;
-#ifdef CONFIG_X86_32
- *fpstate = (void __user *) sp;
-#else /* !CONFIG_X86_32 */
- *fpstate = (void __user *)round_down(sp, 64);
-#endif /* CONFIG_X86_32 */
+#ifdef CONFIG_X86_64
+ sp = round_down(sp, 64);
+#endif /* CONFIG_X86_64 */
+ *fpstate = (void __user *)sp;
if (save_i387_xstate(*fpstate) < 0)
return (void __user *)-1L;
--
1.6.1.2
On Mon, 2009-03-02 at 17:20 -0800, Hiroshi Shimamoto wrote:
> I made a patch to fix this issue.
> This patch is against tip/x86/signal.
Yes, this fixed my xine woes.
-Mike
* Mike Galbraith <[email protected]> wrote:
> On Mon, 2009-03-02 at 17:20 -0800, Hiroshi Shimamoto wrote:
>
> > I made a patch to fix this issue.
> > This patch is against tip/x86/signal.
>
> Yes, this fixed my xine woes.
Applied, thanks guys!
Ingo
Commit-ID: 2505170211f7630361a852e25b60f4df4c878daa
Gitweb: http://git.kernel.org/tip/2505170211f7630361a852e25b60f4df4c878daa
Author: "Hiroshi Shimamoto" <[email protected]>
AuthorDate: Mon, 2 Mar 2009 17:20:01 -0800
Commit: Ingo Molnar <[email protected]>
CommitDate: Tue, 3 Mar 2009 09:03:12 +0100
x86, signals: fix xine & firefox bustage
Impact: fix bad frame in rt_sigreturn on 64-bit
After commit 97286a2b64725aac2d584ddd1f94871f9991d5a1 some applications
fail to return from signal handler:
[ 145.150133] firefox[3250] bad frame in rt_sigreturn frame:00007f902b44eb28 ip:352e80b307 sp:7f902b44ef70 orax:ffffffffffffffff in libpthread-2.9.so[352e800000+17000]
[ 665.519017] firefox[5420] bad frame in rt_sigreturn frame:00007faa8deaeb28 ip:352e80b307 sp:7faa8deaef70 orax:ffffffffffffffff in libpthread-2.9.so[352e800000+17000]
The root cause is forgetting to keep 64 byte aligned value of
fpstate for next stack pointer calculation.
Reported-by: Jaswinder Singh Rajput <[email protected]>
Reported-by: Mike Galbraith <[email protected]>
Signed-off-by: Hiroshi Shimamoto <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/signal.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index dde3f2a..d2cc642 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -240,11 +240,10 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
if (used_math()) {
sp -= sig_xstate_size;
-#ifdef CONFIG_X86_32
- *fpstate = (void __user *) sp;
-#else /* !CONFIG_X86_32 */
- *fpstate = (void __user *)round_down(sp, 64);
-#endif /* CONFIG_X86_32 */
+#ifdef CONFIG_X86_64
+ sp = round_down(sp, 64);
+#endif /* CONFIG_X86_64 */
+ *fpstate = (void __user *)sp;
if (save_i387_xstate(*fpstate) < 0)
return (void __user *)-1L;