Modify

Opened 6 years ago

Last modified 21 months ago

#10743 new defect

opkg remove --autoremove package luci-app-statistics breaks luci

Reported by: camden lindsay <camden.lindsay+openwrt@…> Owned by:
Priority: normal Milestone: Barrier Breaker 14.07
Component: luci Version: Trunk
Keywords: Cc: camden.lindsay+openwrt@…

Description

after installing package statistics to play with, I decided to remove it using:
opkg remove --autoremove luci-app-statistics

Once this is done, i receive the following traceback when trying to log in via luci

.../luci/controller/luci_statistics/luci_statistics.lua:22: module 'luci.statistics.datatree' not found:

no field package.preloadluci.statistics.datatree?
no file './luci/statistics/datatree.lua'
no file '/usr/share/lua/luci/statistics/datatree.lua'
no file '/usr/share/lua/luci/statistics/datatree/init.lua'
no file '/usr/lib/lua/luci/statistics/datatree.lua'
no file '/usr/lib/lua/luci/statistics/datatree/init.lua'
no file './luci/statistics/datatree.so'
no file '/usr/lib/lua/luci/statistics/datatree.so'
no file '/usr/lib/lua/loadall.so'
no file './luci.so'
no file '/usr/lib/lua/luci.so'
no file '/usr/lib/lua/loadall.so'

stack traceback:

[C]: in function 'require'
.../luci/controller/luci_statistics/luci_statistics.lua:22: in function 'v'
/usr/lib/lua/luci/dispatcher.lua:586: in function 'createtree'
/usr/lib/lua/luci/dispatcher.lua:230: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>

Attachments (0)

Change History (9)

comment:1 Changed 6 years ago by jow

Try rm /tmp/luci-indexcache or a powercycle.

comment:2 Changed 6 years ago by camden lindsay <camden.lindsay+openwrt@…>

Verified that both reboot and rm of /tmp/luci-indexcache fixed this issue.
Should there perhaps be a hook to remove /tmp/luci-indexcache every time a luci-app-* is added or removed?

Thanks!

comment:3 Changed 6 years ago by jow

Yeah, actually the cache is supposed to be refreshed automatically but I've no idea yet why it didn't happen. Was the system time in sync when you did the uninstall?

comment:4 Changed 6 years ago by camden lindsay <camden.lindsay+openwrt@…>

Believe so. here, let me do it again and post the output to a couple of things..
Looks like /tmp/luci-indexcache is definitely not being removed!

root@buffalo:~# date
Fri Jan 6 09:44:52 PST 2012
root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 54896 Jan 6 09:41 /tmp/luci-indexcache
root@buffalo:~# opkg install luci-app-statistics
Installing luci-app-statistics (trunk+svn8147-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-app-statistics_trunk+svn8147-1_ar71xx.ipk.
Installing collectd (4.10.2-5) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/collectd_4.10.2-5_ar71xx.ipk.
Installing zlib (1.2.5-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/zlib_1.2.5-1_ar71xx.ipk.
Installing libltdl (2.4-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libltdl_2.4-1_ar71xx.ipk.
Installing rrdtool1 (1.0.50-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/rrdtool1_1.0.50-1_ar71xx.ipk.
Installing librrd1 (1.0.50-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/librrd1_1.0.50-1_ar71xx.ipk.
Installing collectd-mod-rrdtool (4.10.2-5) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/collectd-mod-rrdtool_4.10.2-5_ar71xx.ipk.
Installing collectd-mod-iwinfo (4.10.2-5) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/collectd-mod-iwinfo_4.10.2-5_ar71xx.ipk.
Installing collectd-mod-interface (4.10.2-5) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/collectd-mod-interface_4.10.2-5_ar71xx.ipk.
Installing collectd-mod-load (4.10.2-5) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/collectd-mod-load_4.10.2-5_ar71xx.ipk.
Configuring zlib.
Configuring libltdl.
Configuring collectd.
Configuring librrd1.
Configuring rrdtool1.
Configuring collectd-mod-rrdtool.
Configuring collectd-mod-iwinfo.
Configuring collectd-mod-interface.
Configuring collectd-mod-load.
Configuring luci-app-statistics.
root@buffalo:~# ls -l /tmp/luci-indexcache
ls: /tmp/luci-indexcache: No such file or directory
root@buffalo:~# ls -l /tmp/luci-indexcache
ls: /tmp/luci-indexcache: No such file or directory
root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 71139 Jan 6 09:45 /tmp/luci-indexcache

root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 71139 Jan 6 09:45 /tmp/luci-indexcache
root@buffalo:~# date
Fri Jan 6 09:51:37 PST 2012
root@buffalo:~# opkg remove --autoremove luci-app-statistics
Removing package luci-app-statistics from root...
rrdtool1 was autoinstalled and is now orphaned, removing.
Removing package rrdtool1 from root...
collectd-mod-rrdtool was autoinstalled and is now orphaned, removing.
Removing package collectd-mod-rrdtool from root...
librrd1 was autoinstalled and is now orphaned, removing.
Removing package librrd1 from root...
collectd-mod-iwinfo was autoinstalled and is now orphaned, removing.
Removing package collectd-mod-iwinfo from root...
collectd-mod-interface was autoinstalled and is now orphaned, removing.
Removing package collectd-mod-interface from root...
collectd-mod-load was autoinstalled and is now orphaned, removing.
Removing package collectd-mod-load from root...
collectd was autoinstalled and is now orphaned, removing.
Removing package collectd from root...
libpthread was autoinstalled and is now orphaned, removing.
Refusing to remove essential package libpthread.

Removing an essential package may lead to an unusable system, but if
you enjoy that kind of pain, you can force opkg to proceed against
its will with the option: --force-removal-of-essential-packages

zlib was autoinstalled and is now orphaned, removing.
Removing package zlib from root...
libltdl was autoinstalled and is now orphaned, removing.
Removing package libltdl from root...
No packages removed.
root@buffalo:~# date
Fri Jan 6 09:51:54 PST 2012
root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 71139 Jan 6 09:45 /tmp/luci-indexcache

comment:5 Changed 6 years ago by camden lindsay <camden.lindsay+openwrt@…>

An install of luci-app-openvpn also did not cause a cache removal..

root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 54896 Jan 6 09:55 /tmp/luci-indexcache
root@buffalo:~# date
Fri Jan 6 09:56:49 PST 2012
root@buffalo:~# opkg install luci-app-openvpn
Installing luci-app-openvpn (trunk+svn8147-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-app-openvpn_trunk+svn8147-1_ar71xx.ipk.
Installing openvpn (2.2.1-4) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/openvpn_2.2.1-4_ar71xx.ipk.
Installing kmod-tun (2.6.39.4-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/kmod-tun_2.6.39.4-1_ar71xx.ipk.
Installing libopenssl (1.0.0e-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libopenssl_1.0.0e-1_ar71xx.ipk.
Installing zlib (1.2.5-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/zlib_1.2.5-1_ar71xx.ipk.
Installing liblzo (2.05-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/liblzo_2.05-1_ar71xx.ipk.
Configuring kmod-tun.
Configuring zlib.
Configuring libopenssl.
Configuring liblzo.
Configuring openvpn.
Configuring luci-app-openvpn.
root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 54896 Jan 6 09:55 /tmp/luci-indexcache
root@buffalo:~#

After removing and accessing luci, the cache is re-created as expected:
root@buffalo:~# date
Fri Jan 6 10:01:22 PST 2012
root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 57001 Jan 6 10:00 /tmp/luci-indexcache
root@buffalo:~#

An uninstall of openvpn has similar results as with luci-app-statistics; the cache is not removed or updated:

root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 57001 Jan 6 10:00 /tmp/luci-indexcache
root@buffalo:~# date
Fri Jan 6 10:03:04 PST 2012
root@buffalo:~# opkg remove --autoremove luci-app-openvpn
Removing package luci-app-openvpn from root...
openvpn was autoinstalled and is now orphaned, removing.
Removing package openvpn from root...
kmod-tun was autoinstalled and is now orphaned, removing.
Removing package kmod-tun from root...
libopenssl was autoinstalled and is now orphaned, removing.
Removing package libopenssl from root...
zlib was autoinstalled and is now orphaned, removing.
Removing package zlib from root...
liblzo was autoinstalled and is now orphaned, removing.
Removing package liblzo from root...
root@buffalo:~# date
Fri Jan 6 10:03:25 PST 2012
root@buffalo:~# ls -l /tmp/luci-indexcache
-rw------- 1 root root 57001 Jan 6 10:00 /tmp/luci-indexcache
root@buffalo:~#

comment:6 Changed 6 years ago by camden lindsay <camden.lindsay+openwrt@…>

Ah, sorry-- i have not been using the wikiformatting and it makes this bug ugly. Will do in the future...

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:8 Changed 2 years ago by anonymous

This still happens on chaos calmer.

comment:9 Changed 21 months ago by tim@…

After installing luci-app-statistics i get the following when trying to login into LuCI:

.../luci/controller/luci_statistics/luci_statistics.lua:11: module 'luci.statistics.datatree' not found:

no field package.preloadluci.statistics.datatree?
no file './luci/statistics/datatree.lua'
no file '/usr/share/lua/luci/statistics/datatree.lua'
no file '/usr/share/lua/luci/statistics/datatree/init.lua'
no file '/usr/lib/lua/luci/statistics/datatree.lua'
no file '/usr/lib/lua/luci/statistics/datatree/init.lua'
no file './luci/statistics/datatree.so'
no file '/usr/lib/lua/luci/statistics/datatree.so'
no file '/usr/lib/lua/loadall.so'
no file './luci.so'
no file '/usr/lib/lua/luci.so'
no file '/usr/lib/lua/loadall.so'

stack traceback:

[C]: in function 'require'
.../luci/controller/luci_statistics/luci_statistics.lua:11: in function 'v'
/usr/lib/lua/luci/dispatcher.lua:536: in function 'createtree'
/usr/lib/lua/luci/dispatcher.lua:201: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:168: in function </usr/lib/lua/luci/dispatcher.lua:167>

I tried rm /tmp/luci-indexcache and reboot but no success. What can I do ?

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.