1043nd v1 and 1.11

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

kabi
Posts: 29
Joined: Thu Aug 28, 2014 5:33 am

1043nd v1 and 1.11

Postby kabi » Sun Jun 23, 2019 4:57 pm

Hello

I've been testing 1.11 with 1043nd v1.
So here are few comments.

Upgrade 1.10 -> 1.11 requires to erase all configuration and set things again - reusing old config doesn't work and messes system.
This is likely well know and advertise issue - but just saying...
(Since I'd like to preserve some DHCP setting and I do not really see a big deal in presering these type of settings)

Good point:

1.11 and WiFi seems to be finaly stable with new kernel - I've not needed to run 'wifi' command from cron to avoid occasional slowdowns.

Bad points:

Configuring USB printing becomes a big problem - which I've not been able to resolve (and it's reason to go back to 1.10).
Configuration of plug-ins and their usage is likely beyond beind simple - with 1.10 there was a menu in GUI - with 1.11 there is only something for USB storage.

Now major BIG problem - it does look like new system over the time leaks/fragments memory and it leads to memory allocation troubles the can make router unusable in a while:

Code: Select all

[185326.811190] swapper: page allocation failure: order:0, mode:0x2080120(GFP_ATOMIC|__GFP_COLD)
[185326.819872] CPU: 0 PID: 0 Comm: swapper Not tainted 4.9.156 #0
[185326.825824] Stack : 804c76c2 00000032 00000000 00000001 80455604 80455267 804096c8 00000000
[185326.834403]         804c3800 00000001 00000001 819bc800 80000000 800a96bc fffffff0 8050e85c
[185326.842956]         00000000 80296420 8040d16c 81809d14 81809d44 800d786c 81d84e40 0004099c
[185326.851511]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[185326.860066]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[185326.868629]         ...
[185326.871185] Call Trace:
[185326.873745] [<8006b220>] show_stack+0x70/0x8c
[185326.878261] [<800e0940>] warn_alloc+0xe0/0x10c
[185326.882832] [<800e0d74>] __alloc_pages_nodemask+0x384/0x9ac
[185326.888548] [<800e1520>] page_frag_alloc+0x74/0x16c
[185326.893546] [<8026b75c>] ag71xx_fill_rx_buf+0x3c/0xe0
[185326.898731] [<8026c97c>] ag71xx_poll+0x308/0x4bc
[185326.903477] [<80293e40>] net_rx_action+0x138/0x2d4
[185326.908405] [<80082c6c>] __do_softirq+0x164/0x294
[185326.913233] [<801ef088>] plat_irq_dispatch+0xf8/0x110
[185326.918431] [<80066358>] handle_int+0x138/0x144
[185326.923079] [<800661e0>] __r4k_wait+0x20/0x40
[185326.927557] [<800a4508>] cpu_startup_entry+0xa8/0xe0
[185326.932680] [<80479b90>] start_kernel+0x444/0x464
[185326.937498] Mem-Info:
[185326.939921] active_anon:321 inactive_anon:11 isolated_anon:0
[185326.939921]  active_file:810 inactive_file:339 isolated_file:0
[185326.939921]  unevictable:0 dirty:0 writeback:0 unstable:0
[185326.939921]  slab_reclaimable:199 slab_unreclaimable:1679
[185326.939921]  mapped:504 shmem:36 pagetables:50 bounce:0
[185326.939921]  free:96 free_pcp:0 free_cma:0
[185326.972195] Node 0 active_anon:1284kB inactive_anon:44kB active_file:3240kB inactive_file:1356kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:2016kB dirty:0kB writeback:0kB shmem:144kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? yes
[185326.996333] Normal free:384kB min:1024kB low:1280kB high:1536kB active_anon:1284kB inactive_anon:44kB active_file:3240kB inactive_file:1356kB unevictable:0kB writepending:0kB present:32768kB managed:27636kB mlocked:0kB slab_reclaimable:796kB slab_unreclaimable:6716kB kernel_stack:336kB pagetables:200kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 0
[185327.031214] Normal: 4*4kB (UM) 2*8kB (UM) 16*16kB (U) 3*32kB (U) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 384kB
1185 total pagecache pages
[185327.045711] 0 pages in swap cache
[185327.049141] Swap cache stats: add 0, delete 0, find 0/0
[185327.054480] Free swap  = 0kB
[185327.057462] Total swap = 0kB
[185327.060456] 8192 pages RAM
[185327.063261] 0 pages HighMem/MovableOnly
[185327.067201] 1283 pages reserved
[185327.070619] eth0: out of memory
[185327.079465] ksoftirqd/0: page allocation failure: order:0, mode:0x2080020(GFP_ATOMIC)
[185327.087481] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.9.156 #0
[185327.093781] Stack : 804c76c2 00000036 00000000 00000000 8182cd04 80455267 804096c8 00000003
[185327.102332]         804c3800 00000001 8074d018 816654b0 81882038 800a96bc 8036610c 8029282c
[185327.110878]         0000001a 806cab40 8040d16c 81841b9c 80450000 800d786c 80460000 00000000
[185327.119424]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[185327.127969]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


eventually

Code: Select all

[174582.088838] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[174582.098334] device wlan0 left promiscuous mode
[174582.103058] br-lan: port 2(wlan0) entered disabled state
[174583.451143] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[174583.583496] eth0: link down
[174628.583265] netifd: page allocation failure: order:2, mode:0x2081020(GFP_ATOMIC|__GFP_NORETRY)
[174628.592123] CPU: 0 PID: 6699 Comm: netifd Not tainted 4.9.156 #0
[174628.598275] Stack : 804c76c2 00000034 00000000 00000001 8192b6c4 80455267 804096c8 00001a2b
[174628.606845]         804c3800 00000001 80d0a320 00000000 00000000 800a96bc 81892ef8 8009d42c
[174628.615408]         00000000 00000000 8040d16c 811abba4 00000000 800d786c 81907e88 00000001
[174628.623953]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[174628.632516]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[174628.641080]         ...
[174628.643637] Call Trace:
[174628.646213] [<8006b220>] show_stack+0x70/0x8c
[174628.650717] [<800e0940>] warn_alloc+0xe0/0x10c
[174628.655305] [<800e0d74>] __alloc_pages_nodemask+0x384/0x9ac
[174628.661014] [<8007124c>] mips_dma_alloc_coherent+0x174/0x1d8
[174628.666825] [<8026d9f0>] ag71xx_hw_enable+0x25c/0x2fc
[174628.672004] [<8026db44>] ag71xx_open+0x5c/0x98
[174628.676598] [<80296f68>] __dev_open+0x128/0x140
[174628.681249] [<80297210>] __dev_change_flags+0xb4/0x178
[174628.686528] [<802972fc>] dev_change_flags+0x28/0x70
[174628.691547] [<802afc74>] dev_ifsioc+0x1bc/0x314
[174628.696218] [<802b00f0>] dev_ioctl+0x324/0x6d4
[174628.700799] [<8012d194>] vfs_ioctl+0x28/0x40
[174628.705200] Mem-Info:
[174628.707605] active_anon:440 inactive_anon:10 isolated_anon:0
[174628.707605]  active_file:1255 inactive_file:671 isolated_file:0
[174628.707605]  unevictable:0 dirty:0 writeback:0 unstable:0
[174628.707605]  slab_reclaimable:321 slab_unreclaimable:1537
[174628.707605]  mapped:124 shmem:33 pagetables:69 bounce:0
[174628.707605]  free:340 free_pcp:0 free_cma:0
[174628.740058] Node 0 active_anon:1760kB inactive_anon:40kB active_file:5020kB inactive_file:2684kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:496kB dirty:0kB writeback:0kB shmem:132kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? no
[174628.764028] Normal free:1360kB min:1024kB low:1280kB high:1536kB active_anon:1760kB inactive_anon:40kB active_file:5020kB inactive_file:2684kB unevictable:0kB writepending:0kB present:32768kB managed:27636kB mlocked:0kB slab_reclaimable:1284kB slab_unreclaimable:6148kB kernel_stack:424kB pagetables:276kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 0
[174628.799070] Normal: 336*4kB (UME) 2*8kB (U) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1360kB
1972 total pagecache pages
[174628.813035] 0 pages in swap cache
[174628.816469] Swap cache stats: add 0, delete 0, find 0/0
[174628.821804] Free swap  = 0kB
[174628.824800] Total swap = 0kB
[174628.827786] 8192 pages RAM
[174628.830594] 0 pages HighMem/MovableOnly
[174628.834551] 1283 pages reserved
[174629.451107] br-lan: port 1(eth0.1) entered blocking state
[174629.456720] br-lan: port 1(eth0.1) entered disabled state
[174629.462733] device eth0.1 entered promiscuous mode
[174629.470238] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[174672.145164] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[174672.167877] br-lan: port 2(wlan0) entered blocking state
[174672.173328] br-lan: port 2(wlan0) entered disabled state
[174672.179337] device wlan0 entered promiscuous mode
[174673.056713] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[174673.063393] br-lan: port 2(wlan0) entered blocking state
[174673.068895] br-lan: port 2(wlan0) entered forwarding state
[174673.076838] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready


So basically router required every 2-3 days reboot - I've not been able to figure out what exactly was behind the leak - either logging via ssh, or using GUI, or too much traffic...

I've also wanted to try build 1.11.X out of this page:
https://lantisproject.com/downloads/gargoyle_ispyisail.php

Using upgrade via 'GUI' no longer worked - I've been still getting 1.11.0 after reboot.

Later on I've wanted to try to upload file into /tmp - this also had some troubles - finally using USB stick let my see gargoyle sysupgrade.bin file in /tmp/usb_mount subdirectory.

So I've been able to upgrade to 1.11.X which was then printed on main page - however system felt really slow - like if it would be swapping (kswapd was visible in top) - anyway didn't want to stress this any futher and tried to go to back to 1.10.

This was again problematic process - and again only 'ssh logged-in' execution of 'sysupgrade' tool made it work.
Then I'd to 'reset to default' config before restoring saved configuration - as without this 'extra' step WiFi on 1.10 seemed to not work properly (although SSID was visible).
Finally I've back 1.10 + USB Printer + less stable Wifi :) - but assuming not leaking running image.

Lantis
Moderator
Posts: 5166
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: 1043nd v1 and 1.11

Postby Lantis » Sun Jun 23, 2019 5:15 pm

The low RAM on the device is leading to the instability and issues. It is a well known issue and more than 32MB of RAM is recommended.
The only plugin initially available is the USB plugin to allow you to setup external storage and a RAM swap drive to try and increase stability. This may not be 100% effective in all cases.

Ultimately, software moves forwards and with it the underlying hardware requirements. You might consider a hardware upgrade as your next move. I don't recommend 1.10.x anymore due to several security vulnerabilities in the kernel and Wi-Fi stack.

For large changes between firmware versions we don't support preserving settings. They aren't compatible.
And adventurous user might manually restore parts of the config.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

kabi
Posts: 29
Joined: Thu Aug 28, 2014 5:33 am

Re: 1043nd v1 and 1.11

Postby kabi » Sun Jun 23, 2019 5:54 pm

Lantis wrote:The low RAM on the device is leading to the instability and issues. It is a well known issue and more than 32MB of RAM is recommended.


The only plugin initially available is the USB plugin to allow you to setup external storage and a RAM swap drive to try and increase stability. This may not be 100% effective in all cases.


I don't think there was problem with FREE RAM after reboot - there was like 7MiB free - it is related to fragmentation of kernel memory and strange high-order allocation (requirement to have larger amount of kernel pages free consequently - I'd probably even bet the later/newer kernel might have already fixed this issue).

If it's the result of kernel slowly leaking memory - I don't know - I don't have kernel debug environment for this devel and I'm only familiar with hunting these issues on upstream kernels on my laptop (enabling kernel with kmemleak - but this clearly requires big portion of memory in machine)

This memory status was printed when these messages appeared in kernel log:
Mem: 23788K used, 3848K free, 144K shrd, 2184K buff, 3316K cached

