Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building Qt from source with QtWebEngine causing OOM crashes
Forum Updated to NodeBB v4.3 + New Features

Building Qt from source with QtWebEngine causing OOM crashes

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    quutee
    wrote on 26 Feb 2023, 16:56 last edited by
    #1

    Hi,

    I am compiling Qt 5.15.8 from source on Ubuntu 20.04 (8-core/16 GB RAM) with QtWebEngine module enabled. After sometime everything running on the machine closes automatically. It seems ninja (internally used for building chromium) is building on all cores even if I trigger the build using make -j1, and consumes all the memory.
    Screenshot from 2023-02-26 16-37-13.png
    Notice how the CPU usage drops as memory peaks to 100%.

    I did not encounter this problem on macOS. Has anyone else faced this issue? Any tips on how to prevent these OOM crashes?

    J O 2 Replies Last reply 27 Feb 2023, 06:41
    0
    • Q quutee
      1 Mar 2023, 05:31

      I added 64GB swap space, but ld still crashes (along with the terminal from which make is run). It doesn't seem to be using swap space much even though I have set swappiness to 100.

      Q Offline
      Q Offline
      quutee
      wrote on 3 Mar 2023, 17:55 last edited by quutee 3 Mar 2023, 17:56
      #8

      I disabled symbol generation for chromium by adding the following line to qtwebengine/src/core/gn_run.pro to reduce the memory required during linking.

      gn_args += symbol_level=0
      

      There's also a flag that can be passed to configure to disable chromium symbols but it didn't work.

      1 Reply Last reply
      0
      • Q quutee
        26 Feb 2023, 16:56

        Hi,

        I am compiling Qt 5.15.8 from source on Ubuntu 20.04 (8-core/16 GB RAM) with QtWebEngine module enabled. After sometime everything running on the machine closes automatically. It seems ninja (internally used for building chromium) is building on all cores even if I trigger the build using make -j1, and consumes all the memory.
        Screenshot from 2023-02-26 16-37-13.png
        Notice how the CPU usage drops as memory peaks to 100%.

        I did not encounter this problem on macOS. Has anyone else faced this issue? Any tips on how to prevent these OOM crashes?

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 27 Feb 2023, 06:41 last edited by
        #2

        @quutee Does "ninja -j 1" help?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • Q quutee
          26 Feb 2023, 16:56

          Hi,

          I am compiling Qt 5.15.8 from source on Ubuntu 20.04 (8-core/16 GB RAM) with QtWebEngine module enabled. After sometime everything running on the machine closes automatically. It seems ninja (internally used for building chromium) is building on all cores even if I trigger the build using make -j1, and consumes all the memory.
          Screenshot from 2023-02-26 16-37-13.png
          Notice how the CPU usage drops as memory peaks to 100%.

          I did not encounter this problem on macOS. Has anyone else faced this issue? Any tips on how to prevent these OOM crashes?

          O Offline
          O Offline
          odelaune
          wrote on 27 Feb 2023, 10:26 last edited by odelaune
          #3

          @quutee
          Building QWebEngine is really a nightmare. Please read this post.
          The only way I know is to fake the number of CPU available on the system using chcpu. If you do not have sudo right for chcpu then I cannot help you (I am also looking for a solution ...).

          Q 1 Reply Last reply 27 Feb 2023, 13:20
          1
          • O odelaune
            27 Feb 2023, 10:26

            @quutee
            Building QWebEngine is really a nightmare. Please read this post.
            The only way I know is to fake the number of CPU available on the system using chcpu. If you do not have sudo right for chcpu then I cannot help you (I am also looking for a solution ...).

            Q Offline
            Q Offline
            quutee
            wrote on 27 Feb 2023, 13:20 last edited by
            #4

            @odelaune I do have sudo permissions and was able to build release shared builds by disabling half the cpu cores but shared debug build still fails on the linking step.

            O 1 Reply Last reply 28 Feb 2023, 08:29
            0
            • Q quutee
              27 Feb 2023, 13:20

              @odelaune I do have sudo permissions and was able to build release shared builds by disabling half the cpu cores but shared debug build still fails on the linking step.

              O Offline
              O Offline
              odelaune
              wrote on 28 Feb 2023, 08:29 last edited by
              #5

              @quutee said in Building Qt from source with QtWebEngine causing OOM crashes:

              shared debug build still fails on the linking step.

              What is the error you get?

              Q 1 Reply Last reply 28 Feb 2023, 17:54
              0
              • O odelaune
                28 Feb 2023, 08:29

                @quutee said in Building Qt from source with QtWebEngine causing OOM crashes:

                shared debug build still fails on the linking step.

                What is the error you get?

                Q Offline
                Q Offline
                quutee
                wrote on 28 Feb 2023, 17:54 last edited by quutee
                #6

                @odelaune ld receives a kill signal (due to OOM) when linking qtwebcoreengine.so.

                Q 1 Reply Last reply 1 Mar 2023, 05:31
                0
                • Q quutee
                  28 Feb 2023, 17:54

                  @odelaune ld receives a kill signal (due to OOM) when linking qtwebcoreengine.so.

                  Q Offline
                  Q Offline
                  quutee
                  wrote on 1 Mar 2023, 05:31 last edited by quutee 3 Jan 2023, 05:31
                  #7

                  I added 64GB swap space, but ld still crashes (along with the terminal from which make is run). It doesn't seem to be using swap space much even though I have set swappiness to 100.

                  Q 1 Reply Last reply 3 Mar 2023, 17:55
                  0
                  • Q quutee
                    1 Mar 2023, 05:31

                    I added 64GB swap space, but ld still crashes (along with the terminal from which make is run). It doesn't seem to be using swap space much even though I have set swappiness to 100.

                    Q Offline
                    Q Offline
                    quutee
                    wrote on 3 Mar 2023, 17:55 last edited by quutee 3 Mar 2023, 17:56
                    #8

                    I disabled symbol generation for chromium by adding the following line to qtwebengine/src/core/gn_run.pro to reduce the memory required during linking.

                    gn_args += symbol_level=0
                    

                    There's also a flag that can be passed to configure to disable chromium symbols but it didn't work.

                    1 Reply Last reply
                    0
                    • Q quutee has marked this topic as solved on 3 Mar 2023, 17:56

                    4/8

                    27 Feb 2023, 13:20

                    • Login

                    • Login or register to search.
                    4 out of 8
                    • First post
                      4/8
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved