zaccharles / lambda-native

Make .NET AWS Lambda functions start 10x faster using LambdaNative.
MIT License
73 stars 7 forks source link

Fails on dotnet publish step #4

Open katchis opened 5 years ago

katchis commented 5 years ago

I followed your instructions verbatim -- created a new Ec2 instance with the AMI you mentioned, installed the dependencies, but when I got to the point to the dotnet publish step I got this error

ubuntu@ip-172-31-46-186:~/lambda-native/example$ dotnet publish -r linux-x64 -c release
Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 44.82 sec for /home/ubuntu/lambda-native/example/LambdaNative.Example.csproj.
  LambdaNative.Example -> /home/ubuntu/lambda-native/example/bin/Release/netcoreapp2.1/linux-x64/LambdaNative.Example.dll
  /usr/bin/clang-3.9
  Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeCoreRT
EXEC : warning : RD.XML processing will change before release (https://github.com/dotnet/corert/issues/5001) [/home/ubuntu/lambda-native/example/LambdaNative.Example.csproj]
  Killed
/home/ubuntu/.nuget/packages/microsoft.dotnet.ilcompiler/1.0.0-alpha-27527-01/build/Microsoft.NETCore.Native.targets(239,5): error MSB3073: The command ""/home/ubuntu/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/1.0.0-alpha-27527-01/tools/ilc" @"obj/Release/netcoreapp2.1/linux-x64/native/LambdaNative.Example.ilc.rsp"" exited with code 137. [/home/ubuntu/lambda-native/example/LambdaNative.Example.csproj]

Do not that the only difference was that in global.json you specified to use 2.1.5, but after running those commands 2.1.7 was installed. So I removed global.json

zaccharles commented 5 years ago

Hi, I'm not really sure what error code 137 is. It seems like an issue better raised on the CoreRT repo. Searching Google seems to indicate there may be a convention to use core 137 to signal high memory usage or out of memory issues, so perhaps check memory usage and how much memory is on the EC2 instance?