• 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
[Solved] wiringX initialisation error
#1
Trying to install the rewrite on my pi, after a succesfull installation and default config i tried to start pilight-daemon - D. Resulting in the following error:

Code:
pilight-daemon -D
[Apr 06 20:59:05:586943] pilight-daemon: ERROR: config setting #4 "gpio-platform" must contain a supported gpio platform
[Apr 06 20:59:05:590812] pilight-daemon: INFO: version 0f6c72b
[Apr 06 20:59:05:695246] pilight-daemon: DEBUG: added worker: 1
*** Error in `pilight-daemon': realloc(): invalid pointer: 0xb6d0e55c ***
-- STACKTRACE (15 FRAMES) --
__default_sa_restorer_v2       ip = 0xb6c00180, sp = 0xbec65350
gsignal                        ip = 0xb6bfef70, sp = 0xbec65640
abort                          ip = 0xb6c00324, sp = 0xbec65648
__fsetlocking                  ip = 0xb6c3a954, sp = 0xbec65760
_IO_str_seekoff                ip = 0xb6c40b80, sp = 0xbec65898
realloc                        ip = 0xb6c45858, sp = 0xbec658c0
platform_register              ip =    0x9aac8, sp = 0xbec658e8
pcduino1Init                   ip =    0x9b348, sp = 0xbec65900
wiringXSetup                   ip =    0x96dcc, sp = 0xbec65910
gpio433HwInit                  ip =   0x1cff48, sp = 0xbec65d38
start_pilight                  ip =    0x94598, sp = 0xbec65d68
main                           ip =    0x9474c, sp = 0xbec66658
__libc_start_main              ip = 0xb6be9294, sp = 0xbec66670
_start                         ip =    0x8c8c4, sp = 0xbec667b8
Aborted

Telling me to setup a "gpio-platform" after reading some posts on the forum i found out that i can get the supported platforms by typing pilight-daemon -H. But that is resulting with the following error:
Code:
The following GPIO platforms are supported:
*** Error in `pilight-daemon': realloc(): invalid pointer: 0xb6c93544 ***
Aborted

Any idea what could be the problem?

after sleeping a night, i was thinking maybe i also have to install the rewrite of wiringx (https://github.com/wiringX/wiringX/tree/rewrite) can someone confirm?
 
Reply
#2
wiringx is bundled with pilight, so you shouldn't have to do that.

Can you use the debugging instructions in the manual (pilight manual -> Development -> Debugging) to get a gdb backtrace for the crash please?
 
Reply
#3
Backtrace of pilight-daemon -D
Code:
#0  0xb6c35f70 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0xb6c37324 in __GI_abort () at abort.c:89
#2  0xb6c71954 in __libc_message (do_abort=<optimized out>,
    fmt=0xb6d27830 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0xb6c77b80 in malloc_printerr (action=1,
    str=0xb6d28254 "realloc(): invalid pointer", ptr=<optimized out>)
    at malloc.c:4996
#4  0xb6c7c858 in __GI___libc_realloc (oldmem=0xb6d45544 <main_arena+112>,
    bytes=4) at malloc.c:2986
#5  0x0009aac8 in platform_register (platform=0xa00afc <pcduino1>,
    name=0x262698 "pcduino1")
    at /home/pi/pilight/libs/wiringx/platform/platform.c:24
#6  0x0009b348 in pcduino1Init ()
    at /home/pi/pilight/libs/wiringx/platform/linksprite/pcduino1.c:96
#7  0x00096dcc in wiringXSetup (name=0xa18620 "raspberrypi1b2",
    func=0xb9654 <logprintf>) at /home/pi/pilight/libs/wiringx/wiringX.c:223
#8  0x001cff48 in gpio433HwInit (callback=0x8cfb4 <receivePulseTrain>)
    at /home/pi/pilight/libs/pilight/hardware/433gpio.c:119
#9  0x00094598 in start_pilight (argc=2, argv=0xbefff7d4)
    at /home/pi/pilight/daemon.c:2520
#10 0x0009474c in main (argc=2, argv=0xbefff7d4)
at /home/pi/pilight/daemon.c:2729

next step frame by frame
Code:
(gdb) frame 10
#10 0x0009474c in main (argc=2, argv=0xbefff7d4)
    at /home/pi/pilight/daemon.c:2729
