Bug 1567112 - Program generated with LTO optimisation crashes
Summary: Program generated with LTO optimisation crashes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-13 12:55 UTC by Tomasz Kłoczko
Modified: 2018-09-23 12:00 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-23 12:00:24 UTC
Type: Bug


Attachments (Terms of Use)

Description Tomasz Kłoczko 2018-04-13 12:55:44 UTC
I found some strange effect that zabbix 3.4.8 optimised using LTO crashes. The same zabbix compiled and linked without LTO runs correctly.

I've been trying to trace cause of this crash:


# gdb /usr/sbin/zabbix_agentd 
gdb: warning: error finding working directory: No such file or directory
GNU gdb (GDB) Fedora 8.1-14.fc29
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/zabbix_agentd...Reading symbols from /usr/lib/debug/usr/sbin/zabbix_agentd-3.4.8-1.fc29.x86_64.debug...done.
done.
(gdb) set follow-fork-mode child
(gdb) r
Starting program: /usr/sbin/zabbix_agentd 
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Segmentation fault (core dumped)
[root@domek a]# 
[root@domek 1]# gdb /usr/sbin/zabbix_agentd 
GNU gdb (GDB) Fedora 8.1-14.fc29
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/zabbix_agentd...Reading symbols from /usr/lib/debug/usr/sbin/zabbix_agentd-3.4.8-1.fc29.x86_64.debug...done.
done.
(gdb) set follow-fork-mode child
(gdb) r
Starting program: /usr/sbin/zabbix_agentd 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New process 7815]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New process 7816]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New process 7817]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Thread 4.1 "zabbix_agentd" received signal SIGTERM, Terminated.
[Switching to Thread 0x7ffff7fc7c80 (LWP 7817)]
0x00007ffff7adea64 in __GI___nanosleep (requested_time=0x7fffffffd170, remaining=0x7fffffffd170) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
28	  return SYSCALL_CANCEL (nanosleep, requested_time, remaining);
(gdb) bt
#0  0x00007ffff7adea64 in __GI___nanosleep (requested_time=0x7fffffffd170, remaining=0x7fffffffd170) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x00007ffff7ade96a in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#2  0x0000555555575854 in collector_thread (args=0x0, args@entry=0x5555557a79c0) at ../../../src/zabbix_agent/stats.c:479
#3  0x00005555555844be in zbx_thread_start (handler=<optimized out>, thread_args=<optimized out>, handler=<optimized out>, thread_args=<optimized out>)
    at ../../../../src/libs/zbxsys/threads.c:128
#4  0x0000555555573f75 in MAIN_ZABBIX_ENTRY (flags=<optimized out>) at ../../../src/zabbix_agent/zabbix_agentd.c:990
#5  0x000055555555b642 in daemon_start (flags=0, user=<optimized out>, allow_root=<optimized out>) at ../../../../src/libs/zbxnix/daemon.c:392
#6  main (argc=<optimized out>, argv=0x5555557a1920) at ../../../src/zabbix_agent/zabbix_agentd.c:1241

Strange thing that I'm not able even to inspect parameters passed to the functions as long as you see in back trace they've been marked as <optimized out>

Will be happy for any suggestions to be able trace this issue.

Comment 1 Tomasz Kłoczko 2018-04-13 13:03:30 UTC
Zabbix has some internal diagnostics code and it leaves some log entries in the logs

  7816:20180413:135026.028 Starting Zabbix Agent [domek]. Zabbix 3.4.8 (revision 79252).
  7816:20180413:135026.029 **** Enabled features ****
  7816:20180413:135026.029 IPv6 support:          YES
  7816:20180413:135026.029 TLS support:           YES
  7816:20180413:135026.029 **************************
  7816:20180413:135026.029 using configuration file: /etc/zabbix/zabbix_agentd.conf
  7816:20180413:135026.029 agent #0 started [main process]
  7818:20180413:135026.030 agent #2 started [active checks #1]
  7817:20180413:135026.030 agent #1 started [collector]
  7818:20180413:135027.975 active check "vm.memory.size[available]" is not supported: Unknown error.
  7818:20180413:135028.752 Got signal [signal:11(SIGSEGV),reason:1,refaddr:
]. Crashing ...
  7818:20180413:135028.753 ====== Fatal information: ======
  7818:20180413:135028.753 Program counter: 0x7ffff7ae92a0
  7818:20180413:135028.753 === Registers: ===
  7818:20180413:135028.753 r8      =             10d6 =                 4310 =                 4310
  7818:20180413:135028.753 r9      =                0 =                    0 =                    0
  7818:20180413:135028.753 r10     =               10 =                   16 =                   16
  7818:20180413:135028.753 r11     = ffffffffffffff98 = 18446744073709551512 =                 -104
  7818:20180413:135028.753 r12     =               10 =                   16 =                   16
  7818:20180413:135028.753 r13     =     7fffffffc4b0 =      140737488340144 =      140737488340144
  7818:20180413:135028.753 r14     =               10 =                   16 =                   16
  7818:20180413:135028.753 r15     =                0 =                    0 =                    0
  7818:20180413:135028.753 rdi     =     7fffffffc4b0 =      140737488340144 =      140737488340144
  7818:20180413:135028.753 rsi     =               7a =                  122 =                  122
  7818:20180413:135028.753 rbp     =                0 =                    0 =                    0
  7818:20180413:135028.753 rbx     =     7fffffffc4b0 =      140737488340144 =      140737488340144
  7818:20180413:135028.753 rdx     =               7a =                  122 =                  122
  7818:20180413:135028.753 rax     =                0 =                    0 =                    0
  7818:20180413:135028.753 rcx     =                0 =                    0 =                    0
  7818:20180413:135028.753 rsp     =     7fffffffc318 =      140737488339736 =      140737488339736
  7818:20180413:135028.753 rip     =     7ffff7ae92a0 =      140737348801184 =      140737348801184
  7818:20180413:135028.753 efl     =            10202 =                66050 =                66050
  7818:20180413:135028.753 csgsfs  =   2b000000000033 =    12103423998558259 =    12103423998558259
  7818:20180413:135028.753 err     =                4 =                    4 =                    4
  7818:20180413:135028.754 trapno  =                e =                   14 =                   14
  7818:20180413:135028.754 oldmask =                0 =                    0 =                    0
  7818:20180413:135028.754 cr2     =             1150 =                 4432 =                 4432
  7818:20180413:135028.754 === Backtrace: ===
  7818:20180413:135028.755 14: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](+0x35628) [0x555555589628]
  7818:20180413:135028.755 13: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](+0x359ba) [0x5555555899ba]
  7818:20180413:135028.755 12: /lib64/libc.so.6(+0x37000) [0x7ffff7a4f000]
  7818:20180413:135028.755 11: /lib64/libc.so.6(+0xd12a0) [0x7ffff7ae92a0]
  7818:20180413:135028.755 10: /lib64/libc.so.6(+0xd4c58) [0x7ffff7aecc58]
  7818:20180413:135028.755 9: /lib64/libc.so.6(+0xd9239) [0x7ffff7af1239]
  7818:20180413:135028.755 8: /lib64/libc.so.6(regexec+0xb7) [0x7ffff7af7267]
  7818:20180413:135028.755 7: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](+0x178e7) [0x55555556b8e7]
  7818:20180413:135028.755 6: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](+0x1916b) [0x55555556d16b]
  7818:20180413:135028.755 5: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](+0x1d070) [0x555555571070]
  7818:20180413:135028.755 4: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](+0x304be) [0x5555555844be]
  7818:20180413:135028.755 3: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](+0x1fec7) [0x555555573ec7]
  7818:20180413:135028.755 2: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](main+0x862) [0x55555555b642]
  7818:20180413:135028.755 1: /lib64/libc.so.6(__libc_start_main+0xeb) [0x7ffff7a3b1eb]
  7818:20180413:135028.755 0: /usr/sbin/zabbix_agentd: active checks #1 [processing active checks](_start+0x2a) [0x55555555b8aa]
  7818:20180413:135028.755 === Memory map: ===
  7818:20180413:135028.755 555555554000-55555559d000 r-xp 00000000 00:27 315649                     /usr/sbin/zabbix_agentd
  7818:20180413:135028.756 55555579d000-55555579e000 r--p 00049000 00:27 315649                     /usr/sbin/zabbix_agentd
  7818:20180413:135028.756 55555579e000-55555579f000 rw-p 0004a000 00:27 315649                     /usr/sbin/zabbix_agentd
  7818:20180413:135028.756 55555579f000-5555557c2000 rw-p 00000000 00:00 0                          [heap]
  7818:20180413:135028.756 5555557c2000-55555581a000 rw-p 00000000 00:00 0                          [heap]
  7818:20180413:135028.756 7ffff332f000-7ffff3346000 r-xp 00000000 00:27 258979                     /usr/lib64/libgcc_s-8-20180410.so.1
  7818:20180413:135028.756 7ffff3346000-7ffff3545000 ---p 00017000 00:27 258979                     /usr/lib64/libgcc_s-8-20180410.so.1
  7818:20180413:135028.756 7ffff3545000-7ffff3546000 r--p 00016000 00:27 258979                     /usr/lib64/libgcc_s-8-20180410.so.1
  7818:20180413:135028.756 7ffff3546000-7ffff3547000 rw-p 00017000 00:27 258979                     /usr/lib64/libgcc_s-8-20180410.so.1
  7818:20180413:135028.756 7ffff3547000-7ffff354b000 r-xp 00000000 00:27 60781                      /usr/lib64/libcap.so.2.25
  7818:20180413:135028.756 7ffff354b000-7ffff374a000 ---p 00004000 00:27 60781                      /usr/lib64/libcap.so.2.25
  7818:20180413:135028.756 7ffff374a000-7ffff374b000 r--p 00003000 00:27 60781                      /usr/lib64/libcap.so.2.25
  7818:20180413:135028.756 7ffff374b000-7ffff374c000 rw-p 00004000 00:27 60781                      /usr/lib64/libcap.so.2.25
  7818:20180413:135028.756 7ffff374c000-7ffff3798000 r-xp 00000000 00:27 66909                      /usr/lib64/libnss_systemd.so.2
  7818:20180413:135028.756 7ffff3798000-7ffff3997000 ---p 0004c000 00:27 66909                      /usr/lib64/libnss_systemd.so.2
  7818:20180413:135028.756 7ffff3997000-7ffff399a000 r--p 0004b000 00:27 66909                      /usr/lib64/libnss_systemd.so.2
  7818:20180413:135028.756 7ffff399a000-7ffff399b000 rw-p 0004e000 00:27 66909                      /usr/lib64/libnss_systemd.so.2
  7818:20180413:135028.756 7ffff399b000-7ffff399c000 rw-p 00000000 00:00 0 
  7818:20180413:135028.756 7ffff399c000-7ffff39a7000 r-xp 00000000 00:27 258419                     /usr/lib64/libnss_files-2.27.9000.so
  7818:20180413:135028.756 7ffff39a7000-7ffff3ba6000 ---p 0000b000 00:27 258419                     /usr/lib64/libnss_files-2.27.9000.so
  7818:20180413:135028.756 7ffff3ba6000-7ffff3ba7000 r--p 0000a000 00:27 258419                     /usr/lib64/libnss_files-2.27.9000.so
  7818:20180413:135028.756 7ffff3ba7000-7ffff3ba8000 rw-p 0000b000 00:27 258419                     /usr/lib64/libnss_files-2.27.9000.so
  7818:20180413:135028.756 7ffff3ba8000-7ffff3bae000 rw-p 00000000 00:00 0 
  7818:20180413:135028.757 7ffff3bae000-7ffff3c2d000 r-xp 00000000 00:27 59877                      /usr/lib64/libpcre2-8.so.0.7.0
  7818:20180413:135028.757 7ffff3c2d000-7ffff3e2c000 ---p 0007f000 00:27 59877                      /usr/lib64/libpcre2-8.so.0.7.0
  7818:20180413:135028.757 7ffff3e2c000-7ffff3e2d000 r--p 0007e000 00:27 59877                      /usr/lib64/libpcre2-8.so.0.7.0
  7818:20180413:135028.757 7ffff3e2d000-7ffff3e2e000 rw-p 0007f000 00:27 59877                      /usr/lib64/libpcre2-8.so.0.7.0
  7818:20180413:135028.757 7ffff3e2e000-7ffff3e54000 r-xp 00000000 00:27 59888                      /usr/lib64/libselinux.so.1
  7818:20180413:135028.757 7ffff3e54000-7ffff4053000 ---p 00026000 00:27 59888                      /usr/lib64/libselinux.so.1
  7818:20180413:135028.757 7ffff4053000-7ffff4054000 r--p 00025000 00:27 59888                      /usr/lib64/libselinux.so.1
  7818:20180413:135028.757 7ffff4054000-7ffff4055000 rw-p 00026000 00:27 59888                      /usr/lib64/libselinux.so.1
  7818:20180413:135028.757 7ffff4055000-7ffff4057000 rw-p 00000000 00:00 0 
  7818:20180413:135028.757 7ffff4057000-7ffff405a000 r-xp 00000000 00:27 60864                      /usr/lib64/libkeyutils.so.1.6
  7818:20180413:135028.757 7ffff405a000-7ffff4259000 ---p 00003000 00:27 60864                      /usr/lib64/libkeyutils.so.1.6
  7818:20180413:135028.757 7ffff4259000-7ffff425a000 r--p 00002000 00:27 60864                      /usr/lib64/libkeyutils.so.1.6
  7818:20180413:135028.757 7ffff425a000-7ffff425b000 rw-p 00000000 00:00 0 
  7818:20180413:135028.757 7ffff425b000-7ffff4269000 r-xp 00000000 00:27 259036                     /usr/lib64/libkrb5support.so.0.1
  7818:20180413:135028.757 7ffff4269000-7ffff4468000 ---p 0000e000 00:27 259036                     /usr/lib64/libkrb5support.so.0.1
  7818:20180413:135028.757 7ffff4468000-7ffff4469000 r--p 0000d000 00:27 259036                     /usr/lib64/libkrb5support.so.0.1
  7818:20180413:135028.757 7ffff4469000-7ffff446a000 rw-p 0000e000 00:27 259036                     /usr/lib64/libkrb5support.so.0.1
  7818:20180413:135028.757 7ffff446a000-7ffff4471000 r-xp 00000000 00:27 258425                     /usr/lib64/librt-2.27.9000.so
  7818:20180413:135028.757 7ffff4471000-7ffff4670000 ---p 00007000 00:27 258425                     /usr/lib64/librt-2.27.9000.so
  7818:20180413:135028.757 7ffff4670000-7ffff4671000 r--p 00006000 00:27 258425                     /usr/lib64/librt-2.27.9000.so
  7818:20180413:135028.757 7ffff4671000-7ffff4672000 rw-p 00007000 00:27 258425                     /usr/lib64/librt-2.27.9000.so
  7818:20180413:135028.757 7ffff4672000-7ffff47ee000 r-xp 00000000 00:27 63070                      /usr/lib64/libunistring.so.2.1.0
  7818:20180413:135028.757 7ffff47ee000-7ffff49ed000 ---p 0017c000 00:27 63070                      /usr/lib64/libunistring.so.2.1.0
  7818:20180413:135028.758 7ffff49ed000-7ffff49f1000 r--p 0017b000 00:27 63070                      /usr/lib64/libunistring.so.2.1.0
  7818:20180413:135028.758 7ffff49f1000-7ffff49f2000 rw-p 0017f000 00:27 63070                      /usr/lib64/libunistring.so.2.1.0
  7818:20180413:135028.758 7ffff49f2000-7ffff4a12000 r-xp 00000000 00:27 60796                      /usr/lib64/libcrypt.so.1.1.0
  7818:20180413:135028.758 7ffff4a12000-7ffff4c11000 ---p 00020000 00:27 60796                      /usr/lib64/libcrypt.so.1.1.0
  7818:20180413:135028.758 7ffff4c11000-7ffff4c12000 r--p 0001f000 00:27 60796                      /usr/lib64/libcrypt.so.1.1.0
  7818:20180413:135028.758 7ffff4c12000-7ffff4c1b000 rw-p 00000000 00:00 0 
  7818:20180413:135028.758 7ffff4c1b000-7ffff4c1e000 r-xp 00000000 00:27 259009                     /usr/lib64/libcom_err.so.2.1
  7818:20180413:135028.758 7ffff4c1e000-7ffff4e1d000 ---p 00003000 00:27 259009                     /usr/lib64/libcom_err.so.2.1
  7818:20180413:135028.758 7ffff4e1d000-7ffff4e1e000 r--p 00002000 00:27 259009                     /usr/lib64/libcom_err.so.2.1
  7818:20180413:135028.758 7ffff4e1e000-7ffff4e1f000 rw-p 00003000 00:27 259009                     /usr/lib64/libcom_err.so.2.1
  7818:20180413:135028.758 7ffff4e1f000-7ffff4e50000 r-xp 00000000 00:27 259028                     /usr/lib64/libk5crypto.so.3.1
  7818:20180413:135028.758 7ffff4e50000-7ffff504f000 ---p 00031000 00:27 259028                     /usr/lib64/libk5crypto.so.3.1
  7818:20180413:135028.758 7ffff504f000-7ffff5051000 r--p 00030000 00:27 259028                     /usr/lib64/libk5crypto.so.3.1
  7818:20180413:135028.758 7ffff5051000-7ffff5052000 rw-p 00032000 00:27 259028                     /usr/lib64/libk5crypto.so.3.1
  7818:20180413:135028.758 7ffff5052000-7ffff512e000 r-xp 00000000 00:27 259034                     /usr/lib64/libkrb5.so.3.3
  7818:20180413:135028.758 7ffff512e000-7ffff532e000 ---p 000dc000 00:27 259034                     /usr/lib64/libkrb5.so.3.3
  7818:20180413:135028.758 7ffff532e000-7ffff533d000 r--p 000dc000 00:27 259034                     /usr/lib64/libkrb5.so.3.3
  7818:20180413:135028.758 7ffff533d000-7ffff533f000 rw-p 000eb000 00:27 259034                     /usr/lib64/libkrb5.so.3.3
  7818:20180413:135028.758 7ffff533f000-7ffff538b000 r-xp 00000000 00:27 259024                     /usr/lib64/libgssapi_krb5.so.2.2
  7818:20180413:135028.758 7ffff538b000-7ffff558b000 ---p 0004c000 00:27 259024                     /usr/lib64/libgssapi_krb5.so.2.2
  7818:20180413:135028.758 7ffff558b000-7ffff558d000 r--p 0004c000 00:27 259024                     /usr/lib64/libgssapi_krb5.so.2.2
  7818:20180413:135028.759 7ffff558d000-7ffff558e000 rw-p 0004e000 00:27 259024                     /usr/lib64/libgssapi_krb5.so.2.2
  7818:20180413:135028.759 7ffff558e000-7ffff559d000 r-xp 00000000 00:27 63516                      /usr/lib64/libpsl.so.5.3.0
  7818:20180413:135028.759 7ffff559d000-7ffff579c000 ---p 0000f000 00:27 63516                      /usr/lib64/libpsl.so.5.3.0
  7818:20180413:135028.759 7ffff579c000-7ffff579d000 r--p 0000e000 00:27 63516                      /usr/lib64/libpsl.so.5.3.0
  7818:20180413:135028.759 7ffff579d000-7ffff579e000 rw-p 00000000 00:00 0 
  7818:20180413:135028.759 7ffff579e000-7ffff580d000 r-xp 00000000 00:27 73919                      /usr/lib64/libssh.so.4.4.2
  7818:20180413:135028.759 7ffff580d000-7ffff5a0c000 ---p 0006f000 00:27 73919                      /usr/lib64/libssh.so.4.4.2
  7818:20180413:135028.759 7ffff5a0c000-7ffff5a0e000 r--p 0006e000 00:27 73919                      /usr/lib64/libssh.so.4.4.2
  7818:20180413:135028.759 7ffff5a0e000-7ffff5a0f000 rw-p 00070000 00:27 73919                      /usr/lib64/libssh.so.4.4.2
  7818:20180413:135028.759 7ffff5a0f000-7ffff5a2b000 r-xp 00000000 00:27 63078                      /usr/lib64/libidn2.so.0.3.3
  7818:20180413:135028.759 7ffff5a2b000-7ffff5c2a000 ---p 0001c000 00:27 63078                      /usr/lib64/libidn2.so.0.3.3
  7818:20180413:135028.759 7ffff5c2a000-7ffff5c2b000 r--p 0001b000 00:27 63078                      /usr/lib64/libidn2.so.0.3.3
  7818:20180413:135028.759 7ffff5c2b000-7ffff5c2c000 rw-p 00000000 00:00 0 
  7818:20180413:135028.759 7ffff5c2c000-7ffff5c4f000 r-xp 00000000 00:27 65746                      /usr/lib64/libnghttp2.so.14.16.0
  7818:20180413:135028.759 7ffff5c4f000-7ffff5e4f000 ---p 00023000 00:27 65746                      /usr/lib64/libnghttp2.so.14.16.0
  7818:20180413:135028.759 7ffff5e4f000-7ffff5e50000 r--p 00023000 00:27 65746                      /usr/lib64/libnghttp2.so.14.16.0
  7818:20180413:135028.759 7ffff5e50000-7ffff5e52000 rw-p 00024000 00:27 65746                      /usr/lib64/libnghttp2.so.14.16.0
  7818:20180413:135028.759 7ffff5e52000-7ffff5e6e000 r-xp 00000000 00:27 69900                      /usr/lib64/libsasl2.so.3.0.0
  7818:20180413:135028.759 7ffff5e6e000-7ffff606d000 ---p 0001c000 00:27 69900                      /usr/lib64/libsasl2.so.3.0.0
  7818:20180413:135028.759 7ffff606d000-7ffff606e000 r--p 0001b000 00:27 69900                      /usr/lib64/libsasl2.so.3.0.0
  7818:20180413:135028.759 7ffff606e000-7ffff606f000 rw-p 0001c000 00:27 69900                      /usr/lib64/libsasl2.so.3.0.0
  7818:20180413:135028.759 7ffff606f000-7ffff6088000 r-xp 00000000 00:27 258421                     /usr/lib64/libpthread-2.27.9000.so
  7818:20180413:135028.760 7ffff6088000-7ffff6288000 ---p 00019000 00:27 258421                     /usr/lib64/libpthread-2.27.9000.so
  7818:20180413:135028.760 7ffff6288000-7ffff6289000 r--p 00019000 00:27 258421                     /usr/lib64/libpthread-2.27.9000.so
  7818:20180413:135028.760 7ffff6289000-7ffff628a000 rw-p 0001a000 00:27 258421                     /usr/lib64/libpthread-2.27.9000.so
  7818:20180413:135028.760 7ffff628a000-7ffff628e000 rw-p 00000000 00:00 0 
  7818:20180413:135028.760 7ffff628e000-7ffff62a4000 r-xp 00000000 00:27 60682                      /usr/lib64/libz.so.1.2.11
  7818:20180413:135028.760 7ffff62a4000-7ffff64a3000 ---p 00016000 00:27 60682                      /usr/lib64/libz.so.1.2.11
  7818:20180413:135028.760 7ffff64a3000-7ffff64a4000 r--p 00015000 00:27 60682                      /usr/lib64/libz.so.1.2.11
  7818:20180413:135028.760 7ffff64a4000-7ffff64a5000 rw-p 00000000 00:00 0 
  7818:20180413:135028.760 7ffff64a5000-7ffff64b8000 r-xp 00000000 00:27 258423                     /usr/lib64/libresolv-2.27.9000.so
  7818:20180413:135028.760 7ffff64b8000-7ffff66b8000 ---p 00013000 00:27 258423                     /usr/lib64/libresolv-2.27.9000.so
  7818:20180413:135028.760 7ffff66b8000-7ffff66b9000 r--p 00013000 00:27 258423                     /usr/lib64/libresolv-2.27.9000.so
  7818:20180413:135028.760 7ffff66b9000-7ffff66ba000 rw-p 00014000 00:27 258423                     /usr/lib64/libresolv-2.27.9000.so
  7818:20180413:135028.760 7ffff66ba000-7ffff66bc000 rw-p 00000000 00:00 0 
  7818:20180413:135028.760 7ffff66bc000-7ffff66bf000 r-xp 00000000 00:27 258409                     /usr/lib64/libdl-2.27.9000.so
  7818:20180413:135028.760 7ffff66bf000-7ffff68be000 ---p 00003000 00:27 258409                     /usr/lib64/libdl-2.27.9000.so
  7818:20180413:135028.760 7ffff68be000-7ffff68bf000 r--p 00002000 00:27 258409                     /usr/lib64/libdl-2.27.9000.so
  7818:20180413:135028.760 7ffff68bf000-7ffff68c0000 rw-p 00003000 00:27 258409                     /usr/lib64/libdl-2.27.9000.so
  7818:20180413:135028.760 7ffff68c0000-7ffff6a3b000 r-xp 00000000 00:27 258411                     /usr/lib64/libm-2.27.9000.so
  7818:20180413:135028.760 7ffff6a3b000-7ffff6c3a000 ---p 0017b000 00:27 258411                     /usr/lib64/libm-2.27.9000.so
  7818:20180413:135028.760 7ffff6c3a000-7ffff6c3b000 r--p 0017a000 00:27 258411                     /usr/lib64/libm-2.27.9000.so
  7818:20180413:135028.760 7ffff6c3b000-7ffff6c3c000 rw-p 0017b000 00:27 258411                     /usr/lib64/libm-2.27.9000.so
  7818:20180413:135028.760 7ffff6c3c000-7ffff6cc0000 r-xp 00000000 00:27 73929                      /usr/lib64/libcurl.so.4.5.0
  7818:20180413:135028.760 7ffff6cc0000-7ffff6ec0000 ---p 00084000 00:27 73929                      /usr/lib64/libcurl.so.4.5.0
  7818:20180413:135028.760 7ffff6ec0000-7ffff6ec3000 r--p 00084000 00:27 73929                      /usr/lib64/libcurl.so.4.5.0
  7818:20180413:135028.760 7ffff6ec3000-7ffff6ec4000 rw-p 00087000 00:27 73929                      /usr/lib64/libcurl.so.4.5.0
  7818:20180413:135028.760 7ffff6ec4000-7ffff6ed2000 r-xp 00000000 00:27 69929                      /usr/lib64/liblber-2.4.so.2.10.9
  7818:20180413:135028.760 7ffff6ed2000-7ffff70d1000 ---p 0000e000 00:27 69929                      /usr/lib64/liblber-2.4.so.2.10.9
  7818:20180413:135028.760 7ffff70d1000-7ffff70d2000 r--p 0000d000 00:27 69929                      /usr/lib64/liblber-2.4.so.2.10.9
  7818:20180413:135028.760 7ffff70d2000-7ffff70d3000 rw-p 0000e000 00:27 69929                      /usr/lib64/liblber-2.4.so.2.10.9
  7818:20180413:135028.760 7ffff70d3000-7ffff711c000 r-xp 00000000 00:27 69931                      /usr/lib64/libldap-2.4.so.2.10.9
  7818:20180413:135028.760 7ffff711c000-7ffff731c000 ---p 00049000 00:27 69931                      /usr/lib64/libldap-2.4.so.2.10.9
  7818:20180413:135028.760 7ffff731c000-7ffff731e000 r--p 00049000 00:27 69931                      /usr/lib64/libldap-2.4.so.2.10.9
  7818:20180413:135028.760 7ffff731e000-7ffff731f000 rw-p 0004b000 00:27 69931                      /usr/lib64/libldap-2.4.so.2.10.9
  7818:20180413:135028.760 7ffff731f000-7ffff757f000 r-xp 00000000 00:27 66050                      /usr/lib64/libcrypto.so.1.1.0h
  7818:20180413:135028.760 7ffff757f000-7ffff777e000 ---p 00260000 00:27 66050                      /usr/lib64/libcrypto.so.1.1.0h
  7818:20180413:135028.760 7ffff777e000-7ffff779c000 r--p 0025f000 00:27 66050                      /usr/lib64/libcrypto.so.1.1.0h
  7818:20180413:135028.760 7ffff779c000-7ffff77a7000 rw-p 0027d000 00:27 66050                      /usr/lib64/libcrypto.so.1.1.0h
  7818:20180413:135028.760 7ffff77a7000-7ffff77ab000 rw-p 00000000 00:00 0 
  7818:20180413:135028.760 7ffff77ab000-7ffff780e000 r-xp 00000000 00:27 66052                      /usr/lib64/libssl.so.1.1.0h
  7818:20180413:135028.760 7ffff780e000-7ffff7a0e000 ---p 00063000 00:27 66052                      /usr/lib64/libssl.so.1.1.0h
  7818:20180413:135028.761 7ffff7a0e000-7ffff7a13000 r--p 00063000 00:27 66052                      /usr/lib64/libssl.so.1.1.0h
  7818:20180413:135028.761 7ffff7a13000-7ffff7a18000 rw-p 00068000 00:27 66052                      /usr/lib64/libssl.so.1.1.0h
  7818:20180413:135028.761 7ffff7a18000-7ffff7bcd000 r-xp 00000000 00:27 258407                     /usr/lib64/libc-2.27.9000.so
  7818:20180413:135028.761 7ffff7bcd000-7ffff7dcd000 ---p 001b5000 00:27 258407                     /usr/lib64/libc-2.27.9000.so
  7818:20180413:135028.761 7ffff7dcd000-7ffff7dd1000 r--p 001b5000 00:27 258407                     /usr/lib64/libc-2.27.9000.so
  7818:20180413:135028.761 7ffff7dd1000-7ffff7dd3000 rw-p 001b9000 00:27 258407                     /usr/lib64/libc-2.27.9000.so
  7818:20180413:135028.761 7ffff7dd3000-7ffff7dd7000 rw-p 00000000 00:00 0 
  7818:20180413:135028.761 7ffff7dd7000-7ffff7dfc000 r-xp 00000000 00:27 258400                     /usr/lib64/ld-2.27.9000.so
  7818:20180413:135028.761 7ffff7f6d000-7ffff7fc7000 rw-s 00000000 00:05 14090240                   /SYSV00000000 (deleted)
  7818:20180413:135028.761 7ffff7fc7000-7ffff7fd5000 rw-p 00000000 00:00 0 
  7818:20180413:135028.761 7ffff7ff7000-7ffff7ffa000 r--p 00000000 00:00 0                          [vvar]
  7818:20180413:135028.761 7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
  7818:20180413:135028.761 7ffff7ffc000-7ffff7ffd000 r--p 00025000 00:27 258400                     /usr/lib64/ld-2.27.9000.so
  7818:20180413:135028.761 7ffff7ffd000-7ffff7ffe000 rw-p 00026000 00:27 258400                     /usr/lib64/ld-2.27.9000.so
  7818:20180413:135028.761 7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0 
  7818:20180413:135028.761 7ffffffda000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
  7818:20180413:135028.761 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
  7818:20180413:135028.761 ================================
  7818:20180413:135028.761 Please consider attaching a disassembly listing to your bug report.
  7818:20180413:135028.761 This listing can be produced with, e.g., objdump -DSswx zabbix_agentd.
  7818:20180413:135028.761 ================================
  7816:20180413:135028.762 One child process died (PID:7818,exitcode/signal:1). Exiting ...
