Project

General

Profile

Actions

Bug #3940

closed
TH RB

check_reload_status uses deprecated libevent-1.4

Bug #3940: check_reload_status uses deprecated libevent-1.4

Added by Thomas Hilse almost 12 years ago. Updated almost 12 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

TH Updated by Thomas Hilse almost 12 years ago Actions #1

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

CB Updated by Chris Buechler almost 12 years ago Actions #2

  • Target version set to 2.2

RB Updated by Renato Botelho almost 12 years ago Actions #3

  • Assignee set to Renato Botelho

RB Updated by Renato Botelho almost 12 years ago Actions #4

  • 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.

RB Updated by Renato Botelho almost 12 years ago Actions #5

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

RB Updated by Renato Botelho almost 12 years ago Actions #6

That previous patch is not correct, consider this one.

TH Updated by Thomas Hilse almost 12 years ago Actions #7

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.

RB Updated by Renato Botelho almost 12 years ago Actions #8

pfsense-tools repo already have the final patch applied, please try it or wait new snapshots today yet.

RB Updated by Renato Botelho almost 12 years ago Actions #9

  • % Done changed from 0 to 100

New snapshots are available, using libevent 2.0 and check_reload_status with fixes.

TH Updated by Thomas Hilse almost 12 years ago Actions #10

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

RB Updated by Renato Botelho almost 12 years ago Actions #11

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom