Raised This Month: $51 Target: $400
 12% 

SQL (dbi) - Errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 08-29-2016 , 16:55   SQL (dbi) - Errors
Reply With Quote #1

So, After re-writing my Timer again and again and again I keep getting down to the same conclusion. It keeps crashing.

Previous versions failed to show / give any information about the crashes, only mentioning either server.dll or engine.dll

However recently I've been getting these kind of "Accelerator Reports"

Code:
0	ntdll.dll!RtlpLowFragHeapFree + 0x1f
1	ntdll.dll!RtlFreeHeap + 0x7b
2	sourcemod.logic.dll!free [free.c:50 + 0x11]
3	sourcemod.logic.dll!DatabaseHelpers::OnHandleDestroy(unsigned int,void *) [smn_database.cpp:105 + 0x6] 
4	sourcemod.logic.dll!HandleSystem::FreeHandle(QHandle *,unsigned int) [HandleSys.cpp:698 + 0x9] 
5	sourcemod.logic.dll!HandleSystem::FreeHandle(unsigned int,SourceMod::HandleSecurity const *) [HandleSys.cpp:732 + 0x9] 
6	sourcemod.logic.dll!sm_CloseHandle [smn_handles.cpp:65 + 0x13] 
7	sourcepawn.jit.x86.dll!sp::Environment::Invoke(sp::PluginRuntime *,sp::CompiledFunction *,int *) [environment.cpp:235 + 0x15]
Now I use ALOT of SQL. I only use the mentioned functions to do anything with the SQL.

SQL_TQuery and SQL_ExecuteTransaction

Database is setup in a Master and Slave edition since Timer is supported through multiple regions where DB > DB updates / inserts are faster through a Slave configurations.

I've tried adding CloseHandle(owner); CloseHandle(hndl); and for the transactionSuccess using a for loop for numQueries and closing each handle in the results array.

Still looking for what I'm doing wrong, and if it's just the configuration, the amount of queries or what that is breaking my Timer :////////

EDIT: no errors_xxxxxxx.log showing anything malfunctioning with the Timer. Only the Accelerator Crash ID/Log.

Last edited by OSWO; 08-29-2016 at 17:06.
OSWO is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-29-2016 , 18:44   Re: SQL (dbi) - Errors
Reply With Quote #2

This crash suggests a double free happened, DBI system auto closes appropriate handles after threaded callback completion.
__________________
WildCard65 is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 08-30-2016 , 21:14   Re: SQL (dbi) - Errors
Reply With Quote #3

Code:
0	ntdll.dll!RtlpLowFragHeapFree + 0x1f
1	ntdll.dll!RtlFreeHeap + 0x7b
2	sourcemod.logic.dll!free [free.c:50 + 0x11]
3	sourcemod.logic.dll!DatabaseHelpers::OnHandleDestroy(unsigned int,void *) [smn_database.cpp:105 + 0x6] 
4	sourcemod.logic.dll!HandleSystem::FreeHandle(QHandle *,unsigned int) [HandleSys.cpp:698 + 0x9] 
5	sourcemod.logic.dll!HandleSystem::FreeHandle(unsigned int,SourceMod::HandleSecurity const *) [HandleSys.cpp:732 + 0x9] 
6	sourcemod.logic.dll!TTransactOp::CallSuccess() [smn_database.cpp:1672 + 0x12] 
7	sourcemod.logic.dll!TTransactOp::RunThinkPart() [smn_database.cpp:1687 + 0x5]
I went through all my transactions and I removed anything to do with Handles. I've only used a CloseHandle on a DataPack which had to be closed. Do I need to remove the CloseHandle on the datapack I passthrough?
OSWO is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-30-2016 , 21:23   Re: SQL (dbi) - Errors
Reply With Quote #4

Check your code for any handle deletion of any dbi handles (Datapack handles passed to dbi callbacks don't count)
__________________
WildCard65 is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 08-30-2016 , 21:54   Re: SQL (dbi) - Errors
Reply With Quote #5

I think I've may of have found the error. HSW is a style that doesn't support Sync, and I had a Correct Ticks and a Total Ticks variable. Problem was that I kept setting those both to 0 and 0 / 0 = Na which it couldn't insert into the Database in my Transaction. So I was trying to SQL_AddQuery with a 'Na' value in the float column which was incorrect and therefore the transaction returned a "success" but with 0 result handles since they queries were invalid in-turn breaking it I guess.

I've corrected it and will see if it continues to crash with the same signature or not.
Only picked this up since someone beating the time on HSW was not getting the WR message and time updated. Thanks for your help though, I've removed all the invalid CloseHandles with my first issue.
OSWO is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode