• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug report: double free or corruption (!prev)
#1
Bug 
Hi,
Code:
pilight-daemon version v7.0-59-g6f3a679
Devices (extract) in question:
Code:
"script-sms-wan-disconnected": {
            "uuid": "0000-b8-27-eb-ea2020",
            "protocol": [ "program" ],
            "id": [{
                "name": "wan-disconnected"
            }],
            "program": "/bin/bash",
            "arguments": "/home/pi/send-sms-wan-disconnected.sh",
            "start-command": "/bin/bash /home/pi/send-sms-wan-disconnected.sh",
            "stop-command": "",
            "state": "stopped",
            "pid": 0
        },
        "script-sms-wan-connected": {
            "uuid": "0000-b8-27-eb-ea2020",
            "protocol": [ "program" ],
            "id": [{
                "name": "wan-connected"
            }],
            "program": "/bin/bash",
            "arguments": "/home/pi/send-sms-wan-connected.sh",
            "start-command": "/bin/bash /home/pi/send-sms-wan-connected.sh",
            "stop-command": "",
            "state": "stopped",
            "pid": 0
        },
        "dev-wan": {
            "protocol": [ "ping" ],
            "id": [{
                "ip": "80.69.100.213"
            }],
            "state": "connected"
        },
Rules in question:
Code:
"27-send-sms-on-wan-disconnected": {
            "rule": "IF dev-wan.state IS disconnected THEN switch DEVICE script-sms-wan-disconnected TO running",
            "active": 1
        },
        "28-send-sms-on-wan-connected": {
            "rule": "IF dev-wan.state IS connected THEN switch DEVICE script-sms-wan-connected TO running",
            "active": 1
        }
Now, when I add those rules, I get a crash:
Code:
[ ok ] Starting : pilight.
root@homepi:/home/pi# *** glibc detected *** /usr/local/sbin/pilight-daemon: double free or corruption (!prev): 0x02081148 ***
-- STACKTRACE (1 FRAMES) --
Backtrace:
Code:
(gdb) backtrace
#0  0xb6d6a8dc in raise () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0xb6d6e65c in abort () from /lib/arm-linux-gnueabihf/libc.so.6
#2  0x00000018 in ?? ()
#3  0x00000018 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) frame 3
#3  0x00000018 in ?? ()
(gdb) frame 2
#2  0x00000018 in ?? ()
(gdb) frame 1
#1  0xb6d6e65c in abort () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) frame 0
#0  0xb6d6a8dc in raise () from /lib/arm-linux-gnueabihf/libc.so.6
I don't get more information than that..
Without the rules pilight starts normally; triggering these programs (scripts) via webgui works then as well. Did I miss something?
Infrastructure: two nodes, in ad-hoc network. Scripts are located on secondary node.
Thx!
 
Reply
#2
Can you test the rewrite branch?
 
Reply
#3
Oh, I guess this means compiling manually?
 
Reply
#4
Yes
 
Reply
#5
Code:
pilight-daemon version 8d2ff19
Installed without errors. pilight-daemon starting normally with the config.json provided. With my config.json it is hung at...:
Code:
root@homepi:/etc/pilight# pilight-daemon -D
[Mar 05 10:46:47:301149] pilight-daemon: INFO: datetime zeit 8.530310:50.154030 seems to be in timezone: Europe/Berlin
[Mar 05 10:46:47:385190] pilight-daemon: INFO: sunriseset sunrise 8.530310:50.154030 seems to be in timezone: Europe/Berlin
[Mar 05 10:46:47:390549] pilight-daemon: DEBUG: running on a raspberrypi
My (cleaned) config.json attached.


Attached Files
.txt   config.json.txt (Size: 19.52 KB / Downloads: 4)
 
Reply
#6
Can you try again with the latest code.
 
Reply
#7
Is there a simple way to update, or is it rather clone&compile from scratch?
(sorry for stupid questions, never used git clone and manual compiling before... I prefer .deb packages Big Grin)
 
Reply
#8
If you have cloned the branch already, just 'cd' into that directory and run 'git pull' to fetch new commits to that branch. Then you can use 'sudo ./setup.sh' or 'make && sudo make install' to compile and install pilight.
 
Reply
#9
Somehow I guess I'm doing something wrong:
Code:
cd /home/pi/git/
cd pilight/
git pull
chmod +x setup.sh
./setup.sh
pilight-daemon -V
pilight-daemon version 8d2ff19
still the same version after install...?? But some differences have been pulled though... Restored config file and...:
Code:
root@homepi:/etc/pilight# service pilight stop
[ ok ] Stopping : pilight.
root@homepi:/etc/pilight# rm config.json
root@homepi:/etc/pilight# cp /home/pi/config.json.latest config.json
root@homepi:/etc/pilight# pilight-daemon -D
[Mar 05 19:38:07:268392] pilight-daemon: INFO: datetime zeit 8.530310:50.154030 seems to be in timezone: Europe/Berlin
[Mar 05 19:38:07:365748] pilight-daemon: INFO: sunriseset sunrise 8.530310:50.154030 seems to be in timezone: Europe/Berlin
[Mar 05 19:38:07:380693] pilight-daemon: DEBUG: running on a raspberrypi
Confused
 
Reply
#10
Removed everything, installed from scratch using the manual. Now the correct version is reported:
Code:
root@homepi:/etc/pilight# pilight-daemon -V
pilight-daemon version b66e158
But still no change to previous...
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Bug: double free or corruption in pilight-send blackzombie 12 100 10-07-2019, 08:15 PM
Last Post: blackzombie
Bug Bug report: WIFI dongle stops when gpio_switch.gpio = 20 woutput 16 5,026 01-03-2018, 10:11 PM
Last Post: zackdvd
Bug Bug report: segmentation fault using rule with AFTER woutput 3 2,534 11-22-2015, 12:27 PM
Last Post: woutput
Bug Bug report: gpio_switch does not accept high pin numbers woutput 2 2,361 10-12-2015, 03:54 PM
Last Post: woutput
  Bug Report: pilight will not compile if the ARP protocol is not specified UndeadKernel 1 1,940 05-01-2015, 09:41 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)