• 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
Full cpu usage after random time
#1
Bug 
i noticed that after a random time (like a week) the pilight process is not responding any more. when i kill the process the config is wrong: the state of a device is set to "down" instead of "off".

i dont have any logs yet. i try to get some.
 
Reply
#2
What commit are you using? And please post your config.
 
Reply
#3
i use the current rewrite commit (e95959b).

my config:

Code:
{
        "devices": {
                "uplight": {
                        "protocol": [ "kaku_dimmer" ],
                        "id": [{
                                "id": 1,
                                "unit": 1
                        }],
                        "state": "on",
                        "dimlevel": 11,
                        "dimlevel-minimum": 1,
                        "dimlevel-maximum": 15
                },
                "toplight": {
                        "protocol": [ "clarus_switch" ],
                        "id": [{
                                "id": "A2",
                                "unit": 50
                        }],
                        "state": "off"
                },
                "tvlight": {
                        "protocol": [ "clarus_switch" ],
                        "id": [{
                                "id": "B1",
                                "unit": 50
                        }],
                        "state": "off"
                },
                "bedlight": {
                        "protocol": [ "clarus_switch" ],
                        "id": [{
                                "id": "C3",
                                "unit": 50
                        }],
                        "state": "on"
                },
                "kitchen": {
                        "protocol": [ "kaku_switch_old" ],
                        "id": [{
                                "id": 0,
                                "unit": 11
                        }],
                        "state": "off"
                },
                "tmp-1": {
                        "protocol": [ "clarus_switch" ],
                        "id": [{
                                "id": "C3",
                                "unit": 48
                        }],
                        "state": "off"
                },
                "switch1": {
                        "protocol": [ "clarus_switch" ],
                        "id": [{
                                "id": "A2",
                                "unit": 40
                        }],
                        "state": "off"
                },
                "switch2": {
                        "protocol": [ "clarus_switch" ],
                        "id": [{
                                "id": "B1",
                                "unit": 40
                        }],
                        "state": "off"
                },
                "switch3": {
                        "protocol": [ "clarus_switch" ],
                        "id": [{
                                "id": "C3",
                                "unit": 40
                        }],
                        "state": "off"
                }
        },
        "rules": {
                "switch1-on": {
                        "rule": "IF switch1.state IS on THEN switch DEVICE bedli                                 ght TO on",
                        "active": 1
                },
                "switch1-off": {
                        "rule": "IF switch1.state IS off THEN switch DEVICE bedl                                 ight TO off",
                        "active": 1
                }
        },
        "gui": {
                "uplight": {
                        "name": "up",
                        "group": [ "Upstairs", "Bedroom andreas" ]
                },
                "toplight": {
                        "name": "top",
                        "group": [ "Upstairs", "Bedroom andreas" ]
                },
                "tvlight": {
                        "name": "tv",
                        "group": [ "Upstairs", "Bedroom andreas" ]
                },
                "bedlight": {
                        "name": "bed",
                        "group": [ "Upstairs", "Bedroom andreas" ]
                },
                "kitchen": {
                        "name": "kitchen 2nd top",
                        "group": [ "Ground floor", "Kitchen" ]
                },
                "tmp-1": {
                        "name": "new livingroom uplight",
                        "group": [ "Ground floor", "New livingroom" ]
                }
        },
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "webserver-enable": 1,
                "webserver-root": "/usr/local/share/pilight/",
                "webserver-http-port": 5001,
                "webserver-cache": 1,
                "gpio-platform": "raspberrypi1b2"
        },
        "hardware": {
                "433gpio": {
                        "sender": 0,
                        "receiver": 1,
                        "media-access-control": "csma",
                        "csma-wait-n-frames": 5,
                        "csmacd-wait-min": 200000,
                        "csmacd-wait-unit": 50000,
                        "csmacd-wait-max-units": 5
                }
        },
        "registry": {
                "webgui": {
                        "tabs": 0
                },
                "pilight": {
                        "version": {
                                "current": "7.0"
                        }
                }
        }
}

what do i need to debug the rewrite version? before i used gdb like described in the doc. but i doesn't work for me any more.

Code:
(gdb) run -D
Starting program: /usr/local/sbin/pilight-daemon -D
Cannot parse expression `.L966 4@r4'.
warning: Probes-based dynamic linker interface failed.
Reverting to original interface.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[May 01 18:46:30:585417] INFO: rule #1 living-switch-a1-on was parsed in 0.000500 seconds
[May 01 18:46:30:586095] INFO: rule #2 living-switch-a1-off was parsed in 0.000360 seconds
[May 01 18:46:30:586505] INFO: rule #3 living-switch-a2-on was parsed in 0.000342 seconds
[May 01 18:46:30:586908] INFO: rule #4 living-switch-a2-off was parsed in 0.000345 seconds
[May 01 18:46:30:587429] INFO: rule #5 living-switch-b1-on was parsed in 0.000460 seconds
[May 01 18:46:30:587953] INFO: rule #6 living-switch-b1-off was parsed in 0.000462 seconds
[May 01 18:46:30:588341] INFO: rule #7 living-switch-b2-on was parsed in 0.000326 seconds
[May 01 18:46:30:588733] INFO: rule #8 living-switch-b2-off was parsed in 0.000331 seconds
[May 01 18:46:30:601603] INFO: version v7.0-139-g8a255a1
[New Thread 0x76435450 (LWP 29156)]
[May 01 18:46:30:667330] INFO: pilight will dynamically use between 1 and 4 cores
[New Thread 0x75c35450 (LWP 29157)]
[May 01 18:46:30:668673] DEBUG: added worker: 1
[New Thread 0x752ff450 (LWP 29158)]
[May 01 18:46:30:678465] INFO: daemon listening to port: 5000
[May 01 18:46:30:678649] INFO: secured webserver started on port: 5002
[May 01 18:46:30:678749] INFO: regular webserver started on port: 5001

Thread 1 "pilight-daemon" received signal SIG34, Real-time event 34.
0x76cebc90 in poll () at ../sysdeps/unix/syscall-template.S:84
84      ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb)
 
Reply
#4
You need to ignore signal 34 so it doesn't stop when it receives it.

Also, can you test without the custom 433gpio module?
 
Reply
#5
ok thank you! i will try it without my module too.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Sunrise and daylight saving time issue apartmedia 21 2,917 04-22-2018, 07:44 PM
Last Post: curlymo
  Resource usage curlymo 3 1,567 05-22-2016, 02:43 PM
Last Post: curlymo
  [Solved] First transmission causes full cpu usage andiwand 11 4,285 04-19-2016, 06:16 AM
Last Post: curlymo
  Time based calculations wo_rasp 7 2,575 03-19-2016, 01:28 AM
Last Post: wo_rasp
  [Solved] Time Stamp Information wo_rasp 5 2,187 03-05-2016, 11:29 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)