Skip to content
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

Out of memory (>60G) from scons.py compiling Marlin #4272

Closed
5 tasks
larroy opened this issue May 17, 2022 · 9 comments
Closed
5 tasks

Out of memory (>60G) from scons.py compiling Marlin #4272

larroy opened this issue May 17, 2022 · 9 comments
Milestone

Comments

@larroy
Copy link

larroy commented May 17, 2022

What kind of issue is this?

I tried to compile Marlin from my personal fork https://github.com/larroy/Marlin/tree/pedro_bugfix which was working fine in platformIO for lpc1769

After a few days, with no changes to the code (tried several revisions back which I had previously compiled) scons.py keeps ballooning and using all the memory available. This happened in Windows 10 and also Linux. I tried uninstalling Platform IO several times, cleaning up data and home directories, switching to PIO in Linux...

This is the process which is eating all the memory:


piotr@panther:0: ~/d/Marlin [(HEAD detached at d6f21475a1)]> ps aux | grep scons
piotr      15942 99.8 23.6 20527848 15540704 pts/3 R+ 22:54   1:16 /home/piotr/.platformio/penv/bin/python /home/piotr/.platformio/packages/tool-scons/scons.py -Q --warn=no-no-parallel-support --jobs 32 --sconstruct /home/piotr/.platformio/penv/lib/python3.9/site-packages/platformio/builder/main.py PIOVERBOSE=0 ISATTY=1 PIOENV=TFBDMTc2OQ== PROJECT_CONFIG=L2hvbWUvcGlvdHIvZGV2ZWwvTWFybGluL3BsYXRmb3JtaW8uaW5p PROGRAM_ARGS=W10= PLATFORM_MANIFEST=L2hvbWUvcGlvdHIvLnBsYXRmb3JtaW8vcGxhdGZvcm1zL254cGxwYy1hcmR1aW5vLWxwYzE3NngvcGxhdGZvcm0uanNvbg== BUILD_SCRIPT=L2hvbWUvcGlvdHIvLnBsYXRmb3JtaW8vcGxhdGZvcm1zL254cGxwYy1hcmR1aW5vLWxwYzE3NngvYnVpbGRlci9tYWluLnB5
piotr      16356  0.0  0.0   8552  2440 pts/1    S+   22:55   0:00 grep --color=auto scons

In windows is also Python but I don't know how to see the commandline.

  • Question.
    This issue tracker is not the place for questions. If you want to ask how to do something,
    or to understand why something isn't working the way you expect it to,
    use Community Forums or Premium Support

  • PlatformIO IDE.
    All issues related to PlatformIO IDE should be reported to appropriate repository:
    PlatformIO IDE for Atom or
    PlatformIO IDE for VSCode

  • Development Platform or Board.
    All issues (building, uploading, adding new boards, etc.) related to PlatformIO development platforms
    should be reported to appropriate repository related to your hardware
    https://github.com/topics/platformio-platform

  • Feature Request.
    Start by telling us what problem you’re trying to solve. Often a solution
    already exists! Don’t send pull requests to implement new features without first getting our
    support. Sometimes we leave features out on purpose to keep the project small.

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system: Windows 10, Linux Ubuntu 21.10

PlatformIO Version (platformio --version): v2.4.3


piotr@panther:0: ~> .platformio/penv/bin/platformio --version
PlatformIO Core, version 6.0.0

Description of problem

See above

Steps to Reproduce

  1. Open project
  2. Go to PIO tab,
  3. Build for LPC1769

Actual Results

Out of memory.

Expected Results

Successful build

If problems with PlatformIO Build System:

The content of platformio.ini:

See https://github.com/larroy/Marlin/blob/pedro_bugfix/platformio.ini

Source file to reproduce issue:
See linked branch above.

Additional info

@lvlie
Copy link

lvlie commented May 17, 2022

Same issue here on Windows with fresh install. Python eats up all memory (~30Gb) a couple of times (causing system to have a high cpu and disk activity, for swap?) and eventually:

MemoryError: :
  File "C:\Users\user\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 182:
    env.SConscript(item, exports="env")
  File "C:\Users\user\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)

@ivankravets ivankravets added this to the 6.0.1 milestone May 17, 2022
@ivankravets
Copy link
Member

Could you re-run pio upgrade --dev. Does it work now?

See https://github.com/MarlinFirmware/Marlin/actions/runs/2338187390

@AJO3d
Copy link

AJO3d commented May 17, 2022

@ivankravets it was my problem this morning. Like I said in the post MarlinFirmware/Marlin#24194 the problem was solved after update to the dev version

@ivankravets
Copy link
Member

It looks like @larroy and @lvlie experience a little bit different issues -> MemoryError.

Let's wait for their feedback.

@AJO3d
Copy link

AJO3d commented May 17, 2022

Yes, it was exactly my problem: MemoryError. I searched in the net any problem by this, but I found nothing and then I searched by the warnings in log and I found the post where you recommends update to the dev version.

@ivankravets
Copy link
Member

Thank you so much for the clarification!

Duplicate of #4270

@lvlie
Copy link

lvlie commented May 17, 2022

It starts building now, but I have errors like:
error: 'manual_feedrate_mm_s' was not declared in this scope. Which is a totally different error of course. Reckon the original issue is fixed with the 6.0.1

@ivankravets
Copy link
Member

error: 'manual_feedrate_mm_s' was not declared in this scope

Yes, it seems this is not related to the PlatormIO.

@lvlie
Copy link

lvlie commented May 17, 2022

Yeah, apparently theres a bugfix and release version with the same version, and they are incompatible. Works now, thanks!

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

No branches or pull requests

4 participants