I'd say kernel 4.9 is rather ancient - so probably full of such memory bugs - I don't quite understand why there is such a big 'jump' between upstream and 'newly used' openwrt kernels :(.


Lantis wrote:Ultimately, software moves forwards and with it the underlying hardware requirements. You might consider a hardware upgrade as your next move. I don't recommend 1.10.x anymore due to several security vulnerabilities in the kernel and Wi-Fi stack.


Buying new router is tricky - I already do have deployed DIR882 :) which is FAST amazingly - but is missing key things - USB printing and SSH acess.

It does seem like TP-LINK ArcherC7 currently could look in the country of blind as one-eyed king - but poor performer compared to DIR882 with its MU-MIMO 4x4... (which on the other hand only works with DD-WRT alternative and unlike official dLink firmware it's not 100% stable and it does not support USB printers.)

Lantis wrote:For large changes between firmware versions we don't support preserving settings. They aren't compatible.
And adventurous user might manually restore parts of the config.

I know - it's just sad part of upgrade - most of my config settings should be pretty simple to forward upwards - so I don't much understand why such simple config can' t survive....

kabi
Posts: 29
Joined: Thu Aug 28, 2014 5:33 am

Re: 1043nd v1 and 1.11

Postby kabi » Sun Jun 23, 2019 5:58 pm

Lantis wrote:The only plugin initially available is the USB plugin to allow you to setup external storage and a RAM swap drive to try and increase stability. This may not be 100% effective in all cases.


Hmm I've installed USB printer plugin (it's been enabled & installed in plugin section)

But it's been not working - so I don't know if I'd have to enable something somewhere to make it working again ??

Why it did not work after enabling ?
(on 1.10 there is even USB Printer menu in HTML GUI - with 1.11 there was only USB storage)

Also do I have to make anything special to enable zRAM with 1.11 ?

Lantis
Moderator
Posts: 5166
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: 1043nd v1 and 1.11

Postby Lantis » Sun Jun 23, 2019 11:33 pm

Did you install it on an external plugin root?
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

kabi
Posts: 29
Joined: Thu Aug 28, 2014 5:33 am

Re: 1043nd v1 and 1.11

Postby kabi » Mon Jun 24, 2019 2:48 am

Lantis wrote:Did you install it on an external plugin root?


Unsure what is the question here - I've selected plugin to install - clicked on the button and got it installed.

After reboot plugin 'stayed' installed with the checkbox present - so I've lived with assumption 'it's done'.

So do I need to do anything more to get it working ?

Is there specific guide to follow?

ispyisail
Moderator
Posts: 4700
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: 1043nd v1 and 1.11

Postby ispyisail » Mon Jun 24, 2019 2:57 am

Image

kabi
Posts: 29
Joined: Thu Aug 28, 2014 5:33 am

Re: 1043nd v1 and 1.11

Postby kabi » Mon Jun 24, 2019 3:10 am

Ohh - that you mean - no I've not used disk as external storage - mainly because my primary plan is to use the only single USB2.0 connector available on my 1043nd to connect the printer.

So with 1.11 there is no longer plan to support plugins (at least USB printing) without external space ??

I can purely theoretically imagine using some USB hub to attach both, but it's surely not the path I'd take.

Isn't there some Docker or other sort of VM image I'd download and easily use to build my own version with this printing included and maybe dropping something else instead?

ispyisail
Moderator
Posts: 4700
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: 1043nd v1 and 1.11

Postby ispyisail » Mon Jun 24, 2019 4:37 am

So with 1.11 there is no longer plan to support plugins (at least USB printing) without external space ??


They tired real hard to make space but in the end openwrt got to big.

You need a router with more RAM and More Flash for the latest version of Gargoyle.

If your not concerned about router security just use an old version of gargoyle.

ispyisail
Moderator
Posts: 4700
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: 1043nd v1 and 1.11

Postby ispyisail » Mon Jun 24, 2019 4:41 am

Isn't there some Docker or other sort of VM image I'd download and easily use to build my own version with this printing included and maybe dropping something else instead?


If you want to go down this path you might find OpenWRT firmware and easier option.

Custom Gargoyle is no small task.


Return to “Gargoyle Development”

Who is online

Users browsing this forum: No registered users and 1 guest