Open
Description
Maintainer: @[wfleurant] (https://github.com/wfleurant) (find it by checking history of the package Makefile)
Environment: (put here ARMv7 / ipq806x, Netgear R7800, OpenWrt 22.03)
Description:
cjdns cannot be configured because the program segfaults.
root@Nighthawk:/etc# cjdroute --genconf > /etc/cjdroute.conf
Segmentation Fault
In all honesty, running cjdrouteconf with ANY switches, including none at all, resulgs in SIGSEV (Segmentation Fault).
root@Nighthawk:/usr/bin# cat /etc/cjdroute.conf | cjdrouteconf set
lua: /usr/lib/lua/cjdns/uci.lua:141: attempt to index field 'admin' (a nil value)
stack traceback:
/usr/lib/lua/cjdns/uci.lua:141: in function 'set'
/usr/bin/cjdrouteconf:23: in main chunk
[C]: ?
root@Nighthawk:/usr/bin# root@Nighthawk:/usr/bin# cat /etc/cjdroute.conf | cjdro
uteconf set
stack traceback:
/usr/lib/lua/cjdns/uci.lua:141: in function 'set'
/usr/bin/cjdrouteconf:23: in main chunk
[C]: ?
root@Nighthawk:/usr/bin# cat /etc/cjdroute.conf | cjdrouteconf set
lua: /usr/lib/lua/cjdns/uci.lua:141: attempt to index field 'admin' (a nil value)
stack traceback:
/usr/lib/lua/cjdns/uci.lua:141: in function 'set'
/usr/bin/cjdrouteconf:23: in main chunk
[C]: ?
running GDB gives a similar result:
root@Nighthawk:/etc# gdb $(which cjdroute) -ex 'r --genconf'
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-openwrt-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/cjdroute...
(No debugging symbols found in /usr/sbin/cjdroute)
Starting program: /usr/sbin/cjdroute --genconf
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Program received signal SIGSEGV, Segmentation fault.
0xb6fd90bc in ?? ()
(gdb) Program received signal SIGSEGV, Segmentation fault.
Quit
(gdb) bt
#0 0xb6fd90bc in ?? ()
#1 0xb6fd9840 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) Reading symbols from /usr/sbin/cjdroute...
(No debugging symbols found in /usr/sbin/cjdroute)
Starting program: /usr/sbin/cjdroute --genconf
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Program received signal SIGSEGV, Segmentation fault.
Undefined command: "Reading". Try "help".
(gdb) quit
A debugging session is active.
Inferior 1 [process 28290] will be killed.
Quit anyway? (y or n) y
This might be why the service/daemon for CJDNS crashes when it tries to start:
root@Nighthawk:/usr/bin# /etc/init.d/cjdns start
Segmentation fault
Segmentation fault
dkjson: no valid JSON value (reached the end) (try cjdroute --cleanconf)
When i looked at that lua file (/usr/lib/lua/cjdns/uci.lua), this is what line 141 says:
local admin_address, admin_port = string.match(obj.admin.bind, "^(.*):(.*)$")
As for what line 23 in /usr/bin/cjdrouteconf says? That's below:
cjdns.uci.set(obj)
None of this makes any sense to me... can anyone else understand this?
Metadata
Metadata
Assignees
Labels
No labels
Activity