Closed amab8901 closed 1 year ago
4.5GB available RAM is probably not enough to compile Substrate.
You can try to compile on one thread with -j1
which will take for ever or only compile single crates like cargo test -p pallet-something
.
4.5GB available RAM is probably not enough to compile Substrate. You can try to compile on one thread with
-j1
which will take for ever or only compile single crates likecargo test -p pallet-something
.
That's the hardware I have available and I really wanna be a blockchain developer, so it will have to take the time that it takes. Thanks for the advice on how to successfully run the tests. I made it to the end of cargo test
, but now it fails some tests. See terminal output below.
The hardware shouldn't really stop anyone from coding in substrate.
When you make a change to the code, you can skip building the runtime
SKIP_WASM_BUILD=1 cargo build
if you didn't make any change to it.
Then, you could publish your PR and let the CI jobs handle the testing for you.
If you are on origin/master
and the test is still failing, I think you could try updating
rust rustup update
.
I answered this on stackexchange: https://substrate.stackexchange.com/questions/6144/computer-crashing-on-cargo-test/6145#6145
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
Computer crashes when I run
cargo test
Steps to reproduce
git clone https://github.com/paritytech/substrate
cd substrate
cargo test
it runs until 1600/1706, and then the computer crashes.
I tried another approach after this:
cargo build
cargo test
it had a similar ending but sooner than 1600 (I think it was like 1200-1500 or something like that).
Before crashing, the computer was lagging severely and eventually froze, and then it just automatically restarted.
$ lscpu
``` Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: GenuineIntel Model name: Intel(R) Core(TM) i3-1005G1 CPU @ 1.20GHz CPU family: 6 Model: 126 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 Stepping: 5 CPU(s) scaling MHz: 43% CPU max MHz: 3400,0000 CPU min MHz: 400,0000 BogoMIPS: 2380,80 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_l m abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm md_clear flush_l1d arch_capabilities Virtualization features: Virtualization: VT-x Caches (sum of all): L1d: 96 KiB (2 instances) L1i: 64 KiB (2 instances) L2: 1 MiB (2 instances) L3: 4 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-3 Vulnerabilities: Itlb multihit: KVM: Mitigation: VMX disabled L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable Retbleed: Mitigation; Enhanced IBRS Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence Srbds: Mitigation; Microcode Tsx async abort: Not affected ```$ garuda-inxi
``` System: Kernel: 5.15.79-1-lts arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts root=UUID=4bc99fd1-6a7e-4096-8fca-ccd010a3944b rw rootflags=subvol=@ quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3 Desktop: Xfce v: 4.16.1 tk: Gtk v: 3.24.34 info: xfce4-panel wm: xfwm v: 4.16.1 vt: 7 dm: LightDM v: 1.32.0 Distro: Garuda Linux base: Arch Linux Machine: Type: Laptop System: Acer product: Aspire A315-56 v: V1.15 serial: