h8300 build failures ijn linux-next
Hi,
In linux-next as of today (0824), all h8300 builds fail for me with an internal compiler error.
Building h8300:allnoconfig ... failed
--------------
Error log:
In file included from include/linux/rcupdate.h:429:0,
from include/linux/rcusync.h:5,
from kernel/rcu/sync.c:1:include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline void rcu_barrier_sched(void)
^
I tried both gcc 5.1 and 5.2, built with the patch set available to me.
Is there a more recent compiler / patch set available that might fix the problem ?
Thanks,
Guenter
Quoted 16 lines · Guenter Roeck
Hi,
In linux-next as of today (0824), all h8300 builds fail for me with an internal compiler error.
Building h8300:allnoconfig ... failed
--------------
Error log:In file included from
include/linux/rcupdate.h:429:0,
frominclude/linux/rcusync.h:5,
fromkernel/rcu/sync.c:1:include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline voidrcu_barrier_sched(void)
Quoted 6 lines
^I tried both gcc 5.1 and 5.2, built with the patch set available to me.
Is there a more recent compiler / patch set available that might fix the problem ?
No.
I tried gcc 6.0. It got same error.
It looks optimization problem on h8300 target.
I will investigate it.
Quoted 2 lines
Thanks,
Guenter
Signature · 2 lines
Yoshinori Sato <[email protected]>
Quoted 24 lines · Yoshinori Sato
Quoted 22 lines · Guenter Roeck
Hi,
In linux-next as of today (0824), all h8300 builds fail for me with an internal
compiler error.Building h8300:allnoconfig ... failed
--------------
Error log:In file included from
include/linux/rcupdate.h:429:0,
frominclude/linux/rcusync.h:5,
fromkernel/rcu/sync.c:1:include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline voidrcu_barrier_sched(void)^I tried both gcc 5.1 and 5.2, built with the patch set available to me.
Quoted 8 lines
Quoted 3 lines
Is there a more recent compiler / patch set available that might fix the problem ?
No.
I tried gcc 6.0. It got same error.
It looks optimization problem on h8300 target.
I will investigate it.
I get the same ICE with c6x gcc 5.1
Quoted 3 lines
Quoted 2 lines
Thanks,
Guenter
Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Hi Mark,
Quoted 29 lines · Mark Salter
Quoted 28 lines · Yoshinori Sato
Quoted 25 lines · Guenter Roeck
Hi,
In linux-next as of today (0824), all h8300 builds fail for me with an internal
compiler error.Building h8300:allnoconfig ... failed
--------------
Error log:In file included from
include/linux/rcupdate.h:429:0,
frominclude/linux/rcusync.h:5,
fromkernel/rcu/sync.c:1:include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline voidrcu_barrier_sched(void)^I tried both gcc 5.1 and 5.2, built with the patch set available to me.
Is there a more recent compiler / patch set available that might fix the problem ?
Quoted 7 lines
Quoted 4 lines
No.
I tried gcc 6.0. It got same error.
It looks optimization problem on h8300 target.
I will investigate it.I get the same ICE with c6x gcc 5.1
Interesting. h8300 was the only gcc 5+ compiler I had used so far. Just for fun, I built an alpha toolchain with gcc 5.1. Same problem there. So it looks like it isn't a h8300 problem after all, it is a gcc problem.
Updated subject line, and copied rcu maintainers.
Guenter
Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Quoted 38 lines · Guenter Roeck
Hi Mark,
Quoted 34 lines · Mark Salter
Quoted 32 lines · Yoshinori Sato
Quoted 18 lines · Guenter Roeck
Hi,
In linux-next as of today (0824), all h8300 builds fail for me with an internal
compiler error.Building h8300:allnoconfig ... failed
--------------
Error log:In file included from
include/linux/rcupdate.h:429:0,
frominclude/linux/rcusync.h:5,
fromkernel/rcu/sync.c:1:include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline voidrcu_barrier_sched(void)Quoted 7 lines
^I tried both gcc 5.1 and 5.2, built with the patch set available to me.
Is there a more recent compiler / patch set available that might fix the problem ?
No.
I tried gcc 6.0. It got same error.
It looks optimization problem on h8300 target.
I will investigate it.
Quoted 8 lines
Quoted 2 lines
I get the same ICE with c6x gcc 5.1
Interesting. h8300 was the only gcc 5+ compiler I had used so far. Just for fun, I built an alpha toolchain with gcc 5.1. Same problem there. So it looks like it isn't a h8300 problem after all, it is a gcc problem.
Updated subject line, and copied rcu maintainers.
Damn. This was caused by my patch, I need to react, and I do not know what to say ;)
OK, this is gcc bug. But we probably need the workaround, and I don't have a h8300 machine so I can't test the fix.
Could you please try to compile kernel/rcu/sync.o with the patch below? Just to know how "stable" this bug is. I expect the compilation should fail again, rcutiny.h:rcu_barrier() is "inline" too.
Oleg.
kernel/rcu/sync.c +0 -1
@@ -24,7 +24,6 @@ static const struct { [RCU_SCHED_SYNC] = { .sync = synchronize_sched, .call = call_rcu_sched, - .wait = rcu_barrier_sched,__INIT_HELD (rcu_read_lock_sched_held) }, [RCU_BH_SYNC] = {
Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Quoted 7 lines · Oleg Nesterov
OK, this is gcc bug. But we probably need the workaround, and I don't have a h8300 machine so I can't test the fix.
Could you please try to compile
kernel/rcu/sync.owith the patch below? Just to know how "stable" this bug is. I expect the compilation should fail again, rcutiny.h:rcu_barrier() is "inline" too.
Wait, I reproduced the same problem on x86. Thanks.
Oleg.
Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
In reply to Guenter RoeckQuoted 41 lines · Guenter Roeck
Hi Mark,
Quoted 29 lines · Mark Salter
Quoted 28 lines · Yoshinori Sato
Quoted 25 lines · Guenter Roeck
Hi,
In linux-next as of today (0824), all h8300 builds fail for me with an internal
compiler error.Building h8300:allnoconfig ... failed
--------------
Error log:In file included from
include/linux/rcupdate.h:429:0,
frominclude/linux/rcusync.h:5,
fromkernel/rcu/sync.c:1:include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline voidrcu_barrier_sched(void)^I tried both gcc 5.1 and 5.2, built with the patch set available to me.
Is there a more recent compiler / patch set available that might fix the problem ?
Quoted 7 lines
Quoted 4 lines
No.
I tried gcc 6.0. It got same error.
It looks optimization problem on h8300 target.
I will investigate it.I get the same ICE with c6x gcc 5.1
Quoted 8 lines
Interesting. h8300 was the only gcc 5+ compiler I had used so far. Just for fun, I built an alpha toolchain with gcc 5.1. Same problem there. So it looks like it isn't a h8300 problem after all, it is a gcc problem.
Updated subject line, and copied rcu maintainers.
Guenter
Yes.
gcc bug #67055.
Already fixed in trunk.
Signature · 2 lines
Yoshinori Sato <[email protected]>
Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Quoted 4 lines · Yoshinori Sato
Yes.
gcc bug #67055.
Already fixed in trunk.
Yes, thanks a lot.
Paul, it seems that gcc actually dislikes your ec90a194a "rcu:
Create a synchronize_rcu_mult()" commit ;) rcu/sync.c was just lucky enough to trigger the problem.
I'll try to make the fix today...
Oleg.
Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Quoted 7 lines · Oleg Nesterov
Quoted 4 lines · Yoshinori Sato
Yes.
gcc bug #67055.
Already fixed in trunk.
Quoted 7 lines
Yes, thanks a lot.
Paul, it seems that gcc actually dislikes your
ec90a194a"rcu:
Create asynchronize_rcu_mult()" commit ;)rcu/sync.cwas just lucky enough to trigger the problem.I'll try to make the fix today...
Mark, Guenter, any chance you can check if the patch below helps? It does on x86.
Oleg.
include/linux/rcupdate.h +5 -6
@@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array, struct rcu_synchronize *rs_array);#define _wait_rcu_gp (checktiny, ...) \ -do { \ - call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ - const int __n = ARRAY_SIZE(__crcu_array); \ - struct rcu_synchronize __rs_array[__n]; \ - \ - __wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \ +do { \ + call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ + struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)]; \ + __wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array), \ + __crcu_array, __rs_array); \ } while (0)#define wait_rcu_gp (...) _wait_rcu_gp(false, __VA_ARGS__)
Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Quoted 10 lines · Oleg Nesterov
Quoted 9 lines · Oleg Nesterov
Quoted 4 lines · Yoshinori Sato
Yes.
gcc bug #67055.
Already fixed in trunk.Yes, thanks a lot.
Quoted 8 lines
Quoted 5 lines
Paul, it seems that gcc actually dislikes your
ec90a194a"rcu:
Create asynchronize_rcu_mult()" commit ;)rcu/sync.cwas just lucky enough to trigger the problem.I'll try to make the fix today...
Mark, Guenter, any chance you can check if the patch below helps? It does on x86.
Works for c6x.
Quoted 30 lines
Oleg.
include/linux/rcupdate.h +3
-6@@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n,call_rcu_func_t *crcu_array, struct rcu_synchronize *rs_array);#define _wait_rcu_gp (checktiny, ...) \ -do { \ - call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ - const int __n = ARRAY_SIZE(__crcu_array); \ - struct rcu_synchronize __rs_array[__n]; \ - \ - __wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \ +do { \ +call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ +struct rcu_synchronize __rs_array[ARRAY_SIZE (__crcu_array)];\
include/linux/rcupdate.h +1
-0+ __wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array),\
include/linux/rcupdate.h +1
-0+ __crcu_array, __rs_array);\
} while (0)#define
wait_rcu_gp(...)_wait_rcu_gp(false, __VA_ARGS__)
PATCH 1/1 rcu: change _wait_rcu_gp() to work around gcc 67055 bug
In reply to Guenter RoeckThe code like
const int n = const-expr; whatever_t array[n];
in inline function can confuse gcc, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67055#c13
This leads to
In file included from include/linux/rcupdate.h:429:0,
from include/linux/rcusync.h:5,
from kernel/rcu/sync.c:1:
include/linux/rcutiny.h: In function 'rcu_barrier_sched':
include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline void rcu_barrier_sched(void)
build failure after ec90a194a "rcu: Create a synchronize_rcu_mult()" and 114b7fd4b "rcu: Create rcu_sync infrastructure" meet each other.
--- include/linux/rcupdate.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
include/linux/rcupdate.h +5 -6
@@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array, struct rcu_synchronize *rs_array);#define _wait_rcu_gp (checktiny, ...) \ -do { \ - call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ - const int __n = ARRAY_SIZE(__crcu_array); \ - struct rcu_synchronize __rs_array[__n]; \ - \ - __wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \ +do { \ + call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ + struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)]; \ + __wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array), \ + __crcu_array, __rs_array); \ } while (0)#define wait_rcu_gp (...) _wait_rcu_gp(false, __VA_ARGS__)
Signature · 1 line
2.4.3
Re: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug
Quoted 19 lines · Oleg Nesterov
The code like
const int n = const-expr; whatever_t array[n];in inline function can confuse gcc, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67055#c13This leads to
In file included from
include/linux/rcupdate.h:429:0,
frominclude/linux/rcusync.h:5,
fromkernel/rcu/sync.c:1:
include/linux/rcutiny.h: In function 'rcu_barrier_sched':
include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline voidrcu_barrier_sched(void)
Quoted 6 lines
build failure after
ec90a194a"rcu: Create asynchronize_rcu_mult()" and114b7fd4b"rcu: Creatercu_syncinfrastructure" meet each other.Reported-and-tested-by Mark Salter <[email protected]>Reported-by Guenter Roeck <[email protected]>Signed-off-by Oleg Nesterov <[email protected]>
Ouch!!! Queued for testing, in the absence of problems, will push into the upcoming merge window.
Thank you all for the testing and the fix!
Thanx, Paul
Quoted 30 lines
--- include/linux/rcupdate.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)include/linux/rcupdate.h +5
-6@@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array, struct rcu_synchronize *rs_array);#define _wait_rcu_gp (checktiny, ...) \ -do { \ - call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ - const int __n = ARRAY_SIZE(__crcu_array); \ - struct rcu_synchronize __rs_array[__n]; \ - \ - __wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \ +do { \ + call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \ + struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)]; \ + __wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array), \ + __crcu_array, __rs_array); \ } while (0)#define wait_rcu_gp (...) _wait_rcu_gp(false, __VA_ARGS__)Signature · 1 line
2.4.3
Re: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug
In reply to Oleg NesterovQuoted 20 lines · Oleg Nesterov
The code like
const int n = const-expr; whatever_t array[n];in inline function can confuse gcc, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67055#c13This leads to
In file included from
include/linux/rcupdate.h:429:0,
frominclude/linux/rcusync.h:5,
fromkernel/rcu/sync.c:1:
include/linux/rcutiny.h: In function 'rcu_barrier_sched':
include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
static inline voidrcu_barrier_sched(void)
Quoted 2 lines
build failure after
ec90a194a"rcu: Create asynchronize_rcu_mult()" and114b7fd4b"rcu: Creatercu_syncinfrastructure" meet each other.
and just in case... make make kernel/rcu/rcutorture.o fails the same way if CONFIG_RCU_TORTURE_TEST && CONFIG_TINY_RCU. So we need a work- around even before/without rcu_sync.
Oleg.