2729            int ret = start_pilight(argc, argv);
(gdb) frame 9
#9  0x00094598 in start_pilight (argc=2, argv=0xbefff7d4)
    at /home/pi/pilight/daemon.c:2520
2520                                            if(hardware->init(receivePulseTrain) == EXIT_FAILURE) {
(gdb) frame 8
#8  0x001cff48 in gpio433HwInit (callback=0x8cfb4 <receivePulseTrain>)
    at /home/pi/pilight/libs/pilight/hardware/433gpio.c:119
119             if(wiringXSetup(platform, logprintf) < 0) {
(gdb) frame 7
#7  0x00096dcc in wiringXSetup (name=0xa18620 "raspberrypi1b2",
    func=0xb9654 <logprintf>) at /home/pi/pilight/libs/wiringx/wiringX.c:223
223             pcduino1Init();
(gdb) frame 6
#6  0x0009b348 in pcduino1Init ()
    at /home/pi/pilight/libs/wiringx/platform/linksprite/pcduino1.c:96
96              platform_register(&pcduino1, "pcduino1");
(gdb) frame 5
#5  0x0009aac8 in platform_register (platform=0xa00afc <pcduino1>,
    name=0x262698 "pcduino1")
    at /home/pi/pilight/libs/wiringx/platform/platform.c:24
24              if(((*platform)->name = realloc((*platform)->name, ((*platform)->nralias+1)*sizeof(char *))) == NULL) {
(gdb) frame 4
#4  0xb6c7c858 in __GI___libc_realloc (oldmem=0xb6d45544 <main_arena+112>,
    bytes=4) at malloc.c:2986
2986    malloc.c: No such file or directory.
(gdb) frame 3
#3  0xb6c77b80 in malloc_printerr (action=1,
    str=0xb6d28254 "realloc(): invalid pointer", ptr=<optimized out>)
    at malloc.c:4996
4996    in malloc.c
(gdb) frame 3
#3  0xb6c77b80 in malloc_printerr (action=1,
    str=0xb6d28254 "realloc(): invalid pointer", ptr=<optimized out>)
    at malloc.c:4996
4996    in malloc.c
(gdb) frame 2
#2  0xb6c71954 in __libc_message (do_abort=<optimized out>,
    fmt=0xb6d27830 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
175     ../sysdeps/posix/libc_fatal.c: No such file or directory.
(gdb) frame 1
#1  0xb6c37324 in __GI_abort () at abort.c:89
89      abort.c: No such file or directory.
(gdb)
 
Reply
#4
Can you post your config?
 
Reply
#5
Tried different configs that worked on the stable, but all getting the same error. When i did the backtrace i was using the unmodified default config.

Code:
{
        "devices": {},
        "gui": {},
        "rules": {},
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "gpio-platform": "raspberrypi1b2",
                "webserver-enable": 1,
                "webserver-root": "/usr/local/share/pilight/",
                "webserver-http-port": 5001,
                "webserver-https-port": 5002,
                "webserver-cache": 1,
                "whitelist": ""
        },
        "hardware": {
                "433gpio": {
                        "sender": 0,
                        "receiver": 1
                }
        },
        "registry": {}
 
Reply
#6
This bug should be fixed.
 
Reply
#7
yes Smile it is!!!
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Solved] openSUSE 13.2 "pilight-daemon -H" segfault pilino1234 2 1,866 04-22-2016, 08:39 AM
Last Post: pilino1234
Bug [Solved] no gpio-platform configured koos147 5 7,829 04-20-2016, 08:01 PM
Last Post: ksmedts
  [Solved] First transmission causes full cpu usage andiwand 11 4,452 04-19-2016, 06:16 AM
Last Post: curlymo
  [Solved] Compilation error under openSUSE pilino1234 4 2,118 04-16-2016, 08:23 AM
Last Post: pilino1234
  [Solved] pilight-receive fills log with empty DEBUG messages pilino1234 1 1,595 04-12-2016, 07:29 PM
Last Post: curlymo
  [Solved] Crash on invalid config.json syntax pilino1234 10 4,817 04-01-2016, 05:40 PM
Last Post: curlymo
  [Solved] Time Stamp Information wo_rasp 5 2,277 03-05-2016, 11:29 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)