bazel running out of memory and crashing when running coverage [duplicate] - code-coverage

This question already has answers here:
Decrease bazel memory usage
(4 answers)
Closed last month.
When running Bazel coverage on service code, it is crashing on Jenkins pods and also local mac. I want to know does Bazel provide any run efficiency flags to be used in these cases where time does not matter and tests can run in series instead of parallel?
what are recommendations in Bazel params when it ends up with error below?.
Jenkins pods has a limit of pod memory that is max 32GB iiuc.
so is there an optimal combo of params to be used to get this to completion?
FATAL: bazel ran out of memory and crashed. Printing stack trace:
[182,301 / 182,393] 5 / 38 tests, 3 failed; [Prepa] BuildStorybook src/ui/storybook-build; 1958s ... (18 actions, 10 running)
[182,301 / 182,393] 5 / 38 tests, 3 failed; [Prepa] BuildStorybook src/ui/storybook-build; 2286s ... (18 actions, 10 running)
FATAL: bazel ran out of memory and crashed. Printing stack trace:
java.lang.OutOfMemoryError: Java heap space
my run parameters were
./bazel coverage --config=gocov //src/ui/... \
--collect_code_coverage \
--combined_report=lcov \
--remote_download_minimal \
--coverage_report_generator="//src/cmd/gocoverage-lcov:gocoverage-lcov"
pod resources maxed out.
resources:
requests:
memory: 32Gi
cpu: 18
limits:
memory: 48Gi
cpu: 24

There are different ways how you can limit the resource usage of Bazel, e.g. number of parallel jobs:
bazel build --jobs=2 //foo:bar
Similar questions were already asked.

Related

How do you debug a Bazel sandboxing failure?

