Project

General

Profile

Actions

Bug #3940

closed

check_reload_status uses deprecated libevent-1.4

Added by Thomas Hilse over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
Start date:
10/16/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.2
Affected Architecture:

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

check_reload_status.patch (2.68 KB) check_reload_status.patch Renato Botelho, 10/29/2014 06:52 PM
check_reload_status.patch (2.68 KB) check_reload_status.patch Renato Botelho, 10/30/2014 07:47 AM
Actions #1

Updated by Thomas Hilse over 9 years ago

As crosscheck: I just have build check_reload_status using libevent-1.4.14b-stable. With this version the load is ok.

Actions #2

Updated by Chris Buechler over 9 years ago

  • Target version set to 2.2
Actions #3

Updated by Renato Botelho over 9 years ago

  • Assignee set to Renato Botelho
Actions #4

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.

Actions #5

Updated by Renato Botelho over 9 years ago

Thomas, could you try attached patch, built with libevent 2.0 and let me know the result?

Actions #6

Updated by Renato Botelho over 9 years ago

That previous patch is not correct, consider this one.

Actions #7

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.

Actions #8

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.

Actions #9

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.

Actions #10

Updated by Thomas Hilse over 9 years ago

It also looks good on my custom build - no high CPU load.

Actions #11

Updated by Renato Botelho over 9 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF