Rpi - Model B - keeps rebooting ( ext4 mount )

Hi Nerves-users! :slight_smile:
Started playing with the eco-system, simple examples are working such as blinky, hello_erlang.

However more advanced ones such as hello_live_view keep going into a reboot-loop, output from minicom:

[    3.333699] EXT4-fs (mmcblk0p3): VFS: Can't find ext4 filesystem
[    3.336497] erlinit: Cannot mount /dev/mmcblk0p3 at /root: Invalid argument

How can we fix this?
One approach would formatting the third partition as ext4 from linux - to make sure it does not have to be done on the raspberry-pi?

As this is a model B - I am assuming everything runs a bit slower.

Any tips are appreciated,
Kind regards,
Fabian

I formatted the 3-partition from linux, so it passes that point. Now however I am getting an out of memory. Maybe I need to reconfigure ( raspiconfig ) the amount of memory I was reserving for the camera?

PS: Is there anyway to this from nerves - or config?

Output from minicom:

erlinit: The hostname is 'nerves-000000008b98465c'.
[    3.642161] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[    3.642216] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.646951] smsc95xx v2.0.0
[    3.942864] SMSC LAN8700 usb-001:003:01: attached PHY driver (mii_bus:phy_addr=usb-001:003:01, irq=160)
[    3.949485] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:98:46:5c
[   75.501653] erts_dcpus_1 invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=0
[   75.501727] CPU: 0 PID: 71 Comm: erts_dcpus_1 Not tainted 6.6.51-rt44 #1
[   75.501750] Hardware name: BCM2835
[   75.501773]  unwind_backtrace from show_stack+0x10/0x14
[   75.501846]  show_stack from dump_stack_lvl+0x24/0x3c
[   75.501911]  dump_stack_lvl from dump_header+0x48/0x1c8
[   75.501951]  dump_header from oom_kill_process+0x230/0x250
[   75.501988]  oom_kill_process from out_of_memory+0xe8/0x340
[   75.502016]  out_of_memory from __alloc_pages+0x7dc/0xb90
[   75.502066]  __alloc_pages from handle_mm_fault+0x648/0xe4c
[   75.502118]  handle_mm_fault from do_page_fault+0x14c/0x290
[   75.502152]  do_page_fault from do_DataAbort+0x38/0xb0
[   75.502180]  do_DataAbort from __dabt_usr+0x50/0x60
[   75.502206] Exception stack(0xc4b55fb0 to 0xc4b55ff8)
[   75.502229] 5fa0:                                     000002ff b3cb4210 00000000 b287f018
[   75.502252] 5fc0: b3cb4211 b2920ea4 007c34c0 00000000 b2921000 0138bfc8 b274803c 00000000
[   75.502272] 5fe0: b2920ea8 b4241aa0 0156c1f8 0062058c 60000010 ffffffff
[   75.502285] Mem-Info:
[   75.502296] active_anon:2 inactive_anon:11378 isolated_anon:0
[   75.502296]  active_file:12 inactive_file:23 isolated_file:0
[   75.502296]  unevictable:0 dirty:0 writeback:0
[   75.502296]  slab_reclaimable:253 slab_unreclaimable:1126
[   75.502296]  mapped:0 shmem:1 pagetables:65
[   75.502296]  sec_pagetables:0 bounce:0
[   75.502296]  kernel_misc_reclaimable:0
[   75.502296]  free:255 free_pcp:12 free_cma:0
[   75.502340] Node 0 active_anon:8kB inactive_anon:45512kB active_file:48kB inactive_file:92kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0ks
[   75.502380] Normal free:1020kB boost:4096kB min:5040kB low:5276kB high:5512kB reserved_highatomic:0KB active_anon:8kB inactive_anon:45512kB active_file:48kB inactive_file:92kB unevB
[   75.502429] lowmem_reserve[]: 0 0
[   75.502453] Normal: 35*4kB (UM) 22*8kB (UM) 10*16kB (U) 11*32kB (U) 1*64kB (U) 1*128kB (U) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1020kB
[   75.502570] 36 total pagecache pages
[   75.502577] 0 pages in swap cache
[   75.502584] Free swap  = 0kB
[   75.502591] Total swap = 0kB
[   75.502598] 16384 pages RAM
[   75.502605] 0 pages HighMem/MovableOnly
[   75.502611] 2389 pages reserved
[   75.502618] 2048 pages cma reserved
[   75.502625] Tasks state (memory values in pages):
[   75.502632] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[   75.502666] [     54]     0    54      466       18     8192        0             0 nbtty
[   75.502695] [     62]     0    62     1547       90    12288        0             0 rngd
[   75.502718] [     64]     0    64      466       18     8192        0             0 nbtty
[   75.502742] [     65]     0    65    23504    11203    81920        0             0 beam.smp
[   75.502766] [     69]     0    69      499       19     8192        0             0 erl_child_setup
[   75.502790] [     84]     0    84      467       18     6144        0             0 heart
[   75.502812] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),global_oom,task_memcg=/,task=beam.smp,pid=65,uid=0
[   75.503009] Out of memory: Killed process 65 (beam.smp) total-vm:94016kB, anon-rss:44812kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:80kB oom_score_adj:0
[   75.503870] erts_dcpus_1: page allocation failure: order:0, mode:0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), nodemask=(null)
[   75.503931] CPU: 0 PID: 71 Comm: erts_dcpus_1 Not tainted 6.6.51-rt44 #1
[   75.503953] Hardware name: BCM2835
[   75.503969]  unwind_backtrace from show_stack+0x10/0x14
[   75.504025]  show_stack from dump_stack_lvl+0x24/0x3c
[   75.504087]  dump_stack_lvl from warn_alloc+0xd4/0x16c
[   75.504142]  warn_alloc from __alloc_pages+0x814/0xb90
[   75.504182]  __alloc_pages from handle_mm_fault+0x648/0xe4c
[   75.504230]  handle_mm_fault from do_page_fault+0x14c/0x290
[   75.504266]  do_page_fault from do_DataAbort+0x38/0xb0
[   75.504294]  do_DataAbort from __dabt_usr+0x50/0x60
[   75.504319] Exception stack(0xc4b55fb0 to 0xc4b55ff8)
[   75.504341] 5fa0:                                     000002ff b3cb4210 00000000 b287f018
[   75.504363] 5fc0: b3cb4211 b2920ea4 007c34c0 00000000 b2921000 0138bfc8 b274803c 00000000
[   75.504384] 5fe0: b2920ea8 b4241aa0 0156c1f8 0062058c 60000010 ffffffff
[   75.504397] Mem-Info:
[   75.504403] active_anon:2 inactive_anon:11378 isolated_anon:0
[   75.504403]  active_file:12 inactive_file:23 isolated_file:0
[   75.504403]  unevictable:0 dirty:0 writeback:0
[   75.504403]  slab_reclaimable:253 slab_unreclaimable:1126
[   75.504403]  mapped:0 shmem:1 pagetables:65
[   75.504403]  sec_pagetables:0 bounce:0
[   75.504403]  kernel_misc_reclaimable:0
[   75.504403]  free:255 free_pcp:12 free_cma:0
[   75.504449] Node 0 active_anon:8kB inactive_anon:45512kB active_file:48kB inactive_file:92kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0ks
[   75.504487] Normal free:1020kB boost:4096kB min:5040kB low:5276kB high:5512kB reserved_highatomic:0KB active_anon:8kB inactive_anon:45512kB active_file:48kB inactive_file:92kB unevB
[   75.504532] lowmem_reserve[]: 0 0
[   75.504554] Normal: 35*4kB (UM) 22*8kB (UM) 10*16kB (U) 11*32kB (U) 1*64kB (U) 1*128kB (U) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1020kB
[   75.504667] 36 total pagecache pages
[   75.504675] 0 pages in swap cache
[   75.504682] Free swap  = 0kB
[   75.504689] Total swap = 0kB
[   75.504695] 16384 pages RAM
[   75.504703] 0 pages HighMem/MovableOnly
[   75.504709] 2389 pages reserved
[   75.504716] 2048 pages cma reserved
[   75.507302] SQUASHFS error: Failed to read block 0x12db8a6: -12
[   76.521499] heart: Erlang has closed.

Sorry for the verbose output! :wink:

Quick update on this.

I had GPU-MEM at 192 which seems to be the default for old model B.

Following the guide here ( Advanced Configuration — Nerves v1.5.4 ) i altered the GPU_MEM to 64 which now gives enough memory for the system to boot and run smoothly.

Hope this helps people in the future - who are faced with similar issues.

Kind regards,

Fabian

3 Likes