Repo with full code example.
When I try to run a test with Bazel involving the tree-sitter binary, I get an Operation not permitted error without any further information.
❯ bazel test --test_output=errors --verbose_failures --sandbox_debug //tree-sitter-nbts:check-generated
INFO: Analyzed target //tree-sitter-nbts:check-generated (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
FAIL: //tree-sitter-nbts:check-generated (see /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/execroot/__main__/bazel-out/darwin_arm64-fastbuild/testlogs/tree-sitter-nbts/check-generated/test.log)
INFO: From Testing //tree-sitter-nbts:check-generated:
==================== Test output for //tree-sitter-nbts:check-generated:
++ dirname /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/sandbox/darwin-sandbox/17/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/tree-sitter-nbts/check-generated.runfiles/__main__/tree-sitter-nbts/check-generated
+ cd /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/sandbox/darwin-sandbox/17/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/tree-sitter-nbts/check-generated.runfiles/__main__/tree-sitter-nbts
+ git init -b main
Initialized empty Git repository in /private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/sandbox/darwin-sandbox/17/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/tree-sitter-nbts/check-generated.runfiles/__main__/tree-sitter-nbts/.git/
+ git add .
+ GIT_AUTHOR_EMAIL=_
+ GIT_AUTHOR_NAME=_
+ GIT_COMMITTER_EMAIL=_
+ GIT_COMMITTER_NAME=_
+ git commit -m 'Initial commit'
[main (root-commit) 1f79ef2] Initial commit
11 files changed, 11 insertions(+)
create mode 120000 Cargo.lock
create mode 120000 Cargo.toml
create mode 120000 bindings/rust/build.rs
create mode 120000 bindings/rust/lib.rs
create mode 120000 check-generated
create mode 120000 check-generated.sh
create mode 120000 grammar.js
create mode 120000 src/grammar.json
create mode 120000 src/node-types.json
create mode 120000 src/parser.c
create mode 120000 src/tree_sitter/parser.h
+ tree-sitter generate
Operation not permitted (os error 1)
================================================================================
Target //tree-sitter-nbts:check-generated up-to-date:
bazel-bin/tree-sitter-nbts/check-generated
INFO: Elapsed time: 0.220s, Critical Path: 0.11s
INFO: 2 processes: 2 darwin-sandbox.
INFO: Build completed, 1 test FAILED, 2 total actions
//tree-sitter-nbts:check-generated FAILED in 0.1s
/private/var/tmp/_bazel_varun/e55142ab9bc72292b8c54fb9627025eb/execroot/__main__/bazel-out/darwin_arm64-fastbuild/testlogs/tree-sitter-nbts/check-generated/test.log
INFO: Build completed, 1 test FAILED, 2 total actions
What is a good way of debugging this? So far, I know the following:
Running tree-sitter generate directly in the source tree works fine.
The bazel test command works fine with --spawn_strategy=standalone, which I think confirms that this is a sandboxing issue.
The bazel test command works fine inside the Nix environment (see the linked repo). This one is a little weird, not sure what's going on here.
Configuration information:
macOS 12.4 on an M1 Mac
Bazel v5.2.0 (both in Nix and outside)
tree-sitter v0.20.6 (both in Nix and outside) (I tried using the Nix-installed binary with Bazel and that didn't seem to make any difference)
OpenJDK v11.0.15 in the global environment vs OpenJDK v11.0.11 in Nix.
GitHub issues which seem related:
ln call fails with "operation not permitted" during bazel test - This comment mentions there is no command printed with --verbose_failures --sandbox_debug.
Strange "Operation not permitted" problem for test program accessing files in the sand box on MacOS

Selenium Headless Tests running very slow on EC2 instance

Thanks for reading my post. I've got a problem that I'd like to pick your brains about. I have many automated Selenium tests that are written in Java. They leverage JUnit for testing. I am tasked with optimizing the run time of these tests on an Amazon EC2 CentOS server. The tests are pulled from a Github repository and get stored inside a Docker Container on the EC2 instance. Similarly, these tests also run from the client's laptop through Eclipse using Cucumber. On the laptop, the tests take a fraction of the time that they do on the EC2 instance. The EC2 instance and laptop have the same amount of RAM and plenty of CPU processing power to run the tests, so I would think that the tests on the EC2 instance wouldn't take nearly as long as they do. Both the EC2 instance and the laptop have to go through a proxy to get to the Internet as well. I have made sure this part was set up correctly, as I had to set HTTP_PROXY, HTTPS_PROXY, and no_proxy to specific IP addresses.
In this section, I will provide the code that the chromedriver gets instantiated with whenever it is called. I will also provide the exact commands that I am using to run the tests. Please see below:
Here is the method that is called when it gets instantiated:
public static ChromeOptions setupChromeOptions() {
ChromeOptions options = new ChromeOptions();
Map<String, Object> p refs = new HashMap<String, Object>();
prefs.put("profile.default_content_setting_values.notifications", 2);
options.setHeadless(true);
options.setProxy(null);
options.setExperimentalOption("prefs", prefs);
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--disable-extensions");
options.addArguments("--disable-gpu");
options.addArguments("--headless");
options.addArguments("--no-proxy-server");
options.addArguments("--no-sandbox");
options.addArguments("--proxy-bypass-list=*");
options.addArguments("--proxy-server=");
options.addArguments("--proxy-server='direct://'");
options.addArguments("--start-maximized");
options.addArguments("--window-size=1280,720");
return options;
}
Here are the commands that are ran through Jenkins on the EC2 instance:
#!/bin/bash
cd /home/ec2-user/Git/REPOS_NAME # Navigate to where the repos are at on the EC2.
git fetch --all
git reset --hard origin/master
git pull # Pull down the latest.
sudo docker container ls # Display the running containers.
sudo docker exec 0967d39b1967 bash -c 'cd /Selenium/ ; rm -rf REPO_ROOT_FOLDER/ ; exit' # Delete the automated test folder so that it gets copied over fresh.
sudo docker cp /home/ec2-user/Git/REPO_NAME/REPO_ROOT_FOLDER 0967d39b1967:/Selenium/ # Copy the latest from the Github Repository to the Docker container.
sudo docker exec 0967d39b1967 bash -c 'cd /Selenium/REPO_ROOT_FOLDER/ANOTHER_FOLDER/driver ; chmod 0777 chromedriver ; cd .. ; mvn clean test' # Activate the Testrunner that is enabled in pom.xml. This kicks off the automated tests.
Finally, here are the version numbers and OS details of what I'm running:
Amazon EC2: CentOS 6.10
Docker Container OS: Ubuntu 16.04
Selenium: selenium-server-standalone-3.141.59.jar
Chromedriver: 84.0.4147.30
Google Chrome: 84.0.4147.105
Java: OpenJDK 1.8.0_252
Cucumber: 2.0.0
I cannot provide links to an HTML Page that I'm scraping because it's all inside of a Salesforce environment.
EC2 Specs:
AWS T2.XLarge
4 vCPUs
64-Bit
16 GB RAM
54 CPU Credits per hour
Laptop Specs:
Intel Core i7-8665U # 1.90GHz, 2112 MHz, 4 cores, 8 Logocal Processors
16 GB RAM
Windows 10
Group of Tests 1:
EC2: 50 minutes
Laptop through Eclipse: 20 minutes
Group of Tests 2:
EC2: 2 hours 43 minutes
Laptop through Eclipse: 1 hour 15 minutes
There are two breakdowns of the timings for two groups of tests. As you can see, the times off of the EC2 are much longer than that of that laptop.
Finally, here is a log of the set of tests that take 50 minutes to run. I had to change some of the directory and path names to protect the client.
Started by user Scott-IM
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on EC2_INSTANCE in workspace /var/lib/jenkins/workspace/Run mvn test
[Run mvn test] $ /bin/bash /tmp/jenkins166122467778007381.sh
Fetching origin
FIPS mode initialized
HEAD is now at 506f4ef Setting proxy to null for Chromeoptions
FIPS mode initialized
Already up to date.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0967d39b1967 IMAGE_NAME "/Selenium/setup.sh" 4 hours ago Up 4 hours 0.0.0.0:8080->8080/tcp CONTAINER_NAME
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< test:automation >--------------
[INFO] Building test-automation 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # automation ---
[INFO] Deleting /Selenium/automation/automation/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # automation ---
[WARNING] Using platform encoding (UTF8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Selenium/automation/automation/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # automation ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # automation ---
[WARNING] Using platform encoding (UTF8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Selenium/automation/automation/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # automation ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF8, i.e. build is platform dependent!
[INFO] Compiling 111 source files to /Selenium/salesforce-automation/salesforce-automation/target/test-classes
[WARNING] /Selenium/automation/automation/src/test/java/com/test/mapper/OIDP_Flow/OIDP_Email_Auto_Approval_Flow_2.java:[797,128] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/mapper/OIDP_Flow/OIDP_Email_Auto_Approval_Flow_2.java:[1842,130] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/shared/ExtentReporter.java:[126,33] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/shared/ExtentReporter.java:[127,32] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/mapper/rsiaa/HD_ISO_VSC_Auto_Approval_of_Resubmitted_Si.java:[4977,95] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/pages/aao/TrackingRecord.java:[27,39] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/pages/aao/TrackingRecord.java:[117,84] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/pages/aao/TrackingRecord.java:[156,92] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/pages/aao/TrackingRecord.java:[195,84] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/restApiPOC/PrivacyRestApiConnection.java: Some input files use unchecked or unsafe operations.
[WARNING] /Selenium/automation/automation/src/test/java/restApiPOC/PrivacyRestApiConnection.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default-test) # automation ---
[WARNING] The parameter forkMode is deprecated since version 2.14. Use forkCount and reuseForks instead.
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Running com.test.runner.TestRunner2
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147#{#310}) on port 23815
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1604696323.888][SEVERE]: bind() failed: Cannot assign requested address (99)
Nov 06, 2020 8:58:44 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Frame count :3
Frame count :4
Frame count :6
Newly Generated Service Item Number is :15355359
Frame count :3
Frame count :3
Clicked on new service item :15355359
Frame count :2
Frame count :2
Frame count :4
Frame count :3
Frame count :3
1 Scenarios (1 passed)
33 Steps (33 passed)
44m57.274s
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2,698.236 sec - in com.salesforcetest.runner.TestRunner2
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45:05 min
[INFO] Finished at: 2020-11-06T21:43:40Z
[INFO] ------------------------------------------------------------------------
Finished: SUCCESS
If anything was unclear or didn't make sense, please let me know and I will address the issue. I have looked all over the Internet for solutions and haven't found anything yet. I'm almost at a loss of what to do, as I'm not entirely sure what the exact cause of the slowness is. If anyone could provide some clues or things to try, I would be more than willing to give it a shot.
Thanks much for any and all help.
Not a solution per se, but throwing some things out there worth trying.
Since you're comparing Chrome run times I would advise trying to keep the versions in sync. That's tough on windows because you often have no control when Chrome updates. This isn't to say it would solve your problem but it would help eliminate a variable.
Chrome (and chromedriver for that matter) goes through a decent amount of changes that not being on the same version CAN and HAS made a difference for me.
Here are a few of the chrome options I've had to resort to using over the past couple years to get things running smoothly. I noticed 3 you didn't have.
--disable-extensions -- You never know what they might have on their local version of chrome.
--dns-prefetch-disable -- script would hang without this in older versions of chromedriver. https://bugs.chromium.org/p/chromedriver/issues/detail?id=402#c128
--enable-features=NetworkService,NetworkServiceInProcess -- script freezing https://groups.google.com/forum/m/#!topic/chromedriver-users/ktp-s_0M5NM[21-40]

electron-build fails with ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

goal
I want to build an electron app ON a windows Machine for a Rasperry PI 4 running Raspbian32
configuration
"linux": {
"target" : [
{
"target": "AppImage",
"arch": ["armv7l"]
}
]
},
calling
"build-dist-lin": "webpack --mode production && electron-builder -l --config .env.json",
returned ERROR
cannot get, wait error=Get
"https://service.electron.build/find-build-agent?no-cache=1ghlrte":
dial tcp 51.15.76.176:443: connectex: A connection attempt failed
because the connected party did not properly respond after a period of
time, or established connection failed because connected host has
failed to respond.
attempt=0
waitTime=2
Error: C:\A\Repo\test\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
No Leads
There is no further information in this log to know where then ... it goes wrong. In the same env.json I also have a Windows Configuration part which runs perfectly well with calling it with -w. So that means that the configuration is probably ok. And that means it fails somewhere else.
full log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\A\\Tools\\nodejs\\node.exe',
1 verbose cli 'C:\\A\\Tools\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build-dist-lin'
1 verbose cli ]
2 info using npm#6.13.4
3 info using node#v12.16.1
4 verbose run-script [ 'prebuild-dist-lin', 'build-dist-lin', 'postbuild-dist-lin' ]
5 info lifecycle testingtest#0.0.39~prebuild-dist-lin: testingtest#0.0.39
6 info lifecycle testingtest#0.0.39~build-dist-lin: testingtest#0.0.39
7 verbose lifecycle testingtest#0.0.39~build-dist-lin: unsafe-perm in lifecycle true
8 verbose lifecycle testingtest#0.0.39~build-dist-lin: PATH: C:\A\Tools\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\A\Repo\testingtestplayer\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\System32\OpenSSH\;C:\a\tools\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\dotnet\;C:\a\tools\Git\cmd;C:\Users\edward.deleau\AppData\Local\Microsoft\WindowsApps;C:\a\tools\Microsoft VS Code\bin;C:\Users\edward.deleau\AppData\Roaming\npm;C:\Users\edward.deleau\.dotnet\tools;C:\Users\edward.deleau\.dotnet\tools
9 verbose lifecycle testingtest#0.0.39~build-dist-lin: CWD: C:\A\Repo\testingtestplayer
10 silly lifecycle testingtest#0.0.39~build-dist-lin: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'webpack --mode production && electron-builder -l --config .env.json'
10 silly lifecycle ]
11 silly lifecycle testingtest#0.0.39~build-dist-lin: Returned: code: 1 signal: null
12 info lifecycle testingtest#0.0.39~build-dist-lin: Failed to exec build-dist-lin script
13 verbose stack Error: testingtest#0.0.39 build-dist-lin: `webpack --mode production && electron-builder -l --config .env.json`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\A\Tools\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:311:20)
13 verbose stack at ChildProcess.<anonymous> (C:\A\Tools\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:311:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid testingtest#0.0.39
15 verbose cwd C:\A\Repo\testingtestplayer
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\A\\Tools\\nodejs\\node.exe" "C:\\A\\Tools\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-dist-lin"
18 verbose node v12.16.1
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error testingtest#0.0.39 build-dist-lin: `webpack --mode production && electron-builder -l --config .env.json`
22 error Exit status 1
23 error Failed at the testingtest#0.0.39 build-dist-lin script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Seems to be an issue with the electron builder. Since the free service host associated with the electron builder is unavailable and there by it refuses the connection. You could monitor the issue thread from the below link. This issue has been watched along for a long time I believe.
https://github.com/electron-userland/electron-builder/issues/3569
Unfortunately it doesn't seem that such issue will be fixed anytime soon, as we can see from the amount of (mostly open) GitHub issues that have been opened from users that are trying to deal with such problem in the past months:
service.electron.build is unavailable
Error: Cannot get, wait error=Get https://service.electron.build/find-build-agent
service.electron.build is unavailable - Urgently please suggest an alternate
Local build service not detected
Unable to build AppImage on Windows - service.electron.build
Connection to remote builder refused, while building linux package
That said, I used the following workarond using Docker that made me able to build a Linux redistributable .deb package for my Electron App from Windows 10 in less than 5 minutes:
Install Docker (link)
Download the electronuserland/builder Docker image with the following console command:
docker pull electronuserland/builder
From the Electron project's root folder (such as C:\MyApp), type the following command-line command to run the container and map the Electron project's root folder to the /project virtual path:
docker run -rm -ti -v C:\MyApp\:/project -w /project electronuserland/builder
From inside the container, type the following commands to upgrade the Electron project's Yarn packages, globally install the electron-builder package and build the Linux redistributable package:
cd /project
yarn upgrade
yarn global add electron-builder
electron-builder -l
If everything went smooth, you should be able to locate your MyApp.deb file (or rpm, AppImage, or anything you've configured within the electron-builder's package.json file) inside the Electron project's /dist/ folder.
For further info about this whole procedure and a bit of background, check out this post on my blog.

Error occurs in jenkins build of unity

Machine:Mac
UnityVer:4.6.2
error of the following will appear when you have made a jenkins build of unity.
----- Total AssetImport time: 6.818127s, AssetImport time: 6.808909s, Asset hashing: 0.005416s [60.9 KB, 10.972655 mb/s]
Platform assembly: /Applications/Unity4.6.2/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/System.Data.dll (this message is harmless)
System memory in use before: 71.7 MB.
Unloading 137 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
System memory in use after: 66.8 MB.
Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 6940.
Total: 18.863014 ms (FindLiveObjects: 0.248059 ms CreateObjectMapping: 0.096515 ms MarkObjects: 1.745080 ms DeleteObjects: 0.012070 ms)
Scripts have compiler errors.
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Utilities/Argv.cpp Line: 127)
Aborting batchmode due to failure:
Scripts have compiler errors.
Thread 'UnityLookForNewInputDevices' is still running!
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Threads/Thread.cpp Line: 68)
Thread was not cleaned up!
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Threads/Posix/PlatformThread.cpp Line: 45)
FATAL: Unity3d command line execution failed with status 1
Build step 'Invoke Unity3d Editor' marked build as failure
FTP: Current build result is [FAILURE], not going to run.
Finished: FAILURE
Try search "error" in Jenkins console output. It's very easy to overlook what actually causing build fail. The error show in the bottom of console output is the result. The useful information is where all warnings and errors are shown like you normally see in IDE like visual studio. I spend a whole afternoon found out I should always use Control + F instead of my eyes to search through things like Jenkins console output.
The output shows you the problem: you have script errors. Until you fix your script errors, you won't be able to build.
You haven't included the script errors, so no-one can give you any more info. When you fix them, you'll probably find that it's nothing to do with Jenkins, and the question title is unrelated.
Usual causes of this:
You have some editor scripts in you project
You forgot to put #if guards around editor scripts and/or external scripts
You forgot to copy/paste one of your 3rd party libraries or plugins onto the machine where you're doign the build - and it's not in source control already (where it should be).

