paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

`cargo test` crashes computer #12817

Closed amab8901 closed 1 year ago

amab8901 commented 1 year ago

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

  1. git clone https://github.com/paritytech/substrate
  2. cd substrate
  3. cargo test

it runs until 1600/1706, and then the computer crashes.

I tried another approach after this:

  1. cargo build
  2. 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: Mobo: IL model: Sleepy_IL v: V1.15 serial: UEFI: Insyde v: 1.15 date: 07/13/2020 Battery: ID-1: BAT1 charge: 40.2 Wh (100.0%) condition: 40.2/47.8 Wh (84.1%) volts: 12.3 min: 11.2 model: LGC AP18C8K type: Li-ion serial: N/A status: full CPU: Info: model: Intel Core i3-1005G1 bits: 64 type: MT MCP arch: Ice Lake gen: core 10 level: v4 note: check built: 2019-21 process: Intel 10nm family: 6 model-id: 0x7E (126) stepping: 5 microcode: 0xB6 Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache: L1: 160 KiB desc: d-2x48 KiB; i-2x32 KiB L2: 1024 KiB desc: 2x512 KiB L3: 4 MiB desc: 1x4 MiB Speed (MHz): avg: 1211 high: 1288 min/max: 400/3400 scaling: driver: intel_pstate governor: powersave cores: 1: 1288 2: 1201 3: 1200 4: 1155 bogomips: 9523 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled Type: l1tf status: Not affected Type: mds status: Not affected Type: meltdown status: Not affected Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable Type: retbleed mitigation: Enhanced IBRS Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling, PBRSB-eIBRS: SW sequence Type: srbds mitigation: Microcode Type: tsx_async_abort status: Not affected Graphics: Device-1: Intel Iris Plus Graphics G1 vendor: Acer Incorporated ALI driver: i915 v: kernel arch: Gen-11 process: Intel 10nm built: 2019-21 ports: active: eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:8a56 class-ID: 0300 Device-2: Quanta HD User Facing type: USB driver: uvcvideo bus-ID: 1-7:4 chip-ID: 0408:a061 class-ID: 0e02 Display: x11 server: X.Org v: 21.1.4 compositor: xfwm v: 4.16.1 driver: X: loaded: modesetting alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: :0.0 screens: 1 Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93") Monitor-1: eDP-1 model: BOE Display 0x07cb built: 2018 res: 1920x1080 hz: 60 dpi: 142 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5") ratio: 16:9 modes: 1920x1080 API: OpenGL Message: Unable to show GL data. Required tool glxinfo missing. Audio: Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_icl bus-ID: 00:1f.3 chip-ID: 8086:34c8 class-ID: 0403 Sound API: ALSA v: k5.15.79-1-lts running: yes Sound Server-1: PulseAudio v: 16.1 running: no Sound Server-2: PipeWire v: 0.3.61 running: yes Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Acer Incorporated ALI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 4000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200 IF: enp1s0 state: down mac: Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter vendor: Lite-On driver: ath10k_pci v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 168c:0042 class-ID: 0280 IF: wlp2s0 state: up mac: IF-ID-1: br-f6b403f2c30d state: up speed: 10000 Mbps duplex: unknown mac: IF-ID-2: docker0 state: down mac: IF-ID-3: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A IF-ID-4: veth929492d state: up speed: 10000 Mbps duplex: full mac: Bluetooth: Device-1: Lite-On Qualcomm Atheros QCA9377 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-10:5 chip-ID: 04ca:3015 class-ID: e001 Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: Drives: Local Storage: total: 238.47 GiB used: 175.2 GiB (73.5%) SMART Message: Required tool smartctl not installed. Check --recommends ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: RBUSNS8154P3256GJ1 size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s lanes: 2 type: SSD serial: rev: E8FK12.3 temp: 37.9 C scheme: GPT Partition: ID-1: / raw-size: 238.21 GiB size: 238.21 GiB (100.00%) used: 175.2 GiB (73.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2 ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 594 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 ID-3: /home raw-size: 238.21 GiB size: 238.21 GiB (100.00%) used: 175.2 GiB (73.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2 ID-4: /var/log raw-size: 238.21 GiB size: 238.21 GiB (100.00%) used: 175.2 GiB (73.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2 ID-5: /var/tmp raw-size: 238.21 GiB size: 238.21 GiB (100.00%) used: 175.2 GiB (73.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2 Swap: Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) ID-1: swap-1 type: zram size: 7.56 GiB used: 139.4 MiB (1.8%) priority: 100 dev: /dev/zram0 Sensors: System Temperatures: cpu: 56.0 C mobo: N/A Fan Speeds (RPM): N/A Info: Processes: 269 Uptime: 3d 18h 18m wakeups: 54 Memory: 7.56 GiB used: 3.02 GiB (39.9%) Init: systemd v: 252 default: graphical tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: pm: pacman pkgs: 1448 libs: 380 tools: paru Shell: Bash v: 5.1.16 running-in: xfce4-terminal inxi: 3.3.23 Garuda (2.6.10-1): System install date: 2022-09-11 Last full system update: 2022-12-01 ↻ Is partially upgraded: No Relevant software: NetworkManager Windows dual boot: No/Undetected Snapshots: Snapper (maybe) Failed units: session-2.scope session-5.scope ```
ggwpez commented 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.

amab8901 commented 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.

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.

$ cargo test -j1 ``` Finished test [unoptimized + debuginfo] target(s) in 1.24s Running unittests src/lib.rs (target/debug/deps/beefy_gadget-4014980415cbcce0) running 45 tests test communication::gossip::tests::known_votes_insert_remove ... ok test communication::gossip::tests::note_and_drop_round_works ... ok test communication::gossip::tests::note_same_round_twice ... ok test communication::gossip::tests::should_avoid_verifying_signatures_twice ... ok test communication::peers::tests::should_track_known_peers_progress ... ok test communication::tests::beefy_protocols_names ... ok test communication::gossip::tests::messages_rebroadcast ... ok test justification::tests::should_decode_and_verify_finality_proof ... ok test keystore::tests::authority_id_works ... ok test justification::tests::should_verify_with_validator_set ... ok test communication::gossip::tests::messages_allowed_and_expired ... ok test keystore::tests::sign_error ... ok test keystore::tests::sign_no_keystore ... ok test keystore::tests::sign_works ... ok test keystore::tests::public_keys_works ... ok test aux_schema::tests::should_load_persistent_sanity_checks ... ok test keystore::tests::verify_works ... ok test keystore::tests::verify_should_work ... ok test keystore::tests::pair_works ... ok test round::tests::new_rounds ... ok test round::tests::old_rounds_not_accepted ... ok test round::tests::vote_threshold ... ok test round::tests::round_tracker ... ok test round::tests::add_and_conclude_votes ... ok test round::tests::multiple_rounds ... ok test tests::beefy_importing_blocks ... ok test tests::beefy_finalizing_blocks ... ok test tests::lagging_validators ... ok test tests::should_initialize_voter_at_genesis ... ok test tests::should_initialize_voter_at_latest_finalized ... ok Dec 01 14:22:21.523 ERROR beefy: 🥩 Gossip engine has terminated, closing worker. Dec 01 14:22:21.528 ERROR beefy: 🥩 Gossip engine has terminated, closing worker. Dec 01 14:22:21.538 ERROR beefy: 🥩 Gossip engine has terminated, closing worker. test tests::correct_beefy_payload ... ok test worker::tests::extract_authorities_change_digest ... ok test tests::should_initialize_voter_when_last_final_is_session_boundary ... ok test worker::tests::keystore_vs_validator_set ... ok Dec 01 14:22:24.974 ERROR beefy: 🥩 Error UnknownBlock("Expect block hash from id: BlockId::Number(1)") on appending justification: V1(SignedCommitment { commitment: Commitment { payload: Payload([([109, 104], [])]), block_number: 1, validator_set_id: 0 }, signatures: [None] }) test worker::tests::should_finalize_correctly ... ok test worker::tests::should_init_session ... ok Dec 01 14:22:25.469 ERROR gossip: Got message from unregistered peer who=12D3KooWKGYA3VSWMypwYwUdCshKA79SeHLwqgraujjng1JxPfd8 protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:25.470 ERROR gossip: Got message from unregistered peer who=12D3KooWKGYA3VSWMypwYwUdCshKA79SeHLwqgraujjng1JxPfd8 protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 test worker::tests::should_vote_target ... ok test worker::tests::test_oracle_accepted_interval ... ok test worker::tests::vote_on_mandatory_block ... ok test worker::tests::vote_on_min_block_delta ... ok test worker::tests::vote_on_power_of_two ... ok test worker::tests::vote_on_target_block ... ok test tests::voter_initialization ... ok Dec 01 14:22:26.292 ERROR gossip: Got message from unregistered peer who=12D3KooWRvg5NPhA1RpRrhKSeG2nYaJe88QL6AZNLDUWDbj6C2nz protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.293 ERROR gossip: Got message from unregistered peer who=12D3KooWRvg5NPhA1RpRrhKSeG2nYaJe88QL6AZNLDUWDbj6C2nz protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.293 ERROR gossip: Got message from unregistered peer who=12D3KooWKGYA3VSWMypwYwUdCshKA79SeHLwqgraujjng1JxPfd8 protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.294 ERROR gossip: Got message from unregistered peer who=12D3KooWHYHC2bDi6jqUHCotvXk7e3f5uGqkTr96vyNoNvJ2WHme protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.294 ERROR gossip: Got message from unregistered peer who=12D3KooWHYHC2bDi6jqUHCotvXk7e3f5uGqkTr96vyNoNvJ2WHme protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.295 ERROR gossip: Got message from unregistered peer who=12D3KooWHYHC2bDi6jqUHCotvXk7e3f5uGqkTr96vyNoNvJ2WHme protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.295 ERROR gossip: Got message from unregistered peer who=12D3KooWHYHC2bDi6jqUHCotvXk7e3f5uGqkTr96vyNoNvJ2WHme protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.295 ERROR gossip: Got message from unregistered peer who=12D3KooWRvg5NPhA1RpRrhKSeG2nYaJe88QL6AZNLDUWDbj6C2nz protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.579 ERROR gossip: Got message from unregistered peer who=12D3KooWKGYA3VSWMypwYwUdCshKA79SeHLwqgraujjng1JxPfd8 protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.579 ERROR gossip: Got message from unregistered peer who=12D3KooWKGYA3VSWMypwYwUdCshKA79SeHLwqgraujjng1JxPfd8 protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.747 ERROR gossip: Got message from unregistered peer who=12D3KooWKGYA3VSWMypwYwUdCshKA79SeHLwqgraujjng1JxPfd8 protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.786 ERROR gossip: Got message from unregistered peer who=12D3KooWHYHC2bDi6jqUHCotvXk7e3f5uGqkTr96vyNoNvJ2WHme protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.829 ERROR gossip: Got message from unregistered peer who=12D3KooWRvg5NPhA1RpRrhKSeG2nYaJe88QL6AZNLDUWDbj6C2nz protocol=/0000000000000000000000000000000000000000000000000000000000000000/beefy/1 Dec 01 14:22:26.833 ERROR beefy: 🥩 Gossip engine has terminated, closing worker. Dec 01 14:22:26.840 ERROR beefy: 🥩 Gossip engine has terminated, closing worker. Dec 01 14:22:26.840 ERROR beefy: 🥩 Gossip engine has terminated, closing worker. Dec 01 14:22:26.845 ERROR beefy: 🥩 Gossip engine has terminated, closing worker. test tests::on_demand_beefy_justification_sync ... ok test worker::tests::should_triage_votes_and_process_later ... ok test result: ok. 45 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 18.49s Running unittests src/lib.rs (target/debug/deps/beefy_gadget_rpc-6fad6e87b381479d) running 4 tests test tests::latest_finalized_rpc ... ok test tests::subscribe_and_unsubscribe_with_wrong_id ... ok test tests::uninitialized_rpc_handler ... ok test tests::subscribe_and_listen_to_one_justification ... ok test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/beefy_merkle_tree-395ee42832a44acb) running 10 tests test tests::should_generate_and_verify_proof_complex ... ok test tests::should_generate_and_verify_proof_simple ... ok test tests::should_generate_empty_root ... ok test tests::should_generate_root_complex ... ok test tests::should_generate_root_pow_2 ... ok test tests::should_generate_single_root ... ok test tests::should_panic_on_invalid_leaf_index - should panic ... ok test tests::should_generate_and_verify_proof_on_test_data ... ok test tests::should_generate_and_verify_proof_large ... ok test tests::should_generate_and_verify_proof_large_tree ... ok test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 52.43s Running unittests src/lib.rs (target/debug/deps/beefy_primitives-78479c95b65d5828) running 15 tests test commitment::tests::commitment_ordering ... ok test commitment::tests::commitment_encode_decode ... ok test commitment::tests::versioned_commitment_encode_decode ... ok test mmr::tests::extract_mmr_root_digest ... ok test mmr::tests::should_construct_version_correctly ... ok test mmr::tests::should_panic_if_major_too_large - should panic ... ok test mmr::tests::should_panic_if_minor_too_large - should panic ... ok test payload::tests::payload_methods_work_as_expected ... ok test commitment::tests::large_signed_commitment_encode_decode ... ok test commitment::tests::signed_commitment_count_signatures ... ok test tests::beefy_verify_works ... ok test commitment::tests::signed_commitment_encode_decode ... ok test tests::validator_set ... ok test witness::tests::should_convert_signed_commitment_to_witness ... ok test witness::tests::should_encode_and_decode_witness ... ok test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.45s Running unittests src/main.rs (target/debug/deps/chain_spec_builder-2cf6196a75df2f92) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/fork_tree-99a19b4d1a574c99) running 17 tests test test::finalize_with_ancestor_works ... ok test test::drain_filter_works ... ok test test::find_node_backtracks_after_finding_highest_descending_node ... ok test test::finalize_with_descendent_works ... ok test test::finalize_root_works ... ok test test::finalize_works ... ok test test::find_node_index_with_predicate_works ... ok test test::find_node_works ... ok test test::import_doesnt_add_duplicates ... ok test test::find_node_index_works ... ok test test::import_doesnt_revert ... ok test test::iter_iterates_in_preorder ... ok test test::map_works ... ok test test::post_order_traversal_requirement ... ok test test::minimizes_calls_to_is_descendent_of ... ok test test::prune_works ... ok test test::rebalance_works ... ok test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/frame_benchmarking-a5ab85e1601a01f2) running 18 tests test analysis::tests::analysis_min_squares_iqr_uses_multiple_samples_for_same_parameters ... ok test analysis::tests::analysis_median_slopes_should_work ... ok test tests::__construct_runtime_integrity_test::runtime_integrity_tests ... ok test analysis::tests::intercept_of_a_little_under_zero_is_rounded_up_to_zero ... ok test analysis::tests::test_linear_regression ... ok test analysis::tests::analysis_median_min_squares_should_work ... ok test tests::benchmarks::benchmark_override_works ... ok test tests::benchmarks::benchmark_error_wipes_storage ... ok test tests::benchmarks::benchmarks_macro_rename_works ... ok test tests::benchmarks::benchmarks_macro_works_for_non_dispatchable ... ok test tests::benchmarks::benchmarks_macro_verify_works ... ok test tests::benchmarks::benchmarks_macro_works ... ok test tests_instance::__construct_runtime_integrity_test::runtime_integrity_tests ... ok test tests_instance::benchmarks::bench_other_name ... ok test tests_instance::benchmarks::bench_set_value ... ok test tests::benchmarks::benchmarks_generate_unit_tests ... ok test tests_instance::benchmarks::bench_sort_vector ... ok test tests::benchmarks::test_values_per_component ... ok test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s Running unittests src/lib.rs (target/debug/deps/frame_benchmarking_cli-5c591a6bc81c2c56) running 6 tests test machine::hardware::tests::json_static_data ... ok test shared::stats::test_stats::no_panic_short_lengths ... ok test shared::weight_params::test_weight_params::calc_weight_detects_negative_mul ... ok test shared::stats::test_stats::stats_correct ... ok test shared::weight_params::test_weight_params::calc_weight_works ... ok test pallet::writer::test::map_results_works ... ok test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/frame_election_provider_solution_type-787255f0f839924f) running 1 test test tests::ui_fail ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/frame_election_provider_support-723cdb3163558ca2) running 17 tests test onchain::tests::__construct_runtime_integrity_test::runtime_integrity_tests ... ok test onchain::tests::too_many_winners_when_desired_targets_exceed_max_winners ... ok test onchain::tests::onchain_seq_phragmen_works ... ok test onchain::tests::onchain_phragmms_works ... ok test tests::solution_type::max_encoded_len_exact ... ok test tests::solution_type::from_and_into_assignment_works ... ok test tests::solution_type::max_encoded_len_too_small ... ok test tests::solution_type::max_encoded_len_upper_bound ... ok test tests::solution_type::solution_into_assignment_must_report_overflow ... ok test tests::solution_type::from_assignment_fail_too_many_voters ... ok test tests::solution_type::solution_struct_is_codec ... ok test tests::solution_type::remove_voter_works ... ok test tests::solution_type::solution_struct_works_with_and_without_compact ... ok test tests::solution_type::target_count_overflow_is_detected ... ok test tests::solution_type::zero_target_count_is_ignored ... ok test tests::solution_type::unique_targets_len_edge_count_works ... ok test tests::index_assignments_generate_same_solution_as_plain_assignments ... ok test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s Running unittests src/compact.rs (target/debug/deps/compact-95960ecdda151ef7) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/frame_executive-0372baf8a5cf4284) running 21 tests test tests::__construct_runtime_integrity_test::runtime_integrity_tests ... ok test tests::all_weights_are_recorded_correctly ... ok test tests::bad_extrinsic_not_inserted ... ok test tests::balance_transfer_dispatch_works ... ok test tests::block_hooks_weight_is_stored ... ok test tests::block_import_of_bad_extrinsic_root_fails - should panic ... ok test tests::block_import_of_bad_state_root_fails - should panic ... ok test tests::block_import_works ... ok test tests::block_weight_and_size_is_stored_per_tx ... ok test tests::custom_runtime_upgrade_is_called_before_modules ... ok test tests::can_pay_for_tx_fee_on_full_lock ... ok test tests::custom_runtime_upgrade_is_called_when_using_execute_block_trait ... ok test tests::event_from_runtime_upgrade_is_included ... ok test tests::calculating_storage_root_twice_works ... ok test tests::last_runtime_upgrade_was_upgraded_works ... ok test tests::offchain_worker_works_as_expected ... ok test tests::runtime_upgraded_should_work ... ok test tests::block_weight_limit_enforced ... ok test tests::validate_unsigned ... ok test tests::invalid_inherent_position_fail - should panic ... ok test tests::valid_inherents_position_works ... ok test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s Running unittests src/lib.rs (target/debug/deps/frame_support-6930f3496d317216) running 116 tests test dispatch::tests::compact_attr ... ok test dispatch::tests::call_name ... ok test dispatch::tests::module_json_metadata ... ok test dispatch::tests::get_call_names ... ok test dispatch::tests::integrity_test_should_work - should panic ... ok test dispatch::tests::encode_is_correct_and_decode_works ... ok test dispatch::tests::on_idle_should_work_3 ... ok test dispatch::tests::on_idle_should_work_2 - should panic ... ok test dispatch::tests::on_idle_should_work_1 - should panic ... ok test dispatch::tests::on_finalize_should_work - should panic ... ok test dispatch::tests::on_initialize_should_work_1 - should panic ... ok test dispatch::tests::on_initialize_should_work_2 ... ok test dispatch::tests::weight_should_attach_to_call_enum ... ok test dispatch::tests::test_new_call_variant ... ok test dispatch::weight_tests::extract_actual_pays_fee_works ... ok test dispatch::weight_tests::extract_actual_weight_caps_at_pre_weight ... ok test dispatch::weight_tests::extract_actual_weight_works ... ok test hash::tests::test_blake2_128_concat ... ok test hash::tests::max_lengths ... ok test dispatch::weight_tests::weights_are_correct ... ok test hash::tests::test_twox_64_concat ... ok test dispatch::tests::on_runtime_upgrade_should_work ... ok test storage::bounded_btree_set::test::decode_len_works ... ok test storage::bounded_btree_map::test::decode_len_works ... ok test storage::generator::double_map::test_iterators::double_map_iter_from ... ok test storage::bounded_vec::test::decode_len_works ... ok test storage::generator::map::test_iterators::map_iter_from ... ok test storage::generator::double_map::test_iterators::double_map_reversible_reversible_iteration ... ok test storage::generator::nmap::test_iterators::n_map_double_map_identical_key ... ok test storage::generator::nmap::test_iterators::n_map_iter_from ... ok test storage::generator::map::test_iterators::map_reversible_reversible_iteration ... ok test storage::generator::nmap::test_iterators::n_map_reversible_reversible_iteration ... ok test storage::generator::tests::try_mutate_works ... ok test storage::generator::tests::value_translate_works ... ok test storage::migration::tests::test_move_pallet ... ok test storage::generator::tests::map_translate_works ... ok test storage::migration::tests::test_move_storage ... ok test storage::migration::tests::test_storage_iter ... ok test storage::migration::tests::test_move_prefix ... ok test storage::storage_noop_guard::tests::storage_noop_guard_does_not_double_panic - should panic ... ok test storage::storage_noop_guard::tests::storage_noop_guard_panics_on_changed - should panic ... ok test storage::storage_noop_guard::tests::storage_noop_guard_works_on_unchanged ... ok test storage::storage_noop_guard::tests::storage_noop_guard_works_on_changed_forget ... ok test storage::test::btree_set_append_and_decode_len_works ... ok test storage::storage_noop_guard::tests::storage_noop_guard_panics_on_early_drop - should panic ... ok test storage::test::digest_storage_append_works_as_expected ... ok test storage::test::child_trie_prefixed_map_works ... ok test storage::test::key_prefix_iterator_works ... ok test storage::test::prefix_iterator_pagination_works ... ok test storage::test::prefixed_map_works ... ok test storage::transactional::tests::in_storage_layer_works ... ok test storage::test::try_append_works ... ok test storage::transactional::tests::is_transactional_should_return_false ... ok test storage::transactional::tests::is_transactional_should_not_error_in_with_transaction ... ok test storage::types::counted_map::test::append_decode_len_works ... ok test storage::types::counted_map::test::migrate_keys_works ... ok test storage::types::counted_map::test::test_metadata ... ok test storage::types::counted_map::test::test_iter_drain_translate ... ok test storage::types::counted_map::test::test_iter_from ... ok test storage::types::counted_map::test::translate_values ... ok test storage::types::counted_map::test::test_option_query ... ok test storage::types::counted_map::test::test_value_query ... ok test storage::types::double_map::test::keylenof_works ... ok test storage::types::map::test::keylenof_works ... ok test storage::types::counted_map::test::try_append_decode_len_works ... ok test storage::types::map::test::test ... ok test storage::types::nmap::test::test_1_key ... ok test storage::transactional::tests::transaction_limit_should_work ... ok test storage::types::nmap::test::test_2_keys ... ok test storage::types::double_map::test::test ... ok test storage::types::value::test::test ... ok test tests::check_storage_parameter_type_works ... ok test storage::weak_bounded_vec::test::decode_len_works ... ok test tests::double_map_append_should_work ... ok test tests::double_map_basic_insert_remove_remove_prefix_should_work ... ok test tests::double_map_basic_insert_remove_remove_prefix_with_commit_should_work ... ok test storage::types::nmap::test::test_3_keys ... ok test tests::double_map_mutate_exists_should_work ... ok test tests::map_basic_insert_remove_should_work ... ok test tests::map_issue_3318 ... ok test tests::double_map_try_mutate_exists_should_work ... ok test tests::double_map_swap_works ... ok test tests::store_metadata ... ok test traits::dispatch::tests::either_of_diverse_works ... ok test traits::dispatch::tests::either_of_works ... ok test traits::filter::test_impl_filter_stack::guards_should_work ... ok test traits::filter::test_impl_filter_stack::impl_filter_stack_should_work ... ok test traits::hooks::tests::on_idle_round_robin_works ... ok test tests::storage_alias_works ... ok test traits::members::tests::match_types_works ... ok test traits::hooks::tests::on_initialize_and_on_runtime_upgrade_weight_merge_works ... ok test tests::map_iteration_should_work ... ok test traits::metadata::tests::check_storage_version_ordering ... ok test tests::map_swap_works ... ok test traits::misc::test::defensive_max_panics - should panic ... ok test traits::misc::test::defensive_max_works ... ok test traits::misc::test::defensive_min_works ... ok test traits::misc::test::defensive_min_panics - should panic ... ok test traits::misc::test::defensive_strict_max_works ... ok test traits::misc::test::defensive_strict_min_panics - should panic ... ok test traits::misc::test::defensive_strict_min_works ... ok test traits::misc::test::defensive_truncate_from_slice_works ... ok test traits::misc::test::defensive_truncate_from_vec_works ... ok test traits::misc::test::defensive_truncating_from_slice_defensive_panics - should panic ... ok test traits::misc::test::defensive_truncating_from_vec_defensive_panics - should panic ... ok test traits::misc::test::test_opaque_wrapper ... ok test traits::misc::test::test_keep_opaque_wrapper ... ok test traits::misc::test::defensive_strict_max_panics - should panic ... ok test traits::preimages::tests::bounded_size_is_correct ... ok test traits::preimages::tests::bounded_transmuting_works ... ok test traits::preimages::tests::bounded_basic_works ... ok test weights::block_weights::test_weights::sane ... ok test weights::extrinsic_weights::test_weights::sane ... ok test weights::paritydb_weights::constants::test_db_weights::sane ... ok test weights::rocksdb_weights::constants::test_db_weights::sane ... ok test traits::misc::test::test_opaque_wrapper_decode_limit ... ok test result: ok. 116 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s Running unittests src/lib.rs (target/debug/deps/frame_support_procedural-bc91f185680deb13) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/frame_support_procedural_tools-baac60e3223e92e4) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/frame_support_procedural_tools_derive-fc9cf0847c4d6da9) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/lib.rs (target/debug/deps/frame_support_test-7d578300123ea5a4) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/construct_runtime.rs (target/debug/deps/construct_runtime-b064866cab51cfa9) running 16 tests test __construct_runtime_integrity_test::runtime_integrity_tests ... ok test call_codec ... ok test call_compact_attr ... ok test call_subtype_conversion ... ok test call_weight_should_attach_to_call_enum ... ok test call_metadata ... ok test call_name ... ok test call_encode_is_correct_and_decode_works ... ok test get_call_names ... ok test integrity_test_works ... ok test get_module_names ... ok test origin_codec ... ok test event_codec ... ok test pallet_in_runtime_is_correct ... ok test check_modules_error_type ... ok test test_metadata ... ok test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/construct_runtime_ui.rs (target/debug/deps/construct_runtime_ui-a5b53a07cdf1c76f) running 1 test test ui ... ignored test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/decl_module_ui.rs (target/debug/deps/decl_module_ui-5c90c14534ecf229) running 1 test test decl_module_ui ... ignored test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/decl_storage.rs (target/debug/deps/decl_storage-c50ccd2f983acfc2) running 11 tests test test2::storage_info ... ok test test_append_and_len::default_for_option ... ok test test_append_and_len::append_overwrites_invalid_data ... ok test test_append_and_len::append_overwrites_default ... ok test test_append_and_len::append_works ... ok test test_append_and_len::len_works ... ok test tests::check_genesis_config ... ok test tests::storage_info ... ok test tests::store_metadata ... ok test tests::check_builder_config ... ok test test_append_and_len::len_works_ignores_default_assignment ... ok test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/decl_storage_ui.rs (target/debug/deps/decl_storage_ui-cb381f18c4eddf83) running 1 test test decl_storage_ui ... ignored test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/derive_no_bound.rs (target/debug/deps/derive_no_bound-f70bca901908641b) running 4 tests test runtime_debug_no_bound_display_correctly ... ok test test_enum ... FAILED test test_struct_unnamed ... FAILED test test_struct_named ... FAILED failures: ---- test_enum stdout ---- thread 'test_enum' panicked at 'assertion failed: `(left == right)` left: `"Enum::VariantUnnamed(1, 2, 3, PhantomData<(derive_no_bound::ImplNone, derive_no_bound::ImplNone)>)"`, right: `"Enum::VariantUnnamed(1, 2, 3, PhantomData)"`', frame/support/test/tests/derive_no_bound.rs:212:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ---- test_struct_unnamed stdout ---- thread 'test_struct_unnamed' panicked at 'assertion failed: `(left == right)` left: `"StructUnnamed(1, 2, 3, PhantomData<(derive_no_bound::ImplNone, derive_no_bound::ImplNone)>)"`, right: `"StructUnnamed(1, 2, 3, PhantomData)"`', frame/support/test/tests/derive_no_bound.rs:106:5 ---- test_struct_named stdout ---- thread 'test_struct_named' panicked at 'assertion failed: `(left == right)` left: `"StructNamed { a: 1, b: 2, c: 3, phantom: PhantomData<(derive_no_bound::ImplNone, derive_no_bound::ImplNone)> }"`, right: `"StructNamed { a: 1, b: 2, c: 3, phantom: PhantomData }"`', frame/support/test/tests/derive_no_bound.rs:73:5 failures: test_enum test_struct_named test_struct_unnamed test result: FAILED. 1 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s error: test failed, to rerun pass `-p frame-support-test --test derive_no_bound` ```
lexnv commented 1 year ago

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.

bkchr commented 1 year ago

I answered this on stackexchange: https://substrate.stackexchange.com/questions/6144/computer-crashing-on-cargo-test/6145#6145