This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building on gcc112 is stuck in msgfmt


On 08/28/2017 09:15 PM, Martin Liška wrote:
> On 08/28/2017 04:06 PM, Jeff Law wrote:
>> On 08/28/2017 01:16 AM, Martin Liška wrote:
>>> Hello.
>>>
>>> I've just repeatedly seen stuck in build process:
>>>
>>> make[5]: Entering directory `/home/marxin/Programming/gcc/objdir/powerpc64le-unknown-linux-gnu/libstdc++-v3/po'
>>> msgfmt -o de.mo ../../../../libstdc++-v3/po/de.po
>>>
>>> 49        __asm volatile ("sc; mfcr %0"
>>> Missing separate debuginfos, use: debuginfo-install gettext-0.18.2.1-4.el7.ppc64le
>>> (gdb) bt
>>> #0  0x00003fff85d8bac8 in sys_futex0 (val=-1, op=128, addr=0x3fff85db0520 <acc_device_lock>) at ../../../libgomp/config/linux/powerpc/futex.h:49
>>> #1  futex_wait (val=-1, addr=0x3fff85db0520 <acc_device_lock>) at ../../../libgomp/config/linux/powerpc/futex.h:62
>>> #2  do_wait (val=-1, addr=<optimized out>) at ../../../libgomp/config/linux/wait.h:67
>>> #3  gomp_mutex_lock_slow (mutex=0x3fff85db0520 <acc_device_lock>, oldval=<optimized out>) at ../../../libgomp/config/linux/mutex.c:63
>>> #4  0x00003fff85d98b04 in gomp_mutex_lock (mutex=0x3fff85db0520 <acc_device_lock>) at ../../../libgomp/config/linux/mutex.h:57
>>> #5  goacc_register (disp=0x3fff85db0090 <host_dispatch>) at ../../../libgomp/oacc-init.c:74
>>> #6  0x00003fff85d983fc in goacc_host_init () at ../../../libgomp/oacc-host.c:265
>>> #7  0x00003fff85d99c88 in goacc_runtime_initialize () at ../../../libgomp/oacc-init.c:657
>>> #8  0x00003fff85d7882c in initialize_env () at ../../../libgomp/env.c:1340
>>> #9  0x00003fff86525c74 in _dl_init_internal () from /lib64/ld64.so.2
>>> #10 0x00003fff865119cc in _dl_start_user () from /lib64/ld64.so.2
>>>
>>> $ msgfmt --version
>>> msgfmt (GNU gettext-tools) 0.18.2
>>>
>>> Is it a known issue, has anybody spotted that as well?
>> Yea, my ppc64le builds from late last week are stumbling on this as
>> well.  Could well be an environment thing -- if I go into
>> <targdir>/libstdc++-v3/po and "make", it works just fine.
> 
> I did the same with the same result. Note that I can see the same problem
> on gcc110 machine :/
> 
> Martin
> 
>>
>> jeff
>>
> 

Hi.

So I've just tried to build latest 0.19.8 and it behaves the same. There's strace:

[pid 21880] set_tid_address(0x3fff80718f30) = 21880
[pid 21880] set_robust_list(0x3fff80718f40, 24) = 0
[pid 21880] rt_sigaction(SIGRTMIN, {0x3fff7fef6670, [], SA_SIGINFO}, NULL, 8) = 0
[pid 21880] rt_sigaction(SIGRT_1, {0x3fff7fef6770, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
[pid 21880] rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
[pid 21880] getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
[pid 21880] openat(AT_FDCWD, "/sys/devices/system/cpu", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
[pid 21880] brk(0)                      = 0x1001ad60000
[pid 21880] brk(0x1001ad90000)          = 0x1001ad90000
[pid 21880] getdents(3, /* 177 entries */, 32768) = 5576
[pid 21880] getdents(3, /* 0 entries */, 32768) = 0
[pid 21880] close(3)                    = 0
[pid 21880] sched_getaffinity(21880, 24, {ffffffffffffffff, ffffffffffffffff, ffffffff}) = 24
[pid 21880] futex(0x3fff7ff70520, FUTEX_WAIT_PRIVATE, -1, NULLProcess 20859 detached

Compared to situation when one directly invokes the command:

sched_getaffinity(23878, 24, {ffffffffffffffff, ffffffffffffffff, ffffffff}) = 24
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=109675168, ...}) = 0
mmap(NULL, 109675168, PROT_READ, MAP_PRIVATE, 3, 0) = 0x3fff9a7b0000
close(3)                                = 0
open("../../../../libstdc++-v3/po/de.po", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=749, ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fffa1c00000
read(3, "# Translations needed for GNU C++ library locale implementation.\n# Copyright (C) 2001-2017 Free Software Foundation, Inc.\n# Benjamin Kosnik <bkoz@redhat.com>, 2001.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: libstdc++ 3.1.0\\n\"\n\"POT-Creation-Date: 2001-07-31 08:49-0700\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=ISO-8859-1\\n\"\n\"Content-Transfer-Encoding: 8-"..., 65536) = 749
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=26254, ...}) = 0
mmap(NULL, 26254, PROT_READ, MAP_SHARED, 4, 0) = 0x3fff9a7a0000
close(4)                                = 0
futex(0x3fffa16b25a0, FUTEX_WAKE_PRIVATE, 2147483647) = 0

Looks it uses different invocation of futex syscall. In order to have it working I needed to configure gettext w/ --disable-openmp.
Note that the former invocation of msgfmt contains just a single futex syscall, so should not be blocked by anything else.

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]