zabbix_agentd [7816]: Error waiting for process with PID 7818: [10] No child processes
  7816:20180413:135716.123 Zabbix Agent stopped. Zabbix 3.4.8 (revision 79252).


I'm not sure what I can do with this.

Comment 2 Nick Clifton 2018-04-30 16:25:13 UTC
Hi Tomasz,

  Sorry for not replying to this BZ earlier - I am afraid that it slipped
  through the cracks. :-(

  One thing that you could try is adding this line to your .spec file:

%undefine _annotated_build

  This turns off the binary annotation feature, which whilst good, does
  sometimes seem to have some problems with LTO.  I have not been able
  to get to the bottom of this, but if it allows you to get on with your
  work, then so much the better.

Cheers
  Nick

Comment 3 Tomasz Kłoczko 2018-04-30 19:05:12 UTC
Negative result.
With undefine _annotated_build zabbix agent binary still crashes.

In meantime I found even more bizarre behavior. Zabbix server on processing monitoring data does not crashesh but produces completely different results than on use binaries without LTO optimisation.

I'm using now in:
- CFLAGS: -flto
- LDFLAGS: -flto -fuse-linker-plugin

Comment 4 Nick Clifton 2018-05-15 15:28:09 UTC
Hi Tomasz,

> Negative result.
> With undefine _annotated_build zabbix agent binary still crashes.
> 
> In meantime I found even more bizarre behavior. Zabbix server on processing
> monitoring data does not crashesh but produces completely different results
> than on use binaries without LTO optimisation.

Hmm, in which case this is almost certainly a gcc problem with the LTO optimization.  Handing over to Jakub...

Comment 5 Jan Kurik 2018-08-14 10:07:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 6 Tomasz Kłoczko 2018-09-23 12:00:24 UTC
This issue is no longer present using latest gcc.
Closing.


Note You need to log in before you can comment on or make changes to this bug.