<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>35112</bug_id>
          
          <creation_ts>2018-06-30 14:24:08 +0300</creation_ts>
          <short_desc>lambda function: internal compiler error: Segmentation fault</short_desc>
          <delta_ts>2018-07-14 13:28:04 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>gcc7-c++</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vitaly Lipatov">lav</reporter>
          <assigned_to name="Nobody&apos;s working on this, feel free to take it">nobody</assigned_to>
          
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>172336</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2018-06-30 14:24:08 +0300</bug_when>
    <thetext>Падает gcc при сборке telegram на i586, на x86_64, вне зависимости от -O.

$ LANG=C /usr/bin/g++  -DCUSTOM_API_ID -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQ_OS_LINUX64 -DTDESKTOP_DISABLE_AUTOUPDATE -DTDESKTOP_DISABLE_CRASH_REPORTS -DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION -DTDESKTOP_DISABLE_GTK_INTEGRATION -DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME -DTDESKTOP_DISABLE_UNITY_INTEGRATION -D__STDC_FORMAT_MACROS -I/tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram -I/tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram/Telegram_autogen/include -I/tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram/SourceFiles -isystem /usr/include/qt5/QtCore -I/usr/include/qt5/QtCore/5.9.6 -I/usr/include/qt5/QtCore/5.9.6/QtCore -isystem /usr/include/qt5/QtGui -I/usr/include/qt5/QtGui/5.9.6 -I/usr/include/qt5/QtGui/5.9.6/QtGui -isystem /usr/include/qt5/QtDBus -I/usr/include/qt5/QtDBus/5.9.6 -I/usr/include/qt5/QtDBus/5.9.6/QtDBus -I/usr/include/libdrm -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libcrl -I/usr/include/tgvoip -I/usr/include/opus -I/usr/include/libmicrosoft-gsl -I/tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram/ThirdParty/emoji_suggestions -I/usr/include/libvariant -I/usr/include/range-v3 -I/usr/include/minizip -I/usr/include/AL -I/usr/include/libappindicator3-0.1 -I/usr/include/libdbusmenu-glib-0.4 -I/tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram/generated -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/share/qt5/../../lib/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtNetwork  -pipe -frecord-gcc-switches -Wall -g  -march=i586 -mtune=generic -fpermissive -Wno-strict-aliasing -Wno-unused-variable -Wno-sign-compare -Wno-switch   -fPIC -std=gnu++1z &quot;-include&quot; &quot;/tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram/Telegram_pch/stdafx.h&quot; -o CMakeFiles/Telegram.dir/SourceFiles/export/data/export_data_types.cpp.o -c /tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram/SourceFiles/export/data/export_data_types.cpp
/tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram/SourceFiles/export/data/export_data_types.cpp: In lambda function:
/tmp/.private/lav/RPM/BUILD/telegram-desktop-1.3.8/Telegram/SourceFiles/export/data/export_data_types.cpp:182:60: internal compiler error: Segmentation fault
     if constexpr (MTPDphotoCachedSize::Is&lt;decltype(data)&gt;()) {
                                                            ^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172338</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2018-06-30 21:54:17 +0300</bug_when>
    <thetext>Лог упавшего задания:
http://git.altlinux.org/tasks/209301/build/200/x86_64/log

воспроизводится и локально в hasher, на i586 и x86_64.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172608</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2018-07-13 04:02:25 +0300</bug_when>
    <thetext>На gcc7-7.3.1-alt5 Segmentation fault не воспроизводится, зато воспроизводится вот что:

[ 15%] Building CXX object CMakeFiles/Telegram.dir/SourceFiles/apiwrap.cpp.o
x86_64-alt-linux-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;http://bugzilla.altlinux.org&gt; for instructions.
make[2]: *** [CMakeFiles/Telegram.dir/build.make:310: CMakeFiles/Telegram.dir/SourceFiles/apiwrap.cpp.o] Error 4

Memory cgroup out of memory: Kill process 12345 (cc1plus) score 32 or sacrifice child
Killed process 12345 (cc1plus) total-vm:1092084kB, anon-rss:1031240kB, file-rss:4kB, shmem-rss:15008kB

$NPROCS одновременно работающих процессов захотели по гигабайту памяти каждый.
Больно прожорливые.

С уменьшением $NPROCS в два раза сборка завершается.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172619</commentid>
    <comment_count>3</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2018-07-13 11:17:16 +0300</bug_when>
    <thetext>(В ответ на комментарий №2)
&gt; На gcc7-7.3.1-alt5 Segmentation fault не воспроизводится, зато воспроизводится
Видимо в этой ещё не существующей публично сборке gcc что-то исправлено?

...
&gt; $NPROCS одновременно работающих процессов захотели по гигабайту памяти каждый.
&gt; Больно прожорливые.
&gt; 
&gt; С уменьшением $NPROCS в два раза сборка завершается.
Это другой поворот.
Может быть, нам корректировать значение NPROCS заданием в спеке требуемого для одного процесса объёма памяти?
Типа NPROC = max(min(round(MAX/NEED)-1,NPROC),1)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172624</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2018-07-13 12:24:16 +0300</bug_when>
    <thetext>(In reply to comment #3)
&gt; (В ответ на комментарий №2)
&gt; &gt; На gcc7-7.3.1-alt5 Segmentation fault не воспроизводится, зато воспроизводится
&gt; Видимо в этой ещё не существующей публично сборке

http://git.altlinux.org/tasks/209933/

&gt; gcc что-то исправлено?

Может быть.

&gt; ...
&gt; &gt; $NPROCS одновременно работающих процессов захотели по гигабайту памяти каждый.
&gt; &gt; Больно прожорливые.
&gt; &gt; 
&gt; &gt; С уменьшением $NPROCS в два раза сборка завершается.
&gt; Это другой поворот.
&gt; Может быть, нам корректировать значение NPROCS заданием в спеке требуемого для
&gt; одного процесса объёма памяти?
&gt; Типа NPROC = max(min(round(MAX/NEED)-1,NPROC),1)

Можете корректировать.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172645</commentid>
    <comment_count>5</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2018-07-14 13:28:04 +0300</bug_when>
    <thetext>(В ответ на комментарий №2)
&gt; На gcc7-7.3.1-alt5 Segmentation fault не воспроизводится
Потому что исправлено в
Fri Jul 13 2018 Dmitry V. Levin &lt;ldv@altlinux&gt; 7.3.1-alt5
- Updated to redhat/gcc-7-branch r262599 (closes: #35089).
- Synced with Fedora gcc 7.3.1-6.
- Moved documentation for Fortran, Ada, and Go compilers from gcc7-doc
  to gcc7-fortran-doc, gcc7-gnat-doc, and gcc7-go-doc subpackages.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>