-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Minisat::OutOfMemoryException' during build #16
Comments
Can you say more about the environment that you're running in (OS, GHC version, GCC version)? I have run into this when building on Debian 10, which uses GHC 8.4. Some issues prevented me from installing other GHC versions (without spending more time), so I haven't tested if just changing the GHC version will fix it. (I note that the error does not come up when I use GHC 8.0 or earlier, on other OSes.) The behavior I saw was that BSC was indeed taking as many gigs of memory as it could, before eventually failing in the STP solver. I don't believe that STP is at fault, because I changed the solver to be Yices instead (using the -sat-yices flag or by changing the default value in FlagsDecode.hs) and BSC built with GHC 8.4 on Debian 10 would still increase in memory until it ran out. @bpfoley has also reported seeing this error, even when just running "bsc -help", when building with GHC 8.4 and GCC 9. It's unclear if his issue is the same, but similar message. As I said, this error has not come up when using GHC 8.0 or earlier, on other OSes. |
Full repro, including the environment is here: flokli/nixpkgs@e9db094 This is currently using GHC 8.6.5 and GCC 9.2.0 - just invoke I'll check with other compiler combinations and report back. Is there a Slack / IRC channel to discuss these findings? |
I can confirm I also run into the same memory consumption issues with GHC 8.4.4. Older GHC's aren't part of nixpkgs anymore - only the last 3 major releases are kept there. 8.2.2 was removed in September 2019 with 1f157b8cf8a640389b789ae24fd49752f53de1d7, and I'm currently performing some necromancy to see if I can get it to run with a GHC 8.2.2, and if that doesn't work with 8.0.2, but bluespec should really work on a somewhat recent GHC release. |
Hitting same issue on Fedora 31, GHC 8.6.5, GCC 9.2.1, when building |
For what it's worth, this seems to be tied to the version of GCC you're using, not GHC. With GHC 8.4.4 and GCC 7.3, the compilation of Prelude.bo works fine for me. If I build stp with GCC 8 or later, I get this OutOfMemoryException. (NB because of the recursive makefiles, dependency analysis is broken, so you'll need to do a |
Confirmed on another system (Gentoo, GHC 8.0.2) that I am observing the same issue with GCC 9.2.0 but not with GCC 7.4.0. |
I have same problem with debian (in docker) Environmenthostmachine:
docker with debian:bullseye The Dockerfile:FROM debian:bullseye as installer
LABEL maintainer="Huang Rui"
# Update and install software
RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq \
ghc \
libghc-regex-compat-dev \
libghc-syb-dev \
libghc-old-time-dev \
libfontconfig1-dev \
libxft-dev \
build-essential \
autoconf \
gperf \
bison \
flex \
file \
wget \
python \
unzip \
rsync \
sudo \
git \
curl
RUN git clone --progress --recursive https://github.com/B-Lang-org/bsc
RUN cd bsc && \
make PREFIX=/opt/bluespec GHC version
GCC version
Error logThe command is ${PROJ}/bsc/inst/bin/bsc -stdlib-names -bdir ${PROJ}/bsc/build/bsvlib -p . -vsearch ${PROJ}/bsc/build/bsvlib -no-use-prelude Prelude.bs The message is
|
FROM debian:bullseye as installer |
I suspect that this and #20 are both due to the old STP code not compiling well with newer GCC. (The "imperative statement" error could result from some kind of memory corruption?) I have run an experiment where I removed STP entirely from BSC and no issues occur. The code in src/stp/ is a very old snapshot. I don't think people should waste time getting it to work. We should either update to use the latest STP (that is now on GitHub and can become a submodule) or remove STP entirely (now that BSC is using a recent Yices as a submodule). For the most part, BSC uses one solver, which can either be CUDD, STP, or Yices. The default is STP (for historical reasons), but you can switch to others with -sat-cudd and -sat yices. The one exception is in SATPred.hs, which seems to always use STP regardless of that flag! There is commented out code to enable using Yices (and CUDD is not an option because it's too inefficient); we can reinstate that, and see if there are any issues. (And we can certainly remove CUDD at this point, as it was never sufficiently efficient for other purposes and doesn't seem to be supported any more.) |
As noted by Julie in issue B-Lang-org#16, STP is a historical default for the compiler to solve constraints, but recent Yices is now in use as well with the open source release (Yices is GPLv3). Since CUDD is also being removed, we can take this chance to just drop STP as well. Signed-off-by: Austin Seipp <aseipp@pobox.com>
As noted by Julie in issue B-Lang-org#16, STP is a historical default for the compiler to solve constraints, but recent Yices is now in use as well with the open source release (Yices is GPLv3). Since CUDD is also being removed, we can take this chance to just drop STP as well. Signed-off-by: Austin Seipp <aseipp@pobox.com>
As noted by Julie in issue B-Lang-org#16, STP is a historical default for the compiler to solve constraints, but recent Yices is now in use as well with the open source release (Yices is GPLv3). Since CUDD is also being removed, we can take this chance to just drop STP as well. Signed-off-by: Austin Seipp <aseipp@pobox.com>
As noted by Julie in issue B-Lang-org#16, STP is a historical default for the compiler to solve constraints, but recent Yices is now in use as well with the open source release (Yices is GPLv3). Since CUDD is also being removed, we can take this chance to just drop STP as well. Signed-off-by: Austin Seipp <aseipp@pobox.com>
As noted by Julie in issue B-Lang-org#16, STP is a historical default for the compiler to solve constraints, but recent Yices is now in use as well with the open source release (Yices is GPLv3). Since CUDD is also being removed, we can take this chance to just drop STP as well. Signed-off-by: Austin Seipp <aseipp@pobox.com>
As noted by Julie in issue B-Lang-org#16, STP is a historical default for the compiler to solve constraints, but recent Yices is now in use as well with the open source release (Yices is GPLv3). Since CUDD is also being removed, we can take this chance to just drop STP as well. Signed-off-by: Austin Seipp <aseipp@pobox.com>
During build,
/build/source/inst/bin/bsc -stdlib-names -bdir /build/source/build/bsvlib -p . -vsearch /build/source/build/bsvlib -no-use-prelude Prelude.bs
is invoked.It fails
Full Log: https://termbin.com/0nb3
Note the machine has ~60GiB of RAM, so I hope it's not really not enough memory ;-)
The text was updated successfully, but these errors were encountered: