Comments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #76 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

LuCI is broken on OpenWrt trunk

Reported by: reporter Owned by: jow
Priority: blocker Milestone:
Component: LuCI Base Keywords:
Cc:

Description

I just get a 500 error page.

Attachments

screenshot_01.png Download (74.1 KB) - added by reporter 4 years ago.
Main Screen on Current OpenWRT Trunk
screenshot_02.png Download (87.0 KB) - added by reporter 4 years ago.
Main Screen on Current OpenWRT Trunk
default.en.lmo Download (3.1 KB) - added by reporter 4 years ago.
default.en.lmo

Change History

Changed 4 years ago by jow

  • status changed from new to assigned
  • owner set to jow

Do you have details? Which platform, what error message? Maybe no theme was selected by default, this should be fixed now.

Changed 4 years ago by reporter

Main Screen on Current OpenWRT Trunk

Changed 4 years ago by reporter

Main Screen on Current OpenWRT Trunk

Changed 4 years ago by reporter

See my above screenshots for what I am no seeing with OpenWRT trunk. This is on an IXP4xx board (Avila Gateworks). I am not the one who opened this ticket, but I am confirming that I am also seeing issues with Luci on OpenWRT trunk.

I am using the verison of Luci provided by openwrt's feeds script, and it compiles and installs without issue, it's when running that it is pretty much unusable.

See my attached screenshots

Changed 4 years ago by jow

  • status changed from assigned to closed
  • resolution set to fixed

I believe the most issues are addressed with r5144 and r5154. Please reopen this ticket if you still see issues.

Changed 4 years ago by reporter

  • status changed from closed to reopened
  • resolution fixed deleted

While I can change themes now, none of the menus are in english which is the default selection in OpenWRT. If I click on Luci Components under the "Übersicht" menu, I get this error. I still cannnot get to any of the screens for configuring any network settings.

XML Parsing Error: not well-formed
Location:  http://192.168.1.1/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/system/packages?update=1&query=luci
Line Number 118, Column 55: /usr/lib/lua/luci/template.lua:235: in function </usr/lib/lua/luci/template.lua:223>


Changed 4 years ago by jow

  • status changed from reopened to assigned

Could you please attach the corruped html source? Firefox' XML error message does not contain enough information.

Changed 4 years ago by jow

Another question. Is your browser langauge set to german by any chance? The default language is "auto" now and choosen based on the Accept-Language header.

Changed 4 years ago by reporter

My browser is set to English,

here's the soure:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" type="text/css" media="screen" href="/luci-static/openwrt.org/cascade.css" />
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" media="screen" href="/luci-static/openwrt.org/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="/luci-static/openwrt.org/ie7.css" /><![endif]-->
<script type="text/javascript" src="/luci-static/resources/VarType.js"></script>
<script type="text/javascript" src="/luci-static/resources/XHTML1.js"></script>
<script type="text/javascript" src="/luci-static/resources/Dropdowns.js"></script>
<title>OpenWrt - LuCI</title>
</head>
<body class="lang_en">

<p class="skiplink">
<span id="skiplink1"><a href="#navigation">Skip to navigation</a></span>
<span id="skiplink2"><a href="#content">Skip to content</a></span>
</p>

<div id="header">
<h1>OpenWrt Firmware</h1>
<p>
Kamikaze (r17024)<br />
: 0.00 0.00 0.02<br />

: OpenWrt
</p>
</div>

<div id="menubar">
<h2 class="navigation"><a id="navigation" name="navigation">Navigation</a></h2>
<ul id="mainmenu" class="dropdowns">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/index/">Übersicht</a>
<ul id="submenu_admin_index">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/index/luci/">Oberfläche</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/index/components/">LuCI Components</a></li>

</ul>
</li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/status/">Status</a>
<ul id="submenu_admin_status">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/status/interfaces/">Interfaces</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/status/iptables/">Firewall</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/status/syslog/">System Log</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/status/dmesg/">Kernel Log</a></li>
</ul>
</li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/services/">Dienste</a>

<ul id="submenu_admin_services">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/services/httpd/">Busybox HTTPd</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/services/dropbear/">Dropbear SSHd</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/services/dnsmasq/">Dnsmasq</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/services/ushare/">uShare</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/services/upnp/">UPNP</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/services/openvpn/">OpenVPN</a></li>
</ul>
</li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/">statistics</a>

