AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
25.26k stars 1.81k forks source link

Compilation failed with v0.105.0-beta.4 (ok with v0.105.0-beta.3 and lower) - Fedora 33 / Armv7 #2654

Closed waby38b closed 3 years ago

waby38b commented 3 years ago

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Issue Details

Expected Behavior

Grab source, simple "make", compilation finish without error

Actual Behavior

Grab source, "make", (TAG: v0.105.0-beta.4)

(...) yarn --cwd client2 build yarn run v1.22.10 $ rm -rf ../build2 && yarn install && webpack --config ./scripts/webpack/webpack.config.prod.js [1/4] Resolving packages... success Already up-to-date. (node:9623) [DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hook.processAssets instead and use one of Compilation.PROCESS_ASSETSSTAGE* as stage option) (Use node --trace-deprecation ... to show where the warning was created) (node:9623) [DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_HASH] DeprecationWarning: [hash] is now [fullhash] (also consider using [chunkhash] or [contenthash], see documentation for details)

<--- Last few GCs --->

[9623:0x1465548] 540685 ms: Mark-sweep (reduce) 492.6 (501.0) -> 492.5 (501.3) MB, 2055.1 / 0.1 ms (average mu = 0.095, current mu = 0.010) allocation failure scavenge might not succeed [9623:0x1465548] 544799 ms: Mark-sweep (reduce) 493.0 (499.8) -> 492.9 (500.8) MB, 4109.4 / 0.1 ms (average mu = 0.034, current mu = 0.001) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0xb4ffe284 node::Abort() [/lib/libnode.so.83] 2: 0xb4f39cb8 node::OnFatalError(char const, char const) [/lib/libnode.so.83] 3: 0xb559a904 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/lib/libnode.so.83] 4: 0xb559ab28 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/lib/libnode.so.83] 5: 0xb576ae80 v8::internal::Heap::EnsureFromSpaceIsCommitted() [/lib/libnode.so.83] 6: 0xb576af34 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned int, double) [/lib/libnode.so.83] 7: 0xb5784808 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/lib/libnode.so.83] 8: 0xb5784f64 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/lib/libnode.so.83] 9: 0xb5788410 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib/libnode.so.83] 10: 0xb578846c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib/libnode.so.83] 11: 0xb574b14c v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/lib/libnode.so.83] 12: 0xb5a9cf74 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned int, v8::internal::Isolate) [/lib/libnode.so.83] error Command failed with signal "SIGABRT". info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. make: *** [Makefile:67: js-build] Error 1

If I force using previous TAG: v0.105.0-beta.3, then, no error append, and compilation finish well

Screenshots

Additional Information

ameshkov commented 3 years ago

Unfortunately, we won't be able to fix this, it seems compiling the new client-side is rather resource-intensive: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Please try using a more powerful device to compile AGH and bear in my mind that it's not necessary to build it on ARM -- since AGH is written in Go, you can have an ARM build on any device.

waby38b commented 3 years ago

Thank's for your fast reply. As sugested, I've succesfully recompile AGH for ARMv7, on my Fedora 33 / x86_64 using Cross compilation make GOOS='linux' GOARCH='arm' GOARM=7 => no error at all

Many thanks for your great work !