[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/29401] New: Hang when compiling large printf() file (from glibc
From: |
sam at gentoo dot org |
Subject: |
[Bug gas/29401] New: Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3 |
Date: |
Mon, 25 Jul 2022 01:18:21 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29401
Bug ID: 29401
Summary: Hang when compiling large printf() file (from glibc's
tst-printf-bz18872) on HPPA with -ggdb3
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: sam at gentoo dot org
Target Milestone: ---
Created attachment 14228
--> https://sourceware.org/bugzilla/attachment.cgi?id=14228&action=edit
tst-printf-bz18872.c
Dumped my initial thoughts at https://bugs.gentoo.org/860819 when found this.
The hang only occurs on a native compiler so far (not cross). Happy to give
access to a machine used for Gentoo testing to aid debugging. Requires -ggdb3
at least, possibly other debugging levels too.
Compiles quickly without -ggdb3 (e.g. hppa2.0-unknown-linux-gnu-gcc -pipe
-march=2.0 -fdiagnostics-show-option -O2 -Wl,-O1 -Wl,--as-needed foo.c).
Noticed when building glibc's test suite on hppa2.0-unknown-linux-gnu and
compilation hanged on:
```
hppa2.0-unknown-linux-gnu-gcc -pipe -march=2.0 -fdiagnostics-show-option
-ggdb3 -O2 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
/var/tmp/portage/sys-libs/glibc-9999/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common/tst-printf-bz18872.c
-c -std=gnu11 -fgnu89-inline -pipe -march=2.0 -fdiagnostics-show-option -ggdb3
-O2 -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math
-fno-stack-protector -fno-common -Wstrict-prototypes -Wold-style-definition
-fmath-errno -fno-pie -U_FORTIFY_SOURCE -I../include
-I/var/tmp/portage/sys-libs/glibc-9999/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common
-I/var/tmp/portage/sys-libs/glibc-9999/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl
-I../sysdeps/unix/sysv/linux/hppa -I../sysdeps/hppa/nptl
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux
-I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/hppa/hppa1.1 -I../sysdeps/wordsize-32
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/hppa/fpu
-I../sysdeps/hppa -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio
-I. -nostdinc -isystem /usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.3.0/include
-isystem /usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.3.0/include-fixed -isystem
/usr/include -D_LIBC_REENTRANT -include
/var/tmp/portage/sys-libs/glibc-9999/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/libc-modules.h
-DMODULE_NAME=testsuite -include ../include/libc-symbols.h -DPIC
-DTOP_NAMESPACE=glibc -D_IO_MTSAFE_IO -o
/var/tmp/portage/sys-libs/glibc-9999/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common/tst-printf-bz18872.o
-MD -MP -MF
/var/tmp/portage/sys-libs/glibc-9999/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common/tst-printf-bz18872.o.dt
-MT
/var/tmp/portage/sys-libs/glibc-9999/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common/tst-printf-bz18872.o
```
As far as I can tell, GCC invokes `as` and then it hangs indefinitely.
I can reproduce this outside of glibc's test suite with the attached file:
```
$ hppa2.0-unknown-linux-gnu-gcc -pipe -march=2.0 -g -O2 -Wl,-O1 -Wl,--as-needed
foo.c -v
Using built-in specs.
COLLECT_GCC=hppa2.0-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/hppa2.0-unknown-linux-gnu/11.2.1/lto-wrapper
Target: hppa2.0-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/configure
--host=hppa2.0-unknown-linux-gnu --build=hppa2.0-unknown-linux-gnu
--prefix=/usr --bindir=/usr/hppa2.0-unknown-linux-gnu/gcc-bin/11.2.1
--includedir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/include
--datadir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/11.2.1
--mandir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/11.2.1/man
--infodir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/11.2.1/info
--with-gxx-include-dir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/include/g++-v11
--with-python-dir=/share/gcc-data/hppa2.0-unknown-linux-gnu/11.2.1/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo
11.2.1_p20220115 p4' --disable-esp --enable-libstdcxx-time
--disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib
--disable-fixed-point --enable-libgomp --disable-libssp --disable-libada
--disable-cet --disable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --without-zstd --enable-lto
--without-isl --disable-libsanitizer --enable-default-pie --disable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.1 20220115 (Gentoo 11.2.1_p20220115 p4)
COLLECT_GCC_OPTIONS='-pipe' '-march=2.0' '-g' '-O2' '-v' '-dumpdir' 'a-'
/usr/libexec/gcc/hppa2.0-unknown-linux-gnu/11.2.1/cc1 -quiet -v foo.c -quiet
-dumpdir a- -dumpbase foo.c -dumpbase-ext .c -march=2.0 -g -O2 -version -o - |
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/../../../../hppa2.0-unknown-linux-gnu/bin/as
-v -o /tmp/cc55yIsl.o
GNU assembler version 2.37 (hppa2.0-unknown-linux-gnu) using BFD version
(Gentoo 2.37_p1 p2) 2.37
GNU C17 (Gentoo 11.2.1_p20220115 p4) version 11.2.1 20220115
(hppa2.0-unknown-linux-gnu)
compiled by GNU C version 11.2.1 20220115, GMP version 6.2.1, MPFR
version 4.1.0-p13, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/../../../../hppa2.0-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/include
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/include-fixed
/usr/include
End of search list.
GNU C17 (Gentoo 11.2.1_p20220115 p4) version 11.2.1 20220115
(hppa2.0-unknown-linux-gnu)
compiled by GNU C version 11.2.1 20220115, GMP version 6.2.1, MPFR
version 4.1.0-p13, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3ab426cd01445a24f61f58c0075b5617
```
It hangs at the end invoking `as`.
Partial `ps fx -g 22567` output (excluded random bash bits):
```
22453 pts/5 Ss 0:00 \_ -/bin/bash
22567 pts/5 S+ 0:00 | \_ hppa2.0-unknown-linux-gnu-gcc -pipe
-march=2.0 -g -O2 -Wl,-O1 -Wl,--as-needed foo.c -v
22568 pts/5 R+ 11:04 | \_
/usr/libexec/gcc/hppa2.0-unknown-linux-gnu/11.2.1/cc1 -quiet -v foo.c -quiet
-dumpdir a- -dumpbase foo.c -dumpbase-ext .c -march=2.0 -g -O2 -version -o -
22569 pts/5 S+ 0:00 | \_
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/../../../../hppa2.0-unknown-linux-gnu/bin/as
-v -o /tmp/cc55yIsl.o
```
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/29401] New: Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3,
sam at gentoo dot org <=
- [Bug gas/29401] Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, sam at gentoo dot org, 2022/07/24
- [Bug gas/29401] Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, sam at gentoo dot org, 2022/07/24
- [Bug gas/29401] Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, sam at gentoo dot org, 2022/07/24
- [Bug gas/29401] Hang in `as` when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, sam at gentoo dot org, 2022/07/24
- [Bug gas/29401] Hang in `as` when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, amodra at gmail dot com, 2022/07/24
- [Bug gas/29401] Hang in `as` when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, sam at gentoo dot org, 2022/07/24
- [Bug gas/29401] Hang in `as` when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, sam at gentoo dot org, 2022/07/24
- [Bug gas/29401] Hang in `as` when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, amodra at gmail dot com, 2022/07/24
- [Bug gas/29401] Hang in `as` when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, sam at gentoo dot org, 2022/07/24
- [Bug gas/29401] Hang in `as` when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3, sam at gentoo dot org, 2022/07/24