<ul id="submenu_admin_statistics">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/collectd/">collectd</a>
<ul id="submenu_admin_statistics_collectd">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/collectd/network/">networkplugins</a>
<ul id="submenu_admin_statistics_collectd_network">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/collectd/network/interface/">interface</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/collectd/network/wireless/">wireless</a></li>
</ul>
</li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/collectd/output/">outputplugins</a>
<ul id="submenu_admin_statistics_collectd_output">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/collectd/output/rrdtool/">rrdtool</a></li>

</ul>
</li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/collectd/system/">systemplugins</a>
<ul id="submenu_admin_statistics_collectd_system">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/collectd/system/load/">load</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/graph/">graphs</a>
<ul id="submenu_admin_statistics_graph">
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/graph/load/?">load</a></li>
<li><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/statistics/graph/interface/?">interface</a></li>

</ul>
</li>
</ul>
</li>
</ul>

<ul id="modemenu">
<li><a class="active" href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/admin/">Administration</a></li>
</ul>

<ul id="savemenu" class="dropdowns">
<li><a href="#">: 0</a></li>
</ul>

<div class="clear"></div>

</div>
<div id="maincontent">


<h2><a id="content" name="content"></a></h2>
<h3></h3>

<br />


<div class="code"><strong>:</strong><br />

	: <span class="error"> (

<h2><a id="content" name="content">500 Internal Server Error</a></h2>
<p>Sorry, the server encountered an unexpected error.</p>
<pre class="error500">/usr/lib/lua/luci/template.lua:235: Error in template admin_system/packages: /usr/lib/lua/luci/util.lua:52: bad argument #1 to 'format' (string expected, got nil)
stack traceback:
	[C]: in function 'error'
	/usr/lib/lua/luci/template.lua:235: in function </usr/lib/lua/luci/template.lua:223>
	(tail call): ?
	/usr/lib/lua/luci/controller/admin/system.lua:122: in function </usr/lib/lua/luci/controller/admin/system.lua:39>
	(tail call): ?
	/usr/lib/lua/luci/dispatcher.lua:364: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:129: in function </usr/lib/lua/luci/dispatcher.lua:128></pre>
<div class="clear"></div>
</div>

<p class="luci"><a href="/cgi-bin/luci/;stok=12e3ab605ec74ddbd0052fb5c4ea35bc/about">Powered by LuCI 0.9 Branch (v0.9+svn5154)</a></p>

</body>
</html>



Changed 4 years ago by jow

Ok, looks like the langauges failes are missing on your system.
Are there *.lmo files present in /usr/lib/lua/luci/i18n/ ?

Changed 4 years ago by reporter

yes, a lot of them.

root@OpenWrt:/usr/lib/lua/luci/i18n# ls
admin-core.en.lmo     livestats.es.lmo      openvpn.pt.lmo        upnp.de.lmo
cbi.en.lmo            livestats.pt-br.lmo   qos.ca.lmo            upnp.en.lmo
ddns.ca.lmo           livestats.pt.lmo      qos.de.lmo            upnp.es.lmo
ddns.de.lmo           luci-fw.ca.lmo        qos.en.lmo            upnp.pt-br.lmo
ddns.en.lmo           luci-fw.de.lmo        qos.es.lmo            upnp.pt.lmo
ddns.es.lmo           luci-fw.en.lmo        qos.fr.lmo            ushare.ca.lmo
ddns.fr.lmo           luci-fw.es.lmo        qos.pt-br.lmo         ushare.de.lmo
ddns.pt-br.lmo        luci-fw.fr.lmo        qos.pt.lmo            ushare.en.lmo
ddns.pt.lmo           luci-fw.pt-br.lmo     rrdtool.ca.lmo        ushare.es.lmo
default.en.lmo        luci-fw.pt.lmo        rrdtool.de.lmo        ushare.pt-br.lmo
initmgr.ca.lmo        ntpc.ca.lmo           rrdtool.en.lmo        ushare.pt.lmo
initmgr.de.lmo        ntpc.de.lmo           rrdtool.pt-br.lmo     uvl.ca.lmo
initmgr.el.lmo        ntpc.el.lmo           rrdtool.pt.lmo        uvl.de.lmo
initmgr.en.lmo        ntpc.en.lmo           statistics.ca.lmo     uvl.en.lmo
initmgr.es.lmo        ntpc.es.lmo           statistics.de.lmo     uvl.es.lmo
initmgr.pt-br.lmo     ntpc.pt-br.lmo        statistics.en.lmo     uvl.pt-br.lmo
initmgr.pt.lmo        ntpc.pt.lmo           statistics.es.lmo     uvl.pt.lmo
livestats.ca.lmo      openvpn.ca.lmo        statistics.pt-br.lmo  wifi.en.lmo
livestats.de.lmo      openvpn.de.lmo        statistics.pt.lmo
livestats.el.lmo      openvpn.en.lmo        sysauth.en.lmo
livestats.en.lmo      openvpn.pt-br.lmo     upnp.ca.lmo
root@OpenWrt:/usr/lib/lua/luci/i18n#


Changed 4 years ago by jow

Please attach a sample, e.g. default.en.lmo. I think there is some problem with the internal key hashing on your platform because every single string lookup fails.

Changed 4 years ago by reporter

I don't have access to the router right now, but here's a dump of that file from the build directory in openwrt. I did a clean build about 3 weeks ago and everything worked great, so something has changed in that timeframe.

:/opt/openwrt/k2/build_dir/target-armeb_uClibc-0.9.30.1/root-ixp4xx/usr/lib/lua/luci/i18n$ cat default.en.lmo
Skip to navigationSkip to contentNavigationAboutAddAddressesAliasesallbackAdministrationEssentialsApplyBasic Settings<abbr title="Internet Protocol Version 4">IPv4</abbr>-BroadcastCancelChangesChannel?<abbr title="Classless Inter-Domain Routing">CIDR</abbr>-Notation: address/prefixCodeConfigurationConfiguration fileConfirmationDeleteDescriptionDesignDestinationDeviceDevicesdisableDistanceKernel Log<abbr title="Domain Name System">DNS</abbr>-ServerEditenableEncryptionErrorFilesystemFilter?<abbr title="Internet Protocol Version 4">IPv4</abbr>-Gateway<abbr title="Internet Protocol Version 6">IPv6</abbr>-GatewayGeneralHostnameInstallinstalledInterfaceInterfaces?<abbr title="Internet Protocol Version 4">IPv4</abbr>-Address<abbr title="Internet Protocol Version 6">IPv6</abbr>-AddressLegendLibraryLogoutKeyLanguageLimitLoadLogin?<abbr title="Media Access Control">MAC</abbr>-Addresssee &#39;%s&#39; manpageMetricModeName<abbr title="Internet Protocol Version 4">IPv4</abbr>-NetmaskNetworkNetworksnonenot? installedOKOptionsOverviewPackage ManagerPasswordPathPortPortsProceedProtocolRebootResetRevertSaveSave? &amp; ApplyScanServiceServicesSettingsSizeSourceStartstaticStatusStatisticsSubmitSystem? LogSystemTargetTimezoneTypeUnknown? ErrorUnsaved? ChangesUser?��A��;SPg,+�,�Q�ŁȽ��@}G"User Interface">UI</abbr>WifiZone?���d��J���iU���W��D��*
*�\�<n|���A�zo%��@-�d
�Vug,8�

hhH�7�,

/�p��*$��U}��
~��zf3Y��C��'�f

��<�Q_������Go}�7E��MN�`�}.GX�$oM�U�6��F)<��!Ҵ��{��)����S���|��!�f��%�8ao1��:1��:LJ�@E���h�8+��F��<�@�ߴC�=Ϊ��ׅ֎���߸PNV�q��#=BP�

����;b�pRS�M[

��5�|+�g���eX�N�
������ht����CWs$�F��� �b|�m

�BX�t�I�b�2��l,��

�d�F��Y�$=k7%��
#�=�l��;
x��L��L`� �w���w��� ��1"7I�\�Ӽգ��{��9*��q{�
�h=���W(=���ڭ��" ����F�
���~.�

8]b�d ��

r?��r?����U�'8��ү�8��i�2�+�?O&3�
��-���9(4�4��r��p�������3�"��L�-h��

�K�H��o��klN=}V?�t


����t�ml֎


e�r`

��0o1��8˖�nQ���Q
�W�P�i��ԤjJ�����Fh�]�:�IO���# �?���~4�|u7�����t3R8���h Rx�=o�آL����<
��E|��
�Xd��d��T
��
��P.5sP����Hh�W�R��< H\n

0��8 b��"��C0�D=0wP��$

�|���B����(|<�

Changed 4 years ago by jow

Could you please re-submit it as attachment? The file is binary and trac mangled your previous post.

Changed 4 years ago by reporter

default.en.lmo

Changed 4 years ago by reporter

Hey, since we are seeing this issue now, I went and looked in OpenWRT's TRAC. I found this update to Luci:

 https://dev.openwrt.org/attachment/ticket/5373/luci-netdiscover%2Bsmap-i18n.patch

I have a feeling that this has introduced the bug I am seeing.

Changed 4 years ago by jow

I'm not able to reproduce this problem on x86 and atheros targets, so it's propably some ARM related issue. The default.en.lmo provided earlier is 100% identical to my local working version so it's most likely a target- and not some buildroot issue.

I need the outputs of the following commands to track down the problem:

lua -llmo -e 'ar=lmo.open("/usr/lib/lua/luci/i18n/default.en.lmo"); print(ar:lookup("navigation"))'

Expected output: "Navigation"

lua -llmo -e 'ar=lmo.open("/usr/lib/lua/luci/i18n/default.en.lmo"); print(ar:get(-532398800))'

Expected output: "Navigation"

lua -llmo -e 'print(lmo.hash("test") == 605072156)'

Expected output: "true"

Finally dump the lang file with:

lua -llmo -e 'ar=lmo.open("/usr/lib/lua/luci/i18n/default.en.lmo"); ar:foreach(function(...) print(...) end)'

Please post the results here.

Changed 4 years ago by reporter

Here ya go:

root@OpenWrt:/# lua -llmo -e 'ar=lmo.open("/usr/lib/lua/luci/i18n/default.en.lmo
"); print(ar:lookup("navigation"))'
nil
root@OpenWrt:/# 
root@OpenWrt:/# lua -llmo -e 'ar=lmo.open("/usr/lib/lua/luci/i18n/default.en.lmo
"); print(ar:get(-532398800))'
nil
root@OpenWrt:/#
root@OpenWrt:/usr/lib/lua/luci/i18n# lua -llmo -e 'print(lmo.hash("test") == 605
072156)'
true
root@OpenWrt:/usr/lib/lua/luci/i18n# 
root@OpenWrt:/usr/lib/lua/luci/i18n# lua -llmo -e 'ar=lmo.open("/usr/lib/lua/luc
i/i18n/default.en.lmo"); ar:foreach(function(...) print(...) end)'
root@OpenWrt:/usr/lib/lua/luci/i18n# 

Changed 4 years ago by jow

Thank you! I was able to spot the problem... Looks like your system does not like memory mapped io. Could you tell me some more details about installed uclibc version and the cpu type? I'll start implementing a malloc() based fallback now.

Changed 4 years ago by jow

I just found this:  http://lists.uclibc.org/pipermail/uclibc/2006-November/037696.html

Do you use a jffs2 image for your installation or have you installed luci with opkg?

That would explain why it works here (stuff read from squashfs) and not in your case (read from jffs2).

Changed 4 years ago by jow

I committed a possible fix, could you check whether issue is still present after updating the feeds with ./scripts/feeds update luci ?

Changed 4 years ago by reporter

I'll give that build a try today. But for Info, I have an Intel Xscale (ARM5) cpu @ 533 Mhz. I am using the jffs2 image, but I'm pretty sure this problem existed when I used the squashfs image also. I am building the image with luci built in and not using opkg for install.

Changed 4 years ago by reporter

No luck, I get the exact same results for the commands using build 5167. Everything used to work great, so something has definitely changed in the last month.

Changed 4 years ago by jow

Yeah, the whole i18n system has been replaced, that's what is changed compared to a month ago.
Can you run the last of the above commands under strace and paste the output here? I want to know whether the mmap() still fails.

Changed 4 years ago by reporter

didn't have strace on the router, but hey now I do :)

Here you go:

root@OpenWrt:/tmp# strace lua -llmo -e 'ar=lmo.open("/usr/lib/lua/luci/i18n/default.en.lmo"); ar:foreach(function(.
..) print(...) end)'
execve("/usr/bin/lua", ["lua", "-llmo", "-e", "ar=lmo.open(\"/usr/lib/lua/luci/i"...], [/* 8 vars */]) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40005000
stat("/etc/ld.so.cache", 0xbea35a98)    = -1 ENOENT (No such file or directory)
open("/lib/liblua.so.5.1.4", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/lib/liblua.so.5.1.4", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib/liblua.so.5.1.4", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=162316, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40006000
read(6, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0(\0\0\0\1\0\0U<\0\0\0004\0"..., 4096) = 4096
mmap2(NULL, 196608, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000e000
mmap2(0x4000e000, 158252, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x4000e000
mmap2(0x4003c000, 6668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0x26) = 0x4003c000
close(6)                                = 0
munmap(0x40006000, 4096)                = 0
open("/lib/libm.so.0", O_RDONLY)        = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=69744, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40006000
read(6, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0(\0\0\0\1\0\0\26\354\0\0\0004\0"..., 4096) = 4096
mmap2(NULL, 106496, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4003e000
mmap2(0x4003e000, 66384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x4003e000
mmap2(0x40056000, 4208, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0x10) = 0x40056000
close(6)                                = 0
munmap(0x40006000, 4096)                = 0
open("/lib/libcrypt.so.0", O_RDONLY)    = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=12332, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40006000
read(6, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0(\0\0\0\1\0\0\4\234\0\0\0004\0"..., 4096) = 4096
mmap2(NULL, 118784, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40058000
mmap2(0x40058000, 8968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x40058000
mmap2(0x40062000, 4140, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0x2) = 0x40062000
mmap2(0x40064000, 66280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40064000
close(6)                                = 0
munmap(0x40006000, 4096)                = 0
open("/lib/libdl.so.0", O_RDONLY)       = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=8252, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40006000
read(6, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0(\0\0\0\1\0\0\10x\0\0\0004\0"..., 4096) = 4096
mmap2(NULL, 45056, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40075000
mmap2(0x40075000, 6016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x40075000
mmap2(0x4007e000, 4156, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0x1) = 0x4007e000
close(6)                                = 0
munmap(0x40006000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=329208, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40006000
read(6, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0(\0\0\0\1\0\0\265\300\0\0\0004\0"..., 4096) = 4096
mmap2(NULL, 385024, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40080000
mmap2(0x40080000, 324216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x40080000
mmap2(0x400d7000, 5624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0x4f) = 0x400d7000
mmap2(0x400d9000, 16400, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400d9000
close(6)                                = 0
munmap(0x40006000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=329208, ...}) = 0
close(6)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=329208, ...}) = 0
close(6)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=329208, ...}) = 0
close(6)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=329208, ...}) = 0
close(6)                                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=20488, ...}) = 0
mprotect(0x40056000, 4096, PROT_READ)   = 0
mprotect(0x40062000, 4096, PROT_READ)   = 0
mprotect(0x4007e000, 4096, PROT_READ)   = 0
mprotect(0x400d7000, 4096, PROT_READ)   = 0
mprotect(0x4000c000, 4096, PROT_READ)   = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
brk(0)                                  = 0x14000
brk(0x15000)                            = 0x15000
brk(0x16000)                            = 0x16000
brk(0x17000)                            = 0x17000
brk(0x18000)                            = 0x18000
brk(0x19000)                            = 0x19000
brk(0x1a000)                            = 0x1a000
brk(0x1b000)                            = 0x1b000
brk(0x1c000)                            = 0x1c000
brk(0x1d000)                            = 0x1d000
brk(0x1e000)                            = 0x1e000
brk(0x1f000)                            = 0x1f000
rt_sigaction(SIGINT, {0x945c, [INT], SA_RESTART|0x4000000}, {0x1, [], 0}, 8) = 0
open("./lmo.lua", O_RDONLY)             = -1 ENOENT (No such file or directory)
open("/usr/share/lua/lmo.lua", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/lua/lmo/init.lua", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/lua/lmo.lua", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib/lua/lmo/init.lua", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./lmo.so", O_RDONLY)              = -1 ENOENT (No such file or directory)
open("/usr/lib/lua/lmo.so", O_RDONLY)   = 6
ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbea3573c) = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x20000)                            = 0x20000
close(6)                                = 0
open("/usr/lib/lua/lmo.so", O_RDONLY)   = 6
fstat(6, {st_mode=S_IFREG|0755, st_size=8716, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40006000
read(6, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0(\0\0\0\1\0\0\f\314\0\0\0004\0"..., 4096) = 4096
mmap2(NULL, 45056, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400de000
mmap2(0x400de000, 7484, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x400de000
mmap2(0x400e8000, 524, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0x2) = 0x400e8000
close(6)                                = 0
munmap(0x40006000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=329208, ...}) = 0
close(6)                                = 0
open("/lib/ld-uClibc.so.0", O_RDONLY)   = 6
fstat(6, {st_mode=S_IFREG|0755, st_size=20488, ...}) = 0
close(6)                                = 0
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTART|0x4000000}, {0x945c, [INT], SA_RESTART|0x4000000}, 8) = 0
rt_sigaction(SIGINT, {0x945c, [INT], SA_RESTART|0x4000000}, {SIG_DFL, [INT], SA_RESTART|0x4000000}, 8) = 0
stat("/usr/lib/lua/luci/i18n/default.en.lmo", {st_mode=S_IFREG|0644, st_size=3132, ...}) = 0
open("/usr/lib/lua/luci/i18n/default.en.lmo", O_RDONLY) = 6
lseek(6, -4, SEEK_END)                  = 3128
read(6, "\0\0\5\270"..., 4)             = 4
lseek(6, 233832512, SEEK_SET)           = 233832512
lseek(6, 0, SEEK_SET)                   = 0
mmap2(NULL, 233832512, PROT_READ, MAP_PRIVATE, 6, 0) = 0x400e9000
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTART|0x4000000}, {0x945c, [INT], SA_RESTART|0x4000000}, 8) = 0
munmap(0x400e9000, 233832512)           = 0
close(6)                                = 0
munmap(0x400de000, 42536)               = 0
exit(0)  

Changed 4 years ago by jow

Thanks again! The problem is here:

read(6, "\0\0\5\270"..., 4)             = 4
lseek(6, 233832512, SEEK_SET)           = 233832512

I think I know now what happens:
- your system is big endian
- OpenWrt? was compiled with large file support
- the corresponding call to lseek() in lmo_core.c is missing a cast to off_t
- the offset is passed as uint32_t but with lfs off_t is defined as 64bit int

The result is that the given offset value is misinterpreted and the library is unable to locate the string index table. I'll try to reproduce this on a big endian system now.

Changed 4 years ago by jow

Could you check whether r5168 solves your issue? If not, re-attach a strace log.

Changed 4 years ago by reporter

I manually compiled the paackages and installed them to save a little time, but so far everything seems to be working. I'm going to roll the complete firmware image and test it that way too and I'll report back.

Changed 4 years ago by reporter

  • status changed from assigned to closed
  • resolution set to fixed

It's a go, everything seems to be working now. Thanks for all the help with this issue.

Changed 4 years ago by reporter

  • status changed from closed to reopened
  • resolution fixed deleted

I may have spoken too soon. I'm getting errors on some of the screens that appears to be related.

If I go to Statistics-Graphs and pick either graph, I get this error:

/usr/lib/lua/luci/statistics/i18n.lua:34: attempt to call method 'gsub' (a nil value)
stack traceback:
	/usr/lib/lua/luci/statistics/i18n.lua:34: in function </usr/lib/lua/luci/statistics/i18n.lua:33>
	(tail call): ?
	/usr/lib/lua/luci/statistics/rrdtool.lua:411: in function '_generic'
	/usr/lib/lua/luci/statistics/rrdtool.lua:556: in function 'render'
	.../luci/controller/luci_statistics/luci_statistics.lua:187: in function <.../luci/controller/luci_statistics/luci_statistics.lua:150>
	(tail call): ?
	/usr/lib/lua/luci/dispatcher.lua:364: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:129: in function </usr/lib/lua/luci/dispatcher.lua:128>

If I got to System-System I get this error:

/usr/lib/lua/luci/cbi.lua:74: assertion failed!
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/cbi.lua:74: in function 'load'
	/usr/lib/lua/luci/dispatcher.lua:664: in function 'target'
	/usr/lib/lua/luci/dispatcher.lua:364: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:129: in function </usr/lib/lua/luci/dispatcher.lua:128>

These may or may not be related, just close it if you think this is a different problem and I will make a new ticket.

Changed 4 years ago by jow

  • status changed from reopened to closed
  • resolution set to fixed

You're right. It's a different issue addressed in r5176 - r5183. If you see further issue then please open a separate ticket. I'll close this one now since the related issue is fixed.

Add/Change #76 (LuCI is broken on OpenWrt trunk)

Author


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


Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.