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

synth-domain crashes dnsmasq code #367

Closed
3 tasks done
cwadds opened this issue Aug 28, 2018 · 12 comments
Closed
3 tasks done

synth-domain crashes dnsmasq code #367

cwadds opened this issue Aug 28, 2018 · 12 comments

Comments

@cwadds
Copy link

cwadds commented Aug 28, 2018

In raising this issue, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your issue:

  • I have read and understood the contributors guide.
  • The issue I am reporting can be replicated
  • The issue I am reporting isn't a duplicate

How familiar are you with the codebase?:

1


[BUG | ISSUE] Expected Behaviour:
pihole-FTl running, resolving DNS queries

[BUG | ISSUE] Actual Behaviour:
pihole-FTL crashed, will not restart

[BUG | ISSUE] Steps to reproduce:
Upgrade Pi-hole using command: pihole -up
Upgrade occurred, but pihole-FTL crashes and will not restart

Rebooted Raspberry-Pi, pihole-FTL still will not start

Tried running: pihole-FTL dnsmasq-test Result: Segmentation fault

Log file output [if available]

[2018-08-29 08:37:59.019] ########## FTL started! ##########
[2018-08-29 08:37:59.020] FTL branch:
[2018-08-29 08:37:59.021] FTL version: v4.0
[2018-08-29 08:37:59.021] FTL commit: 8493df4
[2018-08-29 08:37:59.021] FTL date: 2018-08-05 13:40:30 -0700
[2018-08-29 08:37:59.021] FTL user: pihole
[2018-08-29 08:37:59.023] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2018-08-29 08:37:59.023] SOCKET_LISTENING: only local
[2018-08-29 08:37:59.023] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2018-08-29 08:37:59.023] MAXDBDAYS: max age for stored queries is 365 days
[2018-08-29 08:37:59.023] RESOLVE_IPV6: Resolve IPv6 addresses
[2018-08-29 08:37:59.023] RESOLVE_IPV4: Resolve IPv4 addresses
[2018-08-29 08:37:59.023] DBINTERVAL: saving to DB file every minute
[2018-08-29 08:37:59.024] DBFILE: Using /etc/pihole/pihole-FTL.db
[2018-08-29 08:37:59.024] MAXLOGAGE: Importing up to 24.0 hours of log data
[2018-08-29 08:37:59.024] PRIVACYLEVEL: Set to 0
[2018-08-29 08:37:59.024] IGNORE_LOCALHOST: Show queries from localhost
[2018-08-29 08:37:59.024] BLOCKINGMODE: Null IPs for blocked domains
[2018-08-29 08:37:59.024] REGEX_DEBUGMODE: Inactive
[2018-08-29 08:37:59.024] Finished config file parsing
[2018-08-29 08:37:59.025] Compiled 0 Regex filters and 10 whitelisted domains in 0.8 msec (0 errors)
[2018-08-29 08:37:59.052] Database successfully initialized
[2018-08-29 08:37:59.066] Notice: Increasing queries struct size from 0 to 10000
[2018-08-29 08:37:59.067] Notice: Increasing domains struct size from 0 to 1000
[2018-08-29 08:37:59.067] Notice: Increasing clients struct size from 0 to 10
[2018-08-29 08:37:59.067] New forward server: 103.86.99.100 (0/0)
[2018-08-29 08:37:59.067] Notice: Increasing forwarded struct size from 0 to 4
[2018-08-29 08:37:59.067] Notice: Increasing overTime struct size from 0 to 100
[2018-08-29 08:37:59.067] New forward server: 103.86.96.100 (1/4)
[2018-08-29 08:37:59.169] Notice: Increasing queries struct size from 10000 to 20000
[2018-08-29 08:37:59.264] Notice: Increasing queries struct size from 20000 to 30000
[2018-08-29 08:37:59.358] Notice: Increasing queries struct size from 30000 to 40000
[2018-08-29 08:37:59.361] Notice: Increasing clients struct size from 10 to 20
[2018-08-29 08:37:59.453] Notice: Increasing queries struct size from 40000 to 50000
[2018-08-29 08:37:59.524] Notice: Increasing overTime struct size from 100 to 200
[2018-08-29 08:37:59.543] Imported 48961 queries from the long-term database
[2018-08-29 08:37:59.544] -> Total DNS queries: 48961
[2018-08-29 08:37:59.544] -> Cached DNS queries: 1112
[2018-08-29 08:37:59.544] -> Forwarded DNS queries: 2841
[2018-08-29 08:37:59.544] -> Exactly blocked DNS queries: 1214
[2018-08-29 08:37:59.544] -> Unknown DNS queries: 43794
[2018-08-29 08:37:59.544] -> Unique domains: 287
[2018-08-29 08:37:59.545] -> Unique clients: 15
[2018-08-29 08:37:59.545] -> Known forward destinations: 2
[2018-08-29 08:37:59.545] Successfully accessed setupVars.conf
[2018-08-29 08:37:59.554] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2018-08-29 08:37:59.554] ----------------------------> FTL crashed! <----------------------------
[2018-08-29 08:37:59.554] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2018-08-29 08:37:59.554] Please report a bug at https://github.com/pi-hole/FTL/issues
[2018-08-29 08:37:59.554] and include in your report already the following details:

