Re: Bug#759870: gcc-4.9: Compiles zsh endlessly on s390x (maybe sigjmp_buf related)

2014-08-30 Thread Axel Beckert
Control: retitle -1 gcc-4.9: Compiles zsh endlessly with 
-fstack-protector-strong on s390x

Hi,

Matthias Klose wrote:
> if it's just zsh, then it's not serious.

I doubt that it's only zsh.

> Apparently there are some stability issues with some s390 machines,

Looks rather like a regression than stability issues to me. It fails
_always_ with gcc-4.9 and default buildflags on s390x. But works fine
with gcc-4.8:

$ debuild -eCC=gcc-4.8 
-eDEB_BUILD_MAINT_OPTIONS=hardening=-stackprotectorstrong -uc -us -B

(Had to remove stackprotectorstrong as it doesn't seem to be available
with gcc-4.8.)

> CC'ing the s390 porters.

JFTR: I already X-Debbugs-Cc'ed them.

I was able to to reproduce it in a sid chroot of zelenka, too. gcc-4.9
hangs at this position:

[…].0.5-dev-2/obj/Src → gcc -c -I. -I../Src -I../../Src -I../../Src/Zle 
-I../../Src -D_FORTIFY_SOURCE=2 -Q -DHAVE_CONFIG_H -g -O2 
-fstack-protector-strong -Wformat -Werror=format-security -Wall -g -o builtin.o 
../../Src/builtin.c
 gnu_dev_major gnu_dev_minor gnu_dev_makedev read pread pread64 readlink 
readlinkat getcwd getwd confstr getgroups ttyname_r getlogin_r gethostname 
getdomainname getchar fgetc_unlocked getc_unlocked getchar_unlocked putchar 
fputc_unlocked putc_unlocked putchar_unlocked getline feof_unlocked 
ferror_unlocked sprintf vsprintf snprintf vsnprintf fprintf printf vprintf 
vfprintf dprintf vdprintf asprintf __asprintf obstack_printf vasprintf 
obstack_vprintf fgets fread fgets_unlocked fread_unlocked tolower toupper stat 
lstat fstat fstatat mknod mknodat stat64 lstat64 fstat64 fstatat64 
__sigismember __sigaddset __sigdelset atoi atol atoll bsearch atof realpath 
ptsname_r wctomb mbstowcs wcstombs __strcspn_c1 __strcspn_c2 __strcspn_c3 
__strspn_c1 __strspn_c2 __strspn_c3 __strpbrk_c2 __strpbrk_c3 __strtok_r_1c 
__strsep_1c __strsep_2c __strsep_3c memcpy memmove mempcpy memset bcopy bzero 
strcpy stpcpy strncpy stpncpy strcat strncat open open64 openat openat64 btowc 
wctob mbrlen wmemcpy wmemmove wmempcpy wmemset wcscpy wcpcpy wcsncpy wcpncpy 
wcscat wcsncat swprintf vswprintf wprintf fwprintf vwprintf vfwprintf fgetws 
fgetws_unlocked wcrtomb mbsrtowcs wcsrtombs mbsnrtowcs wcsnrtombs 
createbuiltintable printbuiltinnode freebuiltinnode init_builtins new_optarg 
execbuiltin bin_enable bin_set bin_pwd bin_dirs set_pwd_env bin_cd cd_get_dest 
cd_do_chdir cd_able_vars cd_try_chdir cd_new_pwd printdirstack fixdir printqt 
printif bin_fc fcgetcomm fcsubs fclist fcedit getasg typeset_setbase 
typeset_setwidth typeset_single bin_typeset eval_autoload listusermathfunc 
bin_functions mkautofn bin_unset bin_whence bin_hash bin_unhash bin_alias 
bin_true bin_false bin_print bin_shift bin_getopts bin_break checkjobs zexit 
bin_dot eval bin_emulate bin_eval bin_read zread testlex bin_test bin_times 
bin_trap bin_ttyctl bin_let bin_umask bin_notavail
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data>   <*free_inline_summary> 
  
Assembling functions:
 bin_true bin_false testlex bin_enable bin_set listusermathfunc bin_dirs 
bin_unhash fclist bin_unset bin_whence bin_shift bin_let bin_getopts bin_dot 
eval bin_emulate bin_eval bin_times bin_trap bin_umask printbuiltinnode 
bin_ttyctl freebuiltinnode bin_pwd typeset_setwidth.isra.4 
typeset_setbase.isra.5 fcgetcomm bin_fc typeset_single.isra.7 getasg bin_hash 
bin_alias bin_print zread bin_read bin_test createbuiltintable init_builtins 
execbuiltin set_pwd_env cd_able_vars fixdir

As waldi noticed, it suffices to replace -fstack-protector-strong by
-fstack-protector (which was necessary for compiling with gcc-4.8 anyways) and 
it does no more go into the endless loop:

[…].0.5-dev-2/obj/Src → gcc -c -I. -I../Src -I../../Src -I../../Src/Zle 
-I../../Src -D_FORTIFY_SOURCE=2  -DHAVE_CONFIG_H -g -O2 -fstack-protector 
-Wformat -Werror=format-security -Wall -g -o builtin.o ../../Src/builtin.c

HTH

I'll likely use
DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotectorstrong to get zsh
building on s390x again for now, but I still think endless loops like
this one are a bug in the compiler.

With this workaround, I'm also ok with the lowered severity as there
is a workaround which likely also works for other affected packages.

Thanks to waldi for his continued support with regards to this issue!

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-|  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


--
To UNSUBSCRIBE, email to debian-s390-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140830223912.gj7...@sym.noone.org



Bug#759870: gcc-4.9: Compiles zsh endlessly on s390x (maybe sigjmp_buf related)

2014-08-30 Thread Axel Beckert
Package: gcc-4.9
Version: 4.9.1-9
Severity: serious
Affects: src:zsh

Dear GCC Maintainers,

since 2014-08-18 all zsh builds -- sid binNMUs as well as experimental
uploads -- fail on s390x upon the first gcc invocation by being killed
after 150 minutes of inactivity. Previous builds always took less than
15, sometimes just 5 minutes. See

  https://buildd.debian.org/status/logs.php?pkg=zsh&arch=s390x

One example:

  make[3]: Entering directory '/«PKGBUILDDIR»/obj/Src'
  gcc -c -I. -I../Src -I../../Src -I../../Src/Zle -I../../Src 
-D_FORTIFY_SOURCE=2  -DHAVE_CONFIG_H -g -O2 -fstack-protector-strong -Wformat 
-Werror=format-security -Wall -g  -o builtin.o ../../Src/builtin.c
  E: Caught signal ‘Terminated’: terminating immediately
  make[3]: *** [builtin.o] Terminated
  make[2]: *** [modobjs] Terminated
  make[1]: *** [all] Terminated
  make: *** [build-arch] Terminated
  Makemod:231: recipe for target 'builtin.o' failed
  Makefile:451: recipe for target 'modobjs' failed
  Makefile:189: recipe for target 'all' failed
  debian/rules:48: recipe for target 'build-arch' failed
  Build killed with signal TERM after 150 minutes of inactivity

Waldi suspects some breakage related to the sigjmp_buf ABI issue. At
least zsh uses sigjmp_buf. Waldi also said on IRC he can reproduce the
issue.

 Kind regards, Axel


--
To UNSUBSCRIBE, email to debian-s390-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/878um5n44c@c-cactus.deuxchevaux.org