Bug #3940
closedcheck_reload_status uses deprecated libevent-1.4
100%
Description
The snapshot 2.2 builds uses deprecated libevent-1.4 library. The Makefile of "check_reload_status" was fixed with commit 563c70dea12890ac0525c56557ade142d3098285 (to the pfsense tools repository). However on my custom pfsense v2.2 build (which uses libevent2-2.0, commit 563c70dea12890ac0525c56557ade142d3098285) the process check_reload_status consumes 100% CPU.
Files
Updated by Thomas Hilse almost 10 years ago
As crosscheck: I just have build check_reload_status using libevent-1.4.14b-stable. With this version the load is ok.
Updated by Renato Botelho over 9 years ago
- Status changed from New to Confirmed
I built a custom image and confirmed it. We are not seeing it on our snapshots because builder was not updated and still has libevent 1.4.
Updated by Renato Botelho over 9 years ago
- File check_reload_status.patch check_reload_status.patch added
- Status changed from Confirmed to Feedback
Thomas, could you try attached patch, built with libevent 2.0 and let me know the result?
Updated by Renato Botelho over 9 years ago
That previous patch is not correct, consider this one.
Updated by Thomas Hilse over 9 years ago
After applying your patch there are still 3 statements with "socket_close_command(fd, ev);" left:
root@pfsense-build-2-2:/home/pfsense/tools # grep -n socket_close pfPorts/check_reload_status/files/check_reload_status.c
630: socket_close_command(fd, ev);
634: socket_close_command(fd, ev);
641: socket_close_command(fd, ev);
Therefore the compilation fails:
root@pfsense-build-2-2:/usr/ports/sysutils/check_reload_status # make===> Building for check_reload_status-0.0.4
cc -O2 -pipe -I/usr/local/include -L/usr/local/lib -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -fno-strict-aliasing -lsbuf -levent -o /usr/ports/sysutils/check_reload_status/work/check_reload_status-0.0.4/check_reload_status /usr/ports/sysutils/check_reload_status/files/check_reload_status.c
/usr/ports/sysutils/check_reload_status/files/check_reload_status.c:630:4: error: implicit declaration of function
'socket_close_command' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
socket_close_command(fd, ev);
^
/usr/ports/sysutils/check_reload_status/files/check_reload_status.c:630:29: error: use of undeclared identifier 'ev'
socket_close_command(fd, ev);
^
/usr/ports/sysutils/check_reload_status/files/check_reload_status.c:634:30: error: use of undeclared identifier 'ev'
socket_close_command(fd, ev);
^
/usr/ports/sysutils/check_reload_status/files/check_reload_status.c:641:28: error: use of undeclared identifier 'ev'
socket_close_command(fd, ev);
^
4 errors generated.
- Error code 1
I will try to replace "socket_close_command" with "close" (compilation was successfull) and try those binaries. I will report if this works an my test setup.
Updated by Renato Botelho over 9 years ago
pfsense-tools repo already have the final patch applied, please try it or wait new snapshots today yet.
Updated by Renato Botelho over 9 years ago
- % Done changed from 0 to 100
New snapshots are available, using libevent 2.0 and check_reload_status with fixes.
Updated by Thomas Hilse over 9 years ago
It also looks good on my custom build - no high CPU load.
Updated by Renato Botelho over 9 years ago
- Status changed from Feedback to Resolved