[2018-08-29 08:37:59.554] FTL has been running for 0 seconds
[2018-08-29 08:37:59.554] FTL branch:
[2018-08-29 08:37:59.554] FTL version: v4.0
[2018-08-29 08:37:59.554] FTL commit: 8493df4
[2018-08-29 08:37:59.554] FTL date: 2018-08-05 13:40:30 -0700
[2018-08-29 08:37:59.555] FTL user: pihole
[2018-08-29 08:37:59.555] Received signal: Segmentation fault
[2018-08-29 08:37:59.555] at address: 0
[2018-08-29 08:37:59.555] with code: SEGV_MAPERR (Address not mapped to object)
[2018-08-29 08:37:59.555] Backtrace:
[2018-08-29 08:37:59.555] B[0000]: /usr/bin/pihole-FTL(+0x1870a) [0x4af70a]
[2018-08-29 08:37:59.556] B[0001]: /lib/arm-linux-gnueabihf/libc.so.6(__default_rt_sa_restorer+0) [0x76e446c0]
[2018-08-29 08:37:59.556] Thank you for helping us to improve our FTL engine!
[2018-08-29 08:37:59.556] FTL terminated!

Device specifics

Hardware Type: Raspberry Pi 2 Model B Rev 1.1
OS: Linux pihole 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

This template was created based on the work of udemy-dl.

@cwadds
Copy link
Author

cwadds commented Aug 29, 2018

Further information:
Output of command: file $(which pihole-FTL)
/usr/bin/pihole-FTL: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=5864a2037d20fbf1a54d3ee377c9ebbc0b7400da, not stripped

@DL6ER
Copy link
Member

DL6ER commented Aug 29, 2018

Please run

addr2line 0x1870a -e $(which pihole-FTL)
addr2line 0x4af70a -e $(which pihole-FTL)

@cwadds
Copy link
Author

cwadds commented Aug 29, 2018 via email

@DL6ER
Copy link
Member

DL6ER commented Aug 29, 2018

Okay, thanks. Unfortunately, that isn't very helpful.

Could you run

sudo service pihole stop
sudo gdb -ex run --args $(which pihole-FTL) debug

?

When it crashes, copy the output here. Please also enter backtrace and post the output here.

@cwadds
Copy link
Author

cwadds commented Aug 29, 2018 via email

@DL6ER
Copy link
Member

DL6ER commented Aug 30, 2018

pihole-FTL crashes while parsing the file /etc/dnsmasq.d/03-reverse.conf. I don't recall it being a standard Pi-hole provided file. What are its contents?

From the backtrace, I assume that the failure is triggered by a synth-domain= (or domain= ?) line in this file.

@DL6ER
Copy link
Member

DL6ER commented Aug 30, 2018

@cwadds Looking again at the synth-domain code part of dnsmasq, it seems quite likely that the variable new->prefix may be used uninitialized but I can only be sure once I can reproduce this crash using your config file.

@cwadds
Copy link
Author

cwadds commented Aug 30, 2018 via email

@DL6ER
Copy link
Member

DL6ER commented Aug 31, 2018

Is there any likelihood of being able to use the reverse lookup functionality in pihole?

Yes, this is a bug (we adopted this bug from dnsmasq 2.79) and will be fixed. The prefix is, unfortunately, not as optional as the documentation suggests.

You could use

synth-domain=wadds.net.au,192.168.200.0/24,internal

to obtain

internal-192-168-200-1.wadds.net.au

I'll work on a bug fix. Thanks for reporting this!

@DL6ER DL6ER changed the title pihole-FTL will not start after update to V4 on R-Pi 2 synth-domain crashes dnsmasq code Aug 31, 2018
@DL6ER DL6ER added this to the v4.1 milestone Aug 31, 2018
@DL6ER DL6ER self-assigned this Aug 31, 2018
@cwadds
Copy link
Author

cwadds commented Aug 31, 2018

Thanks for your efforts.

I'll try your suggestion.

@DL6ER
Copy link
Member

DL6ER commented Aug 31, 2018

This bug is a confirmed dnsmasq bug introduced in version 2.79 (which happens to be the version we currently bundle with pihole-FTL). This bug will be fixed by #369 for the next release Pi-hole v4.1

@DL6ER
Copy link
Member

DL6ER commented Aug 31, 2018

Note: This issue will be auto-closed once Pi-hole FTL v4.1 is released

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

No branches or pull requests

2 participants