Skip to content

G++ exhausted the memory while compiling Acceptor.cpp #51

Closed

Description

@guoxiao

My g++ version is

% g++ --version
g++ (GCC) 6.1.1 20160510 (Red Hat 6.1.1-2)
Copyright (C) 2016 Free Software Foundation, Inc.

I don't know if it's a bug of g++ or it's a problem caused by the structure of Acceptor.cpp.

Activity

  1. djwatson commented on Jun 16, 2016

    @djwatson

    How much memory did it use?

  2. guoxiao commented on Jun 16, 2016

    @guoxiao
    ContributorAuthor

    @djwatson It will use up all my 16GB memory and get killed by the kernel while compiling this file.

  3. djwatson commented on Jun 16, 2016

    @djwatson

    I see ~1.5G taken for compilation, although that's on 4.8 or 5. I'm guessing this is a gcc bug, but I'll leave this open until we know for sure.

  4. djwatson commented on Jun 16, 2016

    @djwatson

    Also compiles fine with clang 3.9.0

  5. snarkmaster commented on Jun 23, 2016

    @snarkmaster
    Contributor

    I have frequently built wangle and fbthrift and folly with GCC 4.8 on a 1.5GB VM. Only fbthrift gets close to running out of memory. I would guess that the new GCC is leaky or has an overly expensive optimization pass.

    To measure memory usage of a process, you can try /usr/bin/time FAILING COMMAND. Look for maxresident.

  6. guoxiao commented on Jul 27, 2016

    @guoxiao
    ContributorAuthor

    The gcc-c++ package from Fedora Rawhide has fixed the problem.

    % g++ --version
    g++ (GCC) 6.1.1 20160721 (Red Hat 6.1.1-4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions