sargon / ddhcpd

A distributed DHCP Daemon
GNU General Public License v3.0
31 stars 11 forks source link

crash #7

Closed christf closed 6 years ago

christf commented 6 years ago

on gluon I was able to see: [41544.407792] [41544.407792] do_page_fault(): sending SIGSEGV to ddhcpd for invalid write access to 00d5524c [41544.414761] epc = 77cdaf5c in libc.so[77cb2000+92000] [41544.419729] ra = 77cdaf34 in libc.so[77cb2000+92000] [41544.424756]

attached is the core file (rename from png) ddhcpd 1529728411 3028 11 core

unfortunately I cannot see much with gdb:

christof@build:/var/lib/jenkins/workspace/babel-dev/wspace/lede$ ./build_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/gdb-8.0.1/gdb/gdb ./staging_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/usr/sbin/ddhcpd /tmp/ddhcpd.1529728411.3028.11.core.png
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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 "--host=x86_64-linux-gnu --target=mips-openwrt-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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 ./staging_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/usr/sbin/ddhcpd...done.
[New LWP 3028]

warning: Can't read pathname for load map: Unbekannter Fehler -1.

warning: Could not load shared library symbols for 2 libraries, e.g. /lib/libgcc_s.so.1.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `/usr/sbin/ddhcpd -D -s 1 -b 2 -c local-node -i br-client -N 10.126.0.0 16 -H /e'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x77766f5c in ?? ()
(gdb) bt
#0  0x77766f5c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info sharedlibrary
warning: Can't read pathname for load map: Unbekannter Fehler -1.
From        To          Syms Read   Shared Object Library
                        No          /lib/libgcc_s.so.1
                        No          /lib/ld-musl-mips-sf.so.1
(gdb) bt
#0  0x77766f5c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

I can see that the command line is cut off. I am starting ddhcpd like this:

 4508 root      2204 S    /usr/sbin/ddhcpd -D -s 1 -b 2 -c local-node -i br-client -N 10.126.0.0 16 -H /etc/ddhcpd.hook -o 51 4 0 0 1 44 -o 3 4 10 126 0 1 -o 6 4 10 126 0 1 -o 54 4 10 126 0 1 -o 1 4 255 255 0 0 -i mmfd0

this is the log up to the crash.

Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: network=10.126.0.0/16
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: block_size=4
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: #blocks=16384
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: #spare_blocks=1
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: timeout=60
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: refresh_factor=4
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: tentative_timeout=15
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: client_interface=local-node
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: CONFIG: group_interface=mmfd0
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: ddhcp_block_init(config)
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store( store, code: 1)
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store(...) -> 1
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store( store, code: 2)
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: set_in_option_store( store, code/len: 2/4)
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store( store, code: 2)
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: set_in_option_store(...) -> append option
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store( store, code: 28)
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store(...) -> 28
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store( store, code: 51)
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store(...) -> 51
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store( store, code: 54)
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: DEBUG: find_in_option_store(...) -> 54
Sat Jun 23 16:21:48 2018 daemon.err ddhcpd[30989]: INFO: loop timeout: 7500 msecs
christf commented 6 years ago

I cannot be certain however this might be due to the issue fixed with 9d117d5142db4a1a01289e5c968e973bb8ddcd6f

christf commented 6 years ago

this is fixed by #9

sargon commented 6 years ago

Merged.