Dart Editor not launching referenced project

In project a's pubspec, I have this code to import stuff from project b:
dependencies:
project_b:
path: /home/vilix/Program Files/Dart/workspace/project_b
project_b is a library and so everything is in a lib forlder. After saving pubspec from project_a, Pub Get starts working and get's all the dependencies (even devendencies needed for project_b) to project_a. After I try launching it, nothing really happens (only two lines in the console about starting pub serve and loading source assets) and after about 30 seconds the console says that there is exhausted heap space. In interval of about 5 seconds it tries to allocate more and more. After 96 bytes a warning dialog pops out saying: Could not start pub serve or connect to pub
Console output:
--- 9:06:37 PM Starting pub serve : project_a ---
Loading source assets...
Exhausted heap space, trying to allocate 48 bytes.
Exhausted heap space, trying to allocate 64 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 96 bytes.
Unhandled exception:
Out of memory
Please note that I am not even using any of those packages, just having it in pubspec.yaml file and in packages folder of project_a.
pubspec.yaml of project_a
name: sample
description: A sample web application
dependencies:
project_b:
path: /home/vilix/Program Files/Dart/workspace/project_b
pubspec.yaml of project_b
name: project_b
version: 0.0.1+11
author: name + email
description: description
homepage: homepage
environment:
sdk: '>=1.6.0'
dependencies:
browser: '>=0.10.0+2 <0.11.0'
crypto: '>=0.9.0 <1.0.0'
I have the same problem if one of my packages has a symbolic link to packages.
Apparently pub goes into an endless loop.
I have opened a bug report:
https://code.google.com/p/dart/issues/detail?id=21031
Might not be your problem.
Sounds very similar to this issue http://dartbug.com/21006 or http://dartbug.com/19659.

Resources