SAP Knowledge Base Article - Preview

2306326 - IQ hang due to event threads deadlock in DatabaseFile::ExtendFile , SetEventHandlerAction - SAP IQ 16

Symptom

The server could deadlock/hang if a dbspace were being extended at the same time as a user-defined event was being loaded or reloaded.

If the file $IQLOGDIR16/DumpAllThreads exists, a stack trace is generated and you can see 2 threads like the following:

===== Thread Number  140166073022208  (IQ connID: 0000000634) =====
pcstkwalk(stk_trace*, int, db_log*, hos_fd*)+0x32
ucstkgentrace(int, int)+0x121


UnixTask::wait(unsigned short)+0x95
BaseMutex::wait_for_mutex(Task*, int)+0x6e
BaseMutex::get(Task*, int)+0x9e
DatabaseFile::ExtendFile(unsigned int, unsigned int)+0x175
DatabaseFile::AllocPages(a_page_type, unsigned int, int, unsigned int*, a_page_bit_map*, unsigned int)+0x13b
DatabaseFile::alloc_page(a_page_type, unsigned int, unsigned int)+0x28
alloc_temp_page(Database*, a_page_type)+0x17
RelocatableHeap::alloc_page(Database*, a_heap_type, Worker*)+0x164
RelocatableHeap::Alloc(unsigned long, unsigned int)+0x156
SQLScanner::LexInit(UTIStream&, a_parse_goal)+0xae
SQLParser::Parse(UTIStream&, unsigned int, a_parse_status*, a_statement**)+0x48
ParseSupport::StringToCommand(UTIStream&, Connection*, IDBHeap*, a_parse_parms*, a_parse_status*, a_statement**, unsigned int, SQLFlagger*)+0x5b
parse(a_statement_heap_ref*, dfv_Value const&, a_parse_goal, unsigned int*, unsigned int, unsigned int, unsigned int*, SQLFlagger*, char const*)+0x4d5
PrepareStringUsingHeap(a_statement_heap_ref*, dfv_Value const&, a_parse_goal, unsigned int*, unsigned int, unsigned int, SQLFlagger*, char const*)+0x6a
PrepareString(a_statement_heap_ref*, dfv_Value const&, a_parse_goal, unsigned int*, unsigned int, unsigned int, unsigned int)+0xf0
SQLAEngineSupport::ExecSQLStringWithEscapes(a_servertype, char*, unsigned int)+0xe1
IQResultSet::FetchDataFromResultSetCursor(IConnection*, void*)+0xd6
IQResultSet::FetchResultSet(IConnection*, IQResultSetInfo*, char*)+0x113
.......

 

===== Thread Number  140166084060928  (IQ connID: 0000000635) =====
pcstkwalk(stk_trace*, int, db_log*, hos_fd*)+0x32
ucstkgentrace(int, int)+0x121

UnixTask::wait(unsigned short)+0x95
BaseMutex::wait_for_mutex(Task*, int)+0x6e
BaseMutex::get(Task*, int)+0x9e
DatabaseFile::AddToFreeList(unsigned int, unsigned int)+0xfd
DatabaseFile::UnlockAndFreePage(CacheInfo*, unsigned int, a_page_type, unsigned int)+0x1e4
RelocatableHeap::free_page(a_mem_page*, Database*, Worker*)+0x53
RelocatableHeap::~RelocatableHeap()+0x37
DB_Free_event_procedure(a_proc_def*)+0x39
SetEventHandlerAction(EventDef*, dfv_Value const&)+0x48
ReloadEventDef(EventDef*)+0x192
EventHandler::do_request()+0x468
Worker::spawn(Procedure*)+0x49
RQInternalBaseItem::do_work(Worker*)+0x3c
RequestQueue::worker_body()+0x66
request_task(void*)+0x65
run_task_body+0x2d
UnixTask::pre_body(void*)+0x77


Read more...

Environment

  • IQ 16 any SP any platform
  • SQL Anywhere 16 any platform

Product

SAP IQ 16.0 ; SAP SQL Anywhere 16.0

Keywords

CR 797425 ; 797425 ; hang ; deadlock ; mutex ; atabaseFile::ExtendFile ; DatabaseFile ; ExtendFile ; alloc_temp_page ; event ; DB_Free_event_procedure ; DatabaseFile::UnlockAndFreePage ; DatabaseFile ; UnlockAndFreePage ; DatabaseFile::AddToFreeList ; AddToFreeList ; BaseMutex ; , KBA , BC-SYB-IQ , Sybase IQ , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.