Bug 660211 - NTOP seg fault on activating NetFlow
Summary: NTOP seg fault on activating NetFlow
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ntop
Version: 14
Hardware: i686
OS: Linux
low
high
Target Milestone: ---
Assignee: Rakesh Pandit
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-06 05:29 UTC by Kurt Heine
Modified: 2013-05-02 02:15 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-10 22:30:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kurt Heine 2010-12-06 05:29:01 UTC
Description of problem:
When I enable NetFlow ntop segfaults

Version-Release number of selected component (if applicable):
ntop-3.4-0.2.pre3.fc14.i686

How reproducible:
All the time

Steps to Reproduce:
1. Login via web page
2. Select plugins->NetFlow->Activate
3. Enable netflow device
  
Actual results:
Ntop stops running with a seg fault.

Expected results:
Ntop continues to run and monitors Cisco router's netflow traffic


Additional info:
gdb info
========
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xaf1deb70 (LWP 26570)]
netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:2220
2220      traceEvent(CONST_TRACE_INFO, "THREADMGMT[t%lu]: NETFLOW: thread terminated [p%d][netFlowDeviceId=%d]",


Mon Dec  6 15:41:20 2010  THREADMGMT[t2937973616]: NETFLOW: Started thread for receiving flows on port 2055
Mon Dec  6 15:41:20 2010  Initializing device NetFlow-device.2 (1)
Mon Dec  6 15:41:20 2010  NETFLOW: createNetFlowDevice created device 1
Mon Dec  6 15:41:21 2010  NETFLOW: Terminating NetFlow
Mon Dec  6 15:41:21 2010  NETFLOW: terminating device NetFlow-device.0
Mon Dec  6 15:41:21 2010  NETFLOW: Thanks for using ntop NetFlow
Mon Dec  6 15:41:21 2010  NETFLOW: Done

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xaf1deb70 (LWP 26570)]
netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:2220
2220      traceEvent(CONST_TRACE_INFO, "THREADMGMT[t%lu]: NETFLOW: thread terminated [p%d][netFlowDeviceId=%d]",
(gdb) bt full
#0  netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:2220
        netflowMask = {fds_bits = {0 <repeats 32 times>}}
        rc = <value optimized out>
        len = 0
        deviceId = 1
        probeId = -1
        buffer = '\000' <repeats 2047 times>
        fromHost = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "\000\000\000\000\000\000\000"}
#1  0x00d49f19 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#2  0x00c8ac5e in clone () from /lib/libc.so.6
No symbol table info available.
(gdb)  print deviceId
$1 = 1
(gdb) list
2215        myGlobals.device[deviceId].netflowGlobals->netFlowUtilsThread = 0;
2216    #endif
2217      }
2218      myGlobals.device[deviceId].activeDevice = 0;
2219
2220      traceEvent(CONST_TRACE_INFO, "THREADMGMT[t%lu]: NETFLOW: thread terminated [p%d][netFlowDeviceId=%d]",
2221                 (long unsigned int)pthread_self(), getpid(),
2222                 myGlobals.device[deviceId].netflowGlobals->netFlowDeviceId);
2223
2224      return(NULL);
(gdb) info stack
#0  netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:2220
#1  0x00d49f19 in start_thread () from /lib/libpthread.so.0
#2  0x00c8ac5e in clone () from /lib/libc.so.6
(gdb) info threads
  14 Thread 0xae9ddb70 (LWP 26571)  0x00110416 in __kernel_vsyscall ()
* 13 Thread 0xaf1deb70 (LWP 26570)  netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:2220
  12 Thread 0xb0effb70 (LWP 26569)  0x00110416 in __kernel_vsyscall ()
  11 Thread 0xb18fbb70 (LWP 26565)  0x00110416 in __kernel_vsyscall ()
  10 Thread 0xb20fcb70 (LWP 26564)  0x00110416 in __kernel_vsyscall ()
  9 Thread 0xb28fdb70 (LWP 26563)  0x00110416 in __kernel_vsyscall ()
  8 Thread 0xb30feb70 (LWP 26562)  0x00110416 in __kernel_vsyscall ()
  7 Thread 0xb38ffb70 (LWP 26561)  0x00110416 in __kernel_vsyscall ()
  6 Thread 0xb42ffb70 (LWP 26560)  0x00110416 in __kernel_vsyscall ()
  5 Thread 0xb4cfeb70 (LWP 26559)  0x00110416 in __kernel_vsyscall ()
  4 Thread 0xb54ffb70 (LWP 26558)  0x00110416 in __kernel_vsyscall ()
  3 Thread 0xb5e33b70 (LWP 26557)  0x00110416 in __kernel_vsyscall ()
  1 Thread 0xb7fe2830 (LWP 26551)  0x00110416 in __kernel_vsyscall ()
(gdb) thread 13
[Switching to thread 13 (Thread 0xaf1deb70 (LWP 26570))]#0  netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:2220
2220      traceEvent(CONST_TRACE_INFO, "THREADMGMT[t%lu]: NETFLOW: thread terminated [p%d][netFlowDeviceId=%d]",
(gdb) list
2215        myGlobals.device[deviceId].netflowGlobals->netFlowUtilsThread = 0;
2216    #endif
2217      }
2218      myGlobals.device[deviceId].activeDevice = 0;
2219
2220      traceEvent(CONST_TRACE_INFO, "THREADMGMT[t%lu]: NETFLOW: thread terminated [p%d][netFlowDeviceId=%d]",
2221                 (long unsigned int)pthread_self(), getpid(),
2222                 myGlobals.device[deviceId].netflowGlobals->netFlowDeviceId);
2223
2224      return(NULL);
(gdb) print (long unsigned int)pthread_self()
$2 = 2937973616
(gdb) print getpid()
$3 = 26551
(gdb) print myGlobals.device[1].netflowGlobals->netFlowDeviceId
Cannot access memory at address 0x1c
(gdb)

Comment 1 Fedora Update System 2012-08-02 05:11:59 UTC
ntop-5.0-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ntop-5.0-2.fc17

Comment 2 Sven Lankes 2012-08-02 05:19:49 UTC
So marking this bug fixed with the 5.0 update was an error at first but my limited testing suggests that the bug is actually gone.

So I'm going to close this bug when the 5.0 update goes stable unless the issue is found in further testing/feedback.

Comment 3 Fedora Update System 2012-08-02 05:20:41 UTC
ntop-5.0-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ntop-5.0-2.fc17

Comment 4 Fedora Update System 2012-08-02 11:18:52 UTC
Package ntop-5.0-2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ntop-5.0-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11406/ntop-5.0-2.fc17
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-08-10 22:30:39 UTC
ntop-5.0-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Timothy M. Butterworth 2013-05-02 02:15:40 UTC
Setting up NetFlow on UDP 2055 using Fedora 18 x86_64 still has the segment fault issue.

This appears to happen as soon as NetFlow v5 packets are received. After the initial segment fault I have to delete the /var/lib/ntop/prefsCache.db to get NTOP to start up and run again.

NTOP version: ntop-5.0-2.fc18.x86_64

As soon as NetFlow is activated and NetFlow messages are received the segment fault happens again.


Note You need to log in before you can comment on or make changes to this bug.