Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2343 - /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section ' #7225

Closed
openwrt-bot opened this issue Jun 27, 2019 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

vdemtcev:

1) Device problem occurs on: MikroTik RouterBOARD wAP R-2nD

2) Software versions of OpenWrt/LEDE release, packages, etc.

root@OpenWrt:/tmp# cat /etc/openwrt_release DISTRIB_ID='OpenWrt' DISTRIB_RELEASE='SNAPSHOT' DISTRIB_REVISION='r10243-4d11c4c378' DISTRIB_TARGET='ar71xx/mikrotik' DISTRIB_ARCH='mips_24kc' DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r10243-4d11c4c378' DISTRIB_TAINTS=''

and more info

BusyBox v1.31.0 () built-in shell (ash)

| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|
_____|| |
||||___||| |____|
|
| W I R E L E S S F R E E D O M

OpenWrt SNAPSHOT, r10243-4d11c4c378

root@OpenWrt:# opkg update
Downloading http://downloads.openwrt.org/snapshots/targets/ar71xx/mikrotik/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/snapshots/targets/ar71xx/mikrotik/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/targets/ar71xx/mikrotik/kmods/4.14.125-1-a97bc8b33be51b9770ae41a525e3975e/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_kmods
Downloading http://downloads.openwrt.org/snapshots/targets/ar71xx/mikrotik/kmods/4.14.125-1-a97bc8b33be51b9770ae41a525e3975e/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/routing/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/telephony/Packages.sig
Signature check passed.
root@OpenWrt:
# opkg install luci
Installing luci (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci_git-19.178.17489-b1c218b-1_all.ipk
Installing libjson-c4 (0.13.1-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/libjson-c4_0.13.1-1_mips_24kc.ipk
Installing uhttpd (2019-06-16-91fcac34-3) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/uhttpd_2019-06-16-91fcac34-3_mips_24kc.ipk
Installing liblua5.1.5 (5.1.5-3) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/liblua5.1.5_5.1.5-3_mips_24kc.ipk
Installing lua (5.1.5-3) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/lua_5.1.5-3_mips_24kc.ipk
Installing luci-lib-nixio (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-lib-nixio_git-19.178.17489-b1c218b-1_mips_24kc.ipk
Installing luci-lib-ip (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-lib-ip_git-19.178.17489-b1c218b-1_mips_24kc.ipk
Installing rpcd (2019-06-05-89bfaa42-2) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/rpcd_2019-06-05-89bfaa42-2_mips_24kc.ipk
Installing libubus-lua (2018-10-06-221ce7e7-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/libubus-lua_2018-10-06-221ce7e7-1_mips_24kc.ipk
Installing luci-lib-jsonc (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-lib-jsonc_git-19.178.17489-b1c218b-1_mips_24kc.ipk
Installing liblucihttp0 (2019-06-05-91c01c3c-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/liblucihttp0_2019-06-05-91c01c3c-1_mips_24kc.ipk
Installing liblucihttp-lua (2019-06-05-91c01c3c-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/liblucihttp-lua_2019-06-05-91c01c3c-1_mips_24kc.ipk
Installing luci-base (f138fc93-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-base_f138fc93-1_mips_24kc.ipk
Installing libiwinfo-lua (2019-06-12-1372f47e-1) to root...
Downloading http://downloads.openwrt.org/snapshots/targets/ar71xx/mikrotik/packages/libiwinfo-lua_2019-06-12-1372f47e-1_mips_24kc.ipk
Installing luci-mod-status (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-mod-status_git-19.178.17489-b1c218b-1_mips_24kc.ipk
Installing luci-mod-system (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-mod-system_git-19.178.17489-b1c218b-1_all.ipk
Installing luci-mod-network (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-mod-network_git-19.178.17489-b1c218b-1_all.ipk
Installing luci-mod-admin-full (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-mod-admin-full_git-19.178.17489-b1c218b-1_all.ipk
Installing luci-theme-bootstrap (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-theme-bootstrap_git-19.178.17489-b1c218b-1_all.ipk
Installing luci-app-firewall (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-app-firewall_git-19.178.17489-b1c218b-1_all.ipk
Installing luci-app-opkg (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-app-opkg_git-19.178.17489-b1c218b-1_all.ipk
Installing luci-proto-ppp (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-proto-ppp_git-19.178.17489-b1c218b-1_all.ipk
Installing luci-proto-ipv6 (git-19.178.17489-b1c218b-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-proto-ipv6_git-19.178.17489-b1c218b-1_all.ipk
Installing rpcd-mod-rrdns (20170710) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/rpcd-mod-rrdns_20170710_mips_24kc.ipk
... many logs ...

root@OpenWrt:~# logread -f -l 100 ... many logs ... Thu Jun 27 17:55:13 2019 user.notice ucitrack: Setting up /etc/config/system reload trigger for non-procd /etc/init.d/led Thu Jun 27 17:55:13 2019 user.notice ucitrack: Setting up /etc/config/system reload dependency on /etc/config/luci_statistics Thu Jun 27 17:55:13 2019 user.notice ucitrack: Setting up /etc/config/system reload dependency on /etc/config/dhcp Thu Jun 27 17:55:24 2019 kern.info kernel: [ 214.558530] do_page_fault(): sending SIGSEGV to rpcd for invalid read access from 00000020 Thu Jun 27 17:55:24 2019 kern.info kernel: [ 214.567151] epc = 77e4f463 in libjson-c.so.4.0.0[77e4c000+19000] Thu Jun 27 17:55:24 2019 kern.info kernel: [ 214.573397] ra = 77e69079 in libblobmsg_json.so[77e68000+11000]

Now we try login into luci

Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: luci: failed login on / for root from 10.50.50.254 Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main' Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: stack traceback: Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: [C]: in function 'assert' Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch' Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:144: in function Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main' Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: stack traceback: Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: [C]: in function 'assert' Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch' Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:144: in function

3) Steps to reproduce
We use http://downloads.openwrt.org/snapshots/targets/ar71xx/mikrotik/openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin on MikroTik RouterBOARD wAP R-2nD
After install luci and login to web interface we have an error:

/usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main' stack traceback: [C]: in function 'assert' /usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:144: in function

and error log on device:

Thu Jun 27 17:55:24 2019 kern.info kernel: [ 214.558530] do_page_fault(): sending SIGSEGV to rpcd for invalid read access from 00000020 Thu Jun 27 17:55:24 2019 kern.info kernel: [ 214.567151] epc = 77e4f463 in libjson-c.so.4.0.0[77e4c000+19000] Thu Jun 27 17:55:24 2019 kern.info kernel: [ 214.573397] ra = 77e69079 in libblobmsg_json.so[77e68000+11000] Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: luci: failed login on / for root from 10.50.50.254 Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main' Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: stack traceback: Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: [C]: in function 'assert' Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch' Thu Jun 27 17:55:54 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:144: in function

Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main'
Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: stack traceback:
Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: [C]: in function 'assert'
Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch'
Thu Jun 27 17:57:51 2019 daemon.err uhttpd[2502]: /usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>

it is NOT a Luci problem! Bug in 'rpcd' (but you read it like Bug in 'libjson-c.so.4.0.0' and 'libblobmsg_json.so')

Dancing with a tambourine like 'ln -s libjson-c.so.4.0.0 libjson-c.so.2' do nothing, cuz:

root@OpenWrt:/usr/lib# ls -la | grep libjs lrwxrwxrwx 1 root root 18 Jun 17 04:53 libjson-c.so.2 -> libjson-c.so.2.0.2 -rwxr-xr-x 1 root root 29208 Jun 17 04:53 libjson-c.so.2.0.2 lrwxrwxrwx 1 root root 18 Jun 17 04:55 libjson-c.so.4 -> libjson-c.so.4.0.0 -rwxr-xr-x 1 root root 41752 Jun 26 05:41 libjson-c.so.4.0.0

And what we do? Maybe someone know how fix it?

@openwrt-bot
Copy link
Author

vdemtcev:

Reference in Luci repo - openwrt/luci#2799

@openwrt-bot
Copy link
Author

ynezz:

As we don't build images for ar71xx anymore for snapshots (since July 16th?), so the packages are not rebuilt either. In order to fix this problem, we would probably need to trigger rebuild of the rpcd package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant