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

PostgreSQL Database Interface


Post New Thread Reply   
 
Thread Tools Display Modes
SovRedBit
Member
Join Date: May 2017
Old 06-22-2017 , 12:07   Re: PostgreSQL Database Interface
Reply With Quote #31

Quote:
Originally Posted by Peace-Maker View Post
I fixed some of these concurrency errors already. You're still using the build from post #11 now, right?
Thank you for narrowing it down to the option buffers! snprintf (obviously) behaves differently on windows and linux.
Sorry i don't know what build i am using, i just get the postgres branch from your sourcemod repositoty, and compile it from there, so its maybe the last build? From Github
SovRedBit is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-22-2017 , 22:49   Re: PostgreSQL Database Interface
Reply With Quote #32

Quote:
Originally Posted by SovRedBit View Post
Sorry i don't know what build i am using, i just get the postgres branch from your sourcemod repositoty, and compile it from there, so its maybe the last build? From Github
Oh right, you're compiling yourself. Could you run a debug build and paste the stacktrace of the assert please?
__________________
Peace-Maker is offline
SovRedBit
Member
Join Date: May 2017
Old 06-23-2017 , 03:03   Re: PostgreSQL Database Interface
Reply With Quote #33

Quote:
Originally Posted by Peace-Maker View Post
Oh right, you're compiling yourself. Could you run a debug build and paste the stacktrace of the assert please?
I can try that today, but i don't think i have relevant knowledge to use GDB with srcds_run, i tried that yasterday, but with no result. It would be better if you give me some instructions how to do that well, or just give me the link to some good article that explains how to debug extension on sourcemod.
SovRedBit is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-23-2017 , 04:04   Re: PostgreSQL Database Interface
Reply With Quote #34

Quote:
Originally Posted by SovRedBit View Post
I can try that today, but i don't think i have relevant knowledge to use GDB with srcds_run, i tried that yasterday, but with no result. It would be better if you give me some instructions how to do that well, or just give me the link to some good article that explains how to debug extension on sourcemod.
LD_LIBRARY_PATH=.:bin gdb --args ./srcds_linux -game ??? +map ???

Then "run" at the GDB prompt when all loaded.

You must use srcds_linux instead of the srcds_run wrapper.
__________________
asherkin is offline
SovRedBit
Member
Join Date: May 2017
Old 06-24-2017 , 06:28  
Reply With Quote #35

Quote:
Originally Posted by asherkin View Post
LD_LIBRARY_PATH=.:bin gdb --args ./srcds_linux -game ??? +map ???

Then "run" at the GDB prompt when all loaded.

You must use srcds_linux instead of the srcds_run wrapper.
Code:
(gdb) bt
#0  0x4001f420 in __kernel_vsyscall ()
#1  0x400b91f7 in raise () from /lib/libc.so.6
#2  0x400baa33 in abort () from /lib/libc.so.6
#3  0x400b2297 in __assert_fail_base () from /lib/libc.so.6
#4  0x400b2347 in __assert_fail () from /lib/libc.so.6
#5  0x4b28fe2f in ke::Lockable::Lock (this=0xb29feb0) at /home/soviet-lulz/src/newdisk/sourcemod/public/amtl/amtl/am-thread-utils.h:140
#6  0x4b28fcfe in PgDatabase::LockForFullAtomicOperation (this=0x4b011830) at /home/soviet-lulz/src/newdisk/sourcemod/extensions/pgsql/pgsql/PgDatabase.cpp:347
#7  0x4b28fd5c in PgDatabase::SetCharacterSet (this=0x4b011830, characterset=0x9dd4ae0 "utf8") at /home/soviet-lulz/src/newdisk/sourcemod/extensions/pgsql/pgsql/PgDatabase.cpp:366
#8  0x4a66e4f3 in SQL_SetCharset (pContext=0x9d7dbb8, params=0x9dde78c) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:1510
#9  0x4aaf9beb in ?? ()
#10 0x4aaf9beb in ?? ()
#11 0x4aaf931a in ?? ()
#12 0x4aa9006f in ?? ()
#13 0x4aa4ab6c in sp::Environment::Invoke (this=0x993fec0, cx=0x9d7dbb8, method=..., result=0xbfffc3cc) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/environment.cpp:281
#14 0x4aa68ace in sp::PluginContext::Invoke (this=0x9d7dbb8, fnid=275, params=0xbfffc440, num_params=3, result=0xbfffc3cc) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/plugin-context.cpp:465
#15 0x4aa4fe02 in sp::ScriptedInvoker::Invoke (this=0x9f062e8, result=0x0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:296
#16 0x4aa4f874 in sp::ScriptedInvoker::Execute (this=0x9f062e8, result=0x0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:190
#17 0x4a66fc47 in TConnectOp::RunThinkPart (this=0x9f06b40) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:382
#18 0x4a668f78 in DBManager::RunFrame (this=0x4a6e0ee0 <g_DBMan>) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/Database.cpp:657
#19 0x4a6676c7 in FrameHook (simulating=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/Database.cpp:58
#20 0x4a35baed in SourceModBase::ProcessGameFrameHooks (this=0x4a5ef280 <g_SourceMod>, simulating=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/sourcemod.cpp:696
#21 0x4a354ca2 in RunFrameHooks (simulating=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/frame_hooks.cpp:106
#22 0x4a38244f in TimerSystem::GameFrame (this=0x4a5f3b20 <g_Timers>, simulating=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/TimerSys.cpp:237
#23 0x4a35d81f in fastdelegate::FastDelegate1<bool, void>::operator() (this=0x99427dc, p1=false) at /home/soviet-lulz/src/newdisk/mmsource-1.10/core/sourcehook/FastDelegate.h:994
#24 0x4a35ca42 in __SourceHook_FHCls_IServerGameDLLGameFramefalse::CMyDelegateImpl::Call (this=0x99427d8, p1=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/sourcemod.cpp:54
#25 0x4a35cb30 in __SourceHook_FHCls_IServerGameDLLGameFramefalse::Func (this=0x4564ffb8, p1=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/sourcemod.cpp:54
#26 0x40cc308e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#27 0x40cc4359 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#28 0x40d7352e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#29 0x40d741cc in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#30 0x40d74938 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#31 0x40d7db84 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#32 0x40d7de56 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#33 0x40d7df69 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#34 0x40de02da in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#35 0x40ddd226 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#36 0x407144ed in ?? () from bin/dedicated.so
#37 0x40714578 in ?? () from bin/dedicated.so
#38 0x40ddd31d in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#39 0x40f11760 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#40 0x40dde50f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#41 0x40714654 in ?? () from bin/dedicated.so
#42 0x40771890 in ?? () from bin/dedicated.so
#43 0x40772abe in ?? () from bin/dedicated.so
#44 0x40771890 in ?? () from bin/dedicated.so
#45 0x4070d8f3 in ?? () from bin/dedicated.so
#46 0x080486f9 in ?? ()
#47 0x400a49a3 in __libc_start_main () from /lib/libc.so.6
#48 0x080488bd in ?? ()

I think this place cause the error on 366

Ok, i know now that it was the error here, in plugin this code was causing driver crash
Quote:
g_hDatabase.SetCharset("utf8");
So fix the threads please

And here another error, when i enter the game and the server is loading, on load game files at csgo server, in the client i mean, it stops at that loading and nothing happen, but when i started to debug it, i found this:
Quote:
Program received signal SIGSEGV, Segmentation fault.
0x49569311 in SQL_QuoteString (pContext=0x9d472b0, params=0x9da87e
at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:742
742 /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp: Нет такого файла или каталога.
Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7_3.2.i686
"Нет такого файла или каталога." Means that there no file or catalog but i found this file and catalog, so i don't know what that means, and when i remove postgresql extension it starts work well.

And here is the code of that place at 742 line:

Last edited by asherkin; 06-24-2017 at 06:33.
SovRedBit is offline
SovRedBit
Member
Join Date: May 2017
Old 06-24-2017 , 16:25   Re: PostgreSQL Database Interface
Reply With Quote #36

Aaaand i had some fun finding this bug, and here what i have got, first take tha backtrace with variables:
Quote:
#0 0x49569311 in SQL_QuoteString (pContext=0x9d47310, params=0x9da883 at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:742
db = 0x49e13a00
err = SourceMod::HandleError_None
written = 32
s = false
input = 0x9da88cc "S0vR3dB1T [R.A.S]"
output = 0x9da8868 ""
maxlength = 65
addr = 0x1
#1 0x498923e5 in ?? ()
No symbol table info available.
#2 0x498923e5 in ?? ()
No symbol table info available.
#3 0x49891aff in ?? ()
No symbol table info available.
#4 0x4989186c in ?? ()
No symbol table info available.
#5 0x4982506f in ?? ()
No symbol table info available.
#6 0x490afb6c in sp::Environment::Invoke (this=0x9909208, cx=0x9d47310, method=..., result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/environment.cpp:281
ivkframe = {<sp::InvokeFrame> = {_vptr.InvokeFrame = 0x490d9af0 <vtable for sp::JitInvokeFrame+8>, prev_ = 0x0, cx_ = 0x9d47310, entry_cip_ = 0}, prev_exit_fp_ = 0xf}
invoke = 0x49825048
fn = 0xa62cbe8
__PRETTY_FUNCTION__ = "bool sp::Environment::Invoke(sp:luginContext*, const ke::RefPtr<sp::MethodInfo>&, cell_t*)"
#7 0x490cdace in sp:luginContext::Invoke (this=0x9d47310, fnid=269, params=0xbfffb9a0, num_params=1, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/plugin-context.cpp:465
__PRETTY_FUNCTION__ = "bool sp:luginContext::Invoke(funcid_t, const cell_t*, unsigned int, cell_t*)"
err = 0
save_sp = 48372
cfun = 0x9e89980
ignore_result = -11
method = {thing_ = 0xab278b0}
save_hp = 15996
sp = 0x9da8afc
profileScope = {<No data fields>}
public_id = 134
scriptScope = {<No data fields>}
ok = true
#8 0x490b4e02 in sp::ScriptedInvoker::Invoke (this=0x9e89980, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:296
temp_params = {1, 8, 174188788, 1074803896, 1076121600, -1073758464, 2147483612, 1074586582, 0, 1300902114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1074266373, 1089647323, -1073759640, 1074256512, -1073759640, 1089649757, 22,
-1073759700, -1073759672, 0}
temp_info = {{flags = 0, marked = false, local_addr = 10309, phys_addr = 0x2845, orig_addr = 0x0, size = 10329, str = {is_sz = false, sz_flags = 0}}, {flags = -1, marked = false, local_addr = 16, phys_addr = 0x1,
orig_addr = 0x0, size = 4294967295, str = {is_sz = false, sz_flags = 1109394464}}, {flags = 1093108228, marked = true, local_addr = -1073755416, phys_addr = 0x40ca8805, orig_addr = 0x41278204, size = 0, str = {
is_sz = false, sz_flags = 11}}, {flags = 0, marked = 220, local_addr = 0, phys_addr = 0x23, orig_addr = 0x209208, size = 3221209208, str = {is_sz = 226, sz_flags = -1073758132}}, {flags = 37, marked = 4, local_addr = 0,
phys_addr = 0xffffffff, orig_addr = 0x0, size = 1090960717, str = {is_sz = false, sz_flags = 109}}, {flags = 1, marked = false, local_addr = 1090960791, phys_addr = 0xbfffc05c, orig_addr = 0x0, size = 1075665564, str = {
is_sz = 128, sz_flags = 1225578131}}, {flags = 173815272, marked = 3, local_addr = 31, phys_addr = 0x9eb7ff0, orig_addr = 0x0, size = 28444, str = {is_sz = 20, sz_flags = 1075657481}}, {flags = 165886936, marked = 128,
local_addr = -1073758232, phys_addr = 0x490b501a <sp::ScriptedInvoker::Invoke(int*)+1860>, orig_addr = 0x9909208, size = 6032, str = {is_sz = 128, sz_flags = 1074774990}}, {flags = -1073758128, marked = 216, local_addr = 0,
phys_addr = 0x400fcd4e <_IO_no_init+46>, orig_addr = 0xbfffbb80, size = 1076121600, str = {is_sz = 128, sz_flags = 1074775346}}, {flags = -1073759360, marked = 160, local_addr = 1074586187, phys_addr = 0x4127870a,
orig_addr = 0xbfffbca0, size = 3221207936, str = {is_sz = 7, sz_flags = 1074755203}}, {flags = -1073759360, marked = 223, local_addr = 1074583789, phys_addr = 0x401034b8 <free+8>, orig_addr = 0x40245000, size = 3221209280,
str = {is_sz = 237, sz_flags = 1074586582}}, {flags = 0, marked = 191, local_addr = 0, phys_addr = 0x0, orig_addr = 0xbfffbca0, size = 5, str = {is_sz = 159, sz_flags = 1076139264}}, {flags = -1073757025, marked = false,
local_addr = 0, phys_addr = 0x0, orig_addr = 0x0, size = 0, str = {is_sz = 237, sz_flags = 0}}, {flags = 1076121600, marked = false, local_addr = 0, phys_addr = 0x40020fb8, orig_addr = 0x41245750, size = 0, str = {
is_sz = false, sz_flags = -8}}, {flags = 0, marked = 246, local_addr = 0, phys_addr = 0x0, orig_addr = 0x0, size = 10, str = {is_sz = false, sz_flags = 0}}, {flags = 0, marked = false, local_addr = 0, phys_addr = 0x2,
orig_addr = 0xa4d4e88, size = 4294967295, str = {is_sz = 117, sz_flags = -1073758088}}, {flags = 2156356, marked = 248, local_addr = 187230020, phys_addr = 0x400cf769 <vfprintf+5417>, orig_addr = 0xb28e744,
size = 187230008, str = {is_sz = false, sz_flags = 11}}, {flags = 0, marked = 183, local_addr = 0, phys_addr = 0x12, orig_addr = 0xb28e744, size = 3612, str = {is_sz = 191, sz_flags = -1073757716}}, {flags = 187230020,
marked = 27, local_addr = 1074236224, phys_addr = 0x4dd0ee50, orig_addr = 0xb28e738, size = 3612, str = {is_sz = 64, sz_flags = 1305538128}}, {flags = 187230008, marked = false, local_addr = 0,
phys_addr = 0x400fc532 <__GI__IO_default_xsputn+18>, orig_addr = 0xb28e744, size = 187230008, str = {is_sz = 68, sz_flags = -1073757217}}, {flags = 187230008, marked = false, local_addr = 10, phys_addr = 0x4d3ebf89,
orig_addr = 0xa052f58, size = 3612, str = {is_sz = 64, sz_flags = 1074803896}}, {flags = 1076121600, marked = 16, local_addr = 2147483617, phys_addr = 0x400ce3d6 <vfprintf+406>, orig_addr = 0x0, size = 1300902114, str = {
is_sz = false, sz_flags = 1295954773}}, {flags = 187230020, marked = true, local_addr = -1073757584, phys_addr = 0x4d3ebf89, orig_addr = 0xb088138, size = 163386088, str = {is_sz = 152, sz_flags = 184181480}}, {
flags = 164259928, marked = 152, local_addr = 172813520, phys_addr = 0xa4ce8c0, orig_addr = 0xb1f3d70, size = 172811360, str = {is_sz = 24, sz_flags = 163419672}}, {flags = 163418576, marked = false, local_addr = 0,
phys_addr = 0x0, orig_addr = 0x0, size = 0, str = {is_sz = false, sz_flags = 0}}, {flags = 0, marked = false, local_addr = 0, phys_addr = 0x0, orig_addr = 0xffffffff, size = 0, str = {is_sz = false, sz_flags = 1}}, {
flags = 5, marked = 255, local_addr = 0, phys_addr = 0xfffffff5, orig_addr = 0x200e25, size = 3221209956, str = {is_sz = 4, sz_flags = 1074591593}}, {flags = 69158, marked = 16, local_addr = 721024, phys_addr = 0xbfffbd90,
orig_addr = 0xa4d4e88, size = 171445424, str = {is_sz = 152, sz_flags = 172837560}}, {flags = 164181576, marked = 24, local_addr = 173624248, phys_addr = 0xa8c2338, orig_addr = 0xa8c0850, size = 187026832, str = {
is_sz = 224, sz_flags = 172840640}}, {flags = 171441120, marked = 184, local_addr = 176956216, phys_addr = 0xb25c948, orig_addr = 0x9bdd668, size = 176949328, str = {is_sz = 248, sz_flags = 1225455220}}, {
flags = 160469520, marked = 192, local_addr = -1073758712, phys_addr = 0x49570843 <ke::LinkedList<SourcePawn::IPluginFunction *, ke::SystemAllocatorPolicy>::head()+17>, orig_addr = 0x991d324, size = 0, str = {is_sz = 24,
sz_flags = 1225598042}}, {flags = 160469512, marked = false, local_addr = -1073758696, phys_addr = 0x490ca405 <sp::SourcePawnEngine2::Environment()+11>, orig_addr = 0xbfffbe6c, size = 160551716, str = {is_sz = 56,
sz_flags = 1225478525}}}
—-Type <return> to continue, or q <return> to quit---
i = 1
ok = true
docopies = true
numparams = 1
#9 0x490b4874 in sp::ScriptedInvoker::Execute (this=0x9e89980, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:190
env = 0x9909208
eh = {_vptr.ExceptionHandler = 0x490d9360 <vtable for SourcePawn::ExceptionHandler+8>, env_ = 0x9909208, next_ = 0x0, catch_ = true}
__PRETTY_FUNCTION__ = "virtual int sp::ScriptedInvoker::Execute(cell_t*)"
#10 0x4956ebbb in CForward::Execute (this=0x991d320, result=0xbfffc24c, filter=0x0) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/ForwardSys.cpp06
func = 0x9e89980
iter = {list_ = 0x991d324, prev_ = 0x0, impl_ = {this_ = 0x9e89e50}, mutated_ = false}
cur_result = 0
low_result = 0
err = 0
success = 1
temp_info = {{val = 1, byref = {cells = 0, orig_addr = 0x0, flags = 0, sz_flags = 0}, pushedas = SourceMod:aram_Any}, {val = 0, byref = {cells = 0, orig_addr = 0x0, flags = 0, sz_flags = 0},
pushedas = SourceMod:aram_Any} <repeats 31 times>}
__PRETTY_FUNCTION__ = "virtual int CForward::Execute(cell_t*, SourceMod::IForwardFilter*)"
high_result = 0
num_params = 1
#11 0x492761ed in PlayerManager::OnClientPutInServer (this=0x494f0900 <g_Players>, pEntity=0x447d5030, playername=0xa5ccaa8 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:744
pPlayer = 0x9915fe8
iter = {m_This = 0x8ba7198}
res = 146436504
client = 1
pListener = 0x49dde140 <g_CookieManager>
#12 0x4927d5a6 in fastdelegate::FastDelegate2<edict_t*, char const*, void>:perator() (this=0x990b41c, p1=0x447d5030, p2=0xa5ccaa8 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/mmsource-1.10/core/sourcehook/FastDelegate.h:1079
No locals.
#13 0x4927b9c6 in __SourceHook_FHCls_IServerGameClientsClientPu tInServer0::CMyDelegateImpl::Call (this=0x990b418, p1=0x447d5030, p2=0xa5ccaa8 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:70
No locals.
#14 0x4927bb9d in __SourceHook_FHCls_IServerGameClientsClientPu tInServer0::Func (this=0x4436b160, p1=0x447d5030, p2=0xa5ccaa8 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:70
vfnptr_origentry = 0x43606cd0
status = MRES_IGNORED
prev_res = MRES_IGNORED
cur_res = MRES_IGNORED
iter = 0x990b418
ourvfnptr = 0x43ec78fc
pContext = 0x97f5f50
#15 0x40cc590c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#16 0x40cb4192 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#17 0x40cb03a6 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#18 0x40d8b970 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#19 0x40d8bca5 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#20 0x40d8d8fb in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#21 0x40d8df3c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#22 0x40d9e93e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#23 0x40cf427f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#24 0x40cc416c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#25 0x40d7352e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#26 0x40d741cc in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#27 0x40d74938 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#28 0x40d7db84 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
—-Type <return> to continue, or q <return> to quit---
No symbol table info available.
#29 0x40d7de56 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#30 0x40d7df69 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#31 0x40de02da in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#32 0x40ddd226 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#33 0x407144ed in ?? () from bin/dedicated.so
No symbol table info available.
#34 0x40714578 in ?? () from bin/dedicated.so
No symbol table info available.
#35 0x40ddd31d in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#36 0x40f11760 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#37 0x40dde50f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#38 0x40714654 in ?? () from bin/dedicated.so
No symbol table info available.
#39 0x40771890 in ?? () from bin/dedicated.so
No symbol table info available.
#40 0x40772abe in ?? () from bin/dedicated.so
No symbol table info available.
#41 0x40771890 in ?? () from bin/dedicated.so
No symbol table info available.
#42 0x4070d8f3 in ?? () from bin/dedicated.so
No symbol table info available.
#43 0x080486f9 in ?? ()
No symbol table info available.
#44 0x400a49a3 in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#45 0x080488bd in ?? ()
No symbol table info available.
Then take just backtrace:
Quote:
Edward, [24.06.17 22:46]
#0 0x49569311 in SQL_QuoteString (pContext=0x9d472d8, params=0x9da8800) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:742
#1 0x498923e5 in ?? ()
#2 0x498923e5 in ?? ()
#3 0x49891aff in ?? ()
#4 0x4989186c in ?? ()
#5 0x4982506f in ?? ()
#6 0x490afb6c in sp::Environment::Invoke (this=0x9909208, cx=0x9d472d8, method=..., result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/environment.cpp:281
#7 0x490cdace in sp:luginContext::Invoke (this=0x9d472d8, fnid=269, params=0xbfffb9a0, num_params=1, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/plugin-context.cpp:465
#8 0x490b4e02 in sp::ScriptedInvoker::Invoke (this=0x9e89948, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:296
#9 0x490b4874 in sp::ScriptedInvoker::Execute (this=0x9e89948, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:190
#10 0x4956ebbb in CForward::Execute (this=0x991d320, result=0xbfffc24c, filter=0x0) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/ForwardSys.cpp06
#11 0x492761ed in PlayerManager::OnClientPutInServer (this=0x494f0900 <g_Players>, pEntity=0x447d5030, playername=0xa5ccf00 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:744
#12 0x4927d5a6 in fastdelegate::FastDelegate2<edict_t*, char const*, void>:perator() (this=0x990b41c, p1=0x447d5030, p2=0xa5ccf00 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/mmsource-1.10/core/sourcehook/FastDelegate.h:1079
#13 0x4927b9c6 in __SourceHook_FHCls_IServerGameClientsClientPu tInServer0::CMyDelegateImpl::Call (this=0x990b418, p1=0x447d5030, p2=0xa5ccf00 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:70
#14 0x4927bb9d in __SourceHook_FHCls_IServerGameClientsClientPu tInServer0::Func (this=0x4436b160, p1=0x447d5030, p2=0xa5ccf00 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:70
#15 0x40cc590c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#16 0x40cb4192 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#17 0x40cb03a6 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#18 0x40d8b970 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#19 0x40d8bca5 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#20 0x40d8d8fb in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#21 0x40d8df3c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#22 0x40d9e93e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#23 0x40cf427f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#24 0x40cc416c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#25 0x40d7352e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#26 0x40d741cc in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#27 0x40d74938 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#28 0x40d7db84 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#29 0x40d7de56 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#30 0x40d7df69 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#31 0x40de02da in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#32 0x40ddd226 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#33 0x407144ed in ?? () from bin/dedicated.so
#34 0x40714578 in ?? () from bin/dedicated.so
#35 0x40ddd31d in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#36 0x40f11760 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#37 0x40dde50f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#38 0x40714654 in ?? () from bin/dedicated.so
#39 0x40771890 in ?? () from bin/dedicated.so
#40 0x40772abe in ?? () from bin/dedicated.so
#41 0x40771890 in ?? () from bin/dedicated.so
#42 0x4070d8f3 in ?? () from bin/dedicated.so
I talked with one SP developer he told me that the error might be at the
in PgDatabase.cpp
Quote:
290IQuery *PgDatabase:oQueryEx(const char *query, size_t len)
291{
292 // There is no way to send binary data like that in queries.
293 // You'd need to escape the value with PQescapeByteaConn first and use it in the query string as usual.
294 return DoQuery(query);
295}
Code so i don't know, how to fix the problem, or how much i need to wait, to get your fix?
SovRedBit is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 05-25-2018 , 13:09   Re: PostgreSQL Database Interface
Reply With Quote #37

Quote:
Originally Posted by SovRedBit View Post
Aaaand i had some fun finding this bug, and here what i have got, first take tha backtrace with variables:


Then take just backtrace:

I talked with one SP developer he told me that the error might be at the
in PgDatabase.cpp

Code so i don't know, how to fix the problem, or how much i need to wait, to get your fix?
Could it be that you're locking the database yourself using SQL_LockDatabase before using SQL_SetCharset? SQL_SetCharset locks the database itself, so you don't need to lock it manually before calling that native.

Attached are the latest builds from the PR compiled against PostgreSQL 9.6.9.
Attached Files
File Type: dll dbi.pgsql.ext.dll (304.5 KB, 189 views)
File Type: so dbi.pgsql.ext.so (363.0 KB, 189 views)
__________________

Last edited by Peace-Maker; 05-26-2018 at 07:30.
Peace-Maker is offline
Napas
Junior Member
Join Date: Jan 2017
Old 09-11-2019 , 10:25   Re: PostgreSQL Database Interface
Reply With Quote #38

When specifying host, user and password in databases.cfg, it is trying to connect to unix socket in /tmp/.s.PGSQL.5432.
Napas is offline
Send a message via Skype™ to Napas
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 09-11-2019 , 11:27   Re: PostgreSQL Database Interface
Reply With Quote #39

Are you setting the host to "localhost"? Try "127.0.0.1" instead, so it uses the IP stack instead of local sockets. You can just set it to the correct path to the sock file too.
__________________
Peace-Maker is offline
Napas
Junior Member
Join Date: Jan 2017
Old 09-11-2019 , 11:37   Re: PostgreSQL Database Interface
Reply With Quote #40

Quote:
"pgtest"
{
"driver" "pgsql"
"host" "127.0.0.1"
"database" "null"
"user" "null"
"pass" "null"
"port" "5432"
}
With this config I get this error:
Quote:
[SM] Exception reported: FATAL: role "test_server" does not exist
Consider that I symlinked /tmp/.s.PGSQL.5432 to /var/run/postgresql/.s.PGSQL.5432.
Napas is offline
Send a message via Skype™ to Napas
Reply


Thread Tools
Display Modes

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 05:46.


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