Segmentation Fault during MPE_FILTERGROUP_EVENT_CANCELLED
Hi
I observed the segmentation fault during the cancellation of the section filtering (as the mpe_sitpSharedFilterCallback function param was referring to an invalid address) while running ChannelLoopTest (TC0117) of TDK. Possibly the fsm structure reference is not initialised when there is a no program number
GDB log snapshot:
Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 6360.0x1cb4]
0x0b339160 in mpe_sitpSharedFilterCallback (sharedFilter=0x23869ef8, filterGroup=0x601f630, userPointer=0x241a8508, userData=131360,
event=MPE_FILTERGROUP_EVENT_CANCELLED, sectionSize=0, sectionData=0x0, isLast=0) at mgr/simgr/sitp_psi.c:2997
2997 mgr/simgr/sitp_psi.c: No such file or directory.
in mgr/simgr/sitp_psi.c
#0 0x0b339160 in mpe_sitpSharedFilterCallback (sharedFilter=0x23869ef8, filterGroup=0x601f630, userPointer=0x241a8508, userData=131360,
event=MPE_FILTERGROUP_EVENT_CANCELLED, sectionSize=0, sectionData=0x0, isLast=0) at mgr/simgr/sitp_psi.c:2997
#1 0x0b269ae8 in filter_processFilterGroupThreadEvent (eventId=2, eventData1=0x0, eventData2=0x23869ef8, eventData3=0)
at mgr/filtermgr/filter_support.c:2677
#2 0x0b268418 in filter_filterGroupThread (threadData=0x0) at mgr/filtermgr/filter_support.c:2001
#3 0x0b2cdfb3 in threadStart (data=0x6021720) at ../RI_Win32/mpeos_thread.c:167
#4 0x7c80b729 in KERNEL32!GetModuleFileNameA () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#5 0x00000000 in ?? ()
(gdb) bt
#0 0x0b339160 in mpe_sitpSharedFilterCallback (sharedFilter=0x23869ef8, filterGroup=0x601f630, userPointer=0x241a8508, userData=131360,
event=MPE_FILTERGROUP_EVENT_CANCELLED, sectionSize=0, sectionData=0x0, isLast=0) at mgr/simgr/sitp_psi.c:2997
#1 0x0b269ae8 in filter_processFilterGroupThreadEvent (eventId=2, eventData1=0x0, eventData2=0x23869ef8, eventData3=0)
at mgr/filtermgr/filter_support.c:2677
#2 0x0b268418 in filter_filterGroupThread (threadData=0x0) at mgr/filtermgr/filter_support.c:2001
#3 0x0b2cdfb3 in threadStart (data=0x6021720) at ../RI_Win32/mpeos_thread.c:167
#4 0x7c80b729 in KERNEL32!GetModuleFileNameA () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#5 0x00000000 in ?? ()
(gdb) frame 0
#0 0x0b339160 in mpe_sitpSharedFilterCallback (sharedFilter=0x23869ef8, filterGroup=0x601f630, userPointer=0x241a8508, userData=131360,
event=MPE_FILTERGROUP_EVENT_CANCELLED, sectionSize=0, sectionData=0x0, isLast=0) at mgr/simgr/sitp_psi.c:2997
2997 in mgr/simgr/sitp_psi.c
(gdb) info local
retCode = 0
data = 131360
psi_filter = (sitp_psi_filter_t *) 0x241a8508
fsm = (sitp_psi_fsm_data_t *) 0xfeeefeee
psi_data = (sitp_psi_data_t *) 0x7ff42000
program_number = 0
version = 1 '\001'
table_type = 52 '4'
sectionSize = 0
(gdb) x 0xfeeefeee
0xfeeefeee: Cannot access memory at address 0xfeeefeee
(gdb)
Please find attached TC0117 RI log here
| Attachment | Size |
|---|---|
| TC0117_RILog.txt | 205.04 KB |
Please open a bug in the public issues database for this problem: http://java.net/jira/browse/OCAP_RI
Raised IT-596





Hi,
In RI 1.2, I too obtained a crash due to segmentation fault in same method, but in different line. The test executed was ChannelLoopTest (TC0117) of TDK where we are doing multiple tuning from different source IDs.
20120118 19:37:10.552 TRACE RI.Stack- <SITP_PSI::mpe_sitpSharedFilterCallback> - userData psi_data:0x64657672
20120118 19:37:10.552 DEBUG RI.Stack- <mpe_siReleaseWriteLock> ...
20120118 19:37:10.552 TRACE RI.Stack- <SITP_PSI::mpe_sitpSharedFilterCallback> - userData table_type:0x1
20120118 19:37:10.552 TRACE RI.Stack- <SITP_PSI::cancel_all_filters> - enter..
20120118 19:37:10.568 TRACE RI.Stack- filter_pauseFilterGroup(fg 126E7008)
20120118 19:37:10.568 TRACE RI.Stack- filter_filterGroupIsValid(fg 126E7008)
20120118 19:37:10.568 DEBUG RI.Stack- <filter_pauseFilterGroup>: Nothing to do - filter group 126E7008 was already paused
20120118 19:37:10.568 TRACE RI.Stack- <filter_pauseFilterGroup>: Filter group dump:
20120118 19:37:10.583 TRACE RI.Stack- <SITP_PSI::mpe_sitpSharedFilterCallback> - userData version:0x20
Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 6340.0x2900]
0x28cb9222 in mpe_sitpSharedFilterCallback (sharedFilter=0x147f5f08,
filterGroup=0x126e7008, userPointer=0x19039830, userData=1703346464,
event=MPE_FILTERGROUP_EVENT_CANCELLED, sectionSize=0, sectionData=0x0,
isLast=0) at mgr/simgr/sitp_psi.c:3009
3009 switch(psi_data->tuner_type)
On analyzing the logs, it is seen that there are two threads working with the same filter group.
The complete RILogs with gdb log is attached.