Valgrind is reporting memory leak in freeradius 2.2.6

Dextrous bg ahmednifaz at gmail.com
Fri Apr 5 12:20:09 CEST 2019


Hi ,

The below is the valgrind leak summary for freeradius,
Its part of our WiFi controller, being used as radiusproxy there.
The upgrade of freeradius version is out of question due to many reasons
:-(. Need to fix via patch here or conclude as valgrind reported false
positives.

==31435== 1,104 (136 direct, 968 indirect) bytes in 1 blocks are definitely
lost in loss record 619 of 653
==31435==    at 0x4C2D03B: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==31435==    by 0x4301C7: rad_malloc (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x41F116: listen_alloc (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x41F3C2: proxy_new_listener (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x4475F9: home_server_create_callback (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x5297D11: WalkNodeInOrder (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/lib/libfreeradius-radius-020206.so)
==31435==    by 0x5297CDF: WalkNodeInOrder (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/lib/libfreeradius-radius-020206.so)
==31435==    by 0x5297CDF: WalkNodeInOrder (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/lib/libfreeradius-radius-020206.so)
==31435==    by 0x5297CDF: WalkNodeInOrder (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/lib/libfreeradius-radius-020206.so)
==31435==    by 0x5297E92: rbtree_walk (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/lib/libfreeradius-radius-020206.so)
==31435==    by 0x447649: home_server_create_listeners (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x420133: listen_init (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)


==31435== 294,029 (16,640 direct, 277,389 indirect) bytes in 40 blocks are
definitely lost in loss record 652 of 653
==31435==    at 0x4C2D03B: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==31435==    by 0x4301C7: rad_malloc (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x43024B: request_alloc (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x43CC7A: received_request (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x418411: acct_socket_recv (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x43DBC4: event_socket_handler (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x52A0760: fr_event_loop (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/lib/libfreeradius-radius-020206.so)
==31435==    by 0x43E3F1: radius_event_process (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x4297C0: main (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)

==31435== 294,029 (16,640 direct, 277,389 indirect) bytes in 40 blocks are
definitely lost in loss record 652 of 653
==31435==    at 0x4C2D03B: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==31435==    by 0x4301C7: rad_malloc (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x43024B: request_alloc (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x43CC7A: received_request (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x418411: acct_socket_recv (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x43DBC4: event_socket_handler (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x52A0760: fr_event_loop (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/lib/libfreeradius-radius-020206.so)
==31435==    by 0x43E3F1: radius_event_process (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)
==31435==    by 0x4297C0: main (in
/opt/wifi_dev/wlc_merge/wlc_trunk_merge/opensource/Radius/deliverydir/sbin/radiusd)

Please help, if any known memory leak issue already there.
Or pls share what are the data structures here which are not properly freed.
appreciate the support :-).

Thanks and
regards
Ahmed


More information about the Freeradius-Users mailing list