azuisleet / gmodmodules

Automatically exported from code.google.com/p/gmodmodules
19 stars 4 forks source link

Crash on Query Call (tmysql3_boost) #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Semi-random
2. Make query call while others are on server
3.

What is the expected output? What do you see instead?
Expect SELECT call to database. Instead the server often crashes.

What version of the product are you using? On what operating system?
Using latest tmysql_boost .dll's.

From server information page:
"Your server is currently being hosted on a Intel Xeon X3470 (Lynnfield 
2.93ghz) node with 4 total processor cores and 16 gigabytes of RAM. The 
database code for this node is dallas-quad293-i-6; its OS is Windows."

Please provide any additional information below.
Very, very high chance of crash.

Lua code:

local function idQuery(ply)

    ply.bistar = {}
    ply.bistar.freq = "207.3"

    local q = "INSERT INTO Test (SteamID,Nick) VALUES ('"..ply:SteamID().."','"..ply:Nick().."')"
    tmysql.query(q) // 

    q = "SELECT Freq FROM Test WHERE SteamID='"..ply:SteamID().."'"
    tmysql.query(q, function(tab,status,err) // Returns a table to the callback function

        if(tab[1]) then

            if(!(tab[1][1]=="")) then

                ply.bistar.freq = tab[1][1]
            end
        end
    end)

end
hook.Add("PlayerInitialSpawn","idquery1",idQuery)

Original issue reported on code.google.com by tabrown0...@gmail.com on 6 May 2012 at 12:05

GoogleCodeExporter commented 9 years ago
I can't reproduce this with the latest gm_tmysql3_boost using the test case 
you've posted. Are you running any other modules on the server? do you have any 
crash dumps for me to look at?

Original comment by AzuiSl...@gmail.com on 6 May 2012 at 1:39

GoogleCodeExporter commented 9 years ago
I've decided to refactor part of query routine, can you try the very latest 
version:

http://gmodmodules.googlecode.com/svn-history/r188/trunk/gm_tmysql3_boost/Releas
e/gm_tmysql.dll

Original comment by AzuiSl...@gmail.com on 6 May 2012 at 2:20

GoogleCodeExporter commented 9 years ago
Certainly. Also, I've noticed that putting this specific part of the function 
on a timer.Simple for one second will cause the crashes to cease.

Original comment by tabrown0...@gmail.com on 6 May 2012 at 10:41

GoogleCodeExporter commented 9 years ago
I updated my gm_tmysql.dll to the one you provided, but the server still 
crashes as it had been. This is no longer a pressing issue one my part, due to 
having found that timer.Simple method. However, in case you are still 
interested, here is what I believe to be the .dmp from the crash.

Original comment by tabrown0...@gmail.com on 7 May 2012 at 2:32

Attachments:

GoogleCodeExporter commented 9 years ago
Never mind, that is not the correct crash dump. I do not believe one was 
generated for that crash.

Original comment by tabrown0...@gmail.com on 7 May 2012 at 2:47

GoogleCodeExporter commented 9 years ago
You might also want to try gm_tmysql3 (not boost) to see if it's a boost 
related issue. Otherwise you'll have to attach a debugger like WinDbg to catch 
the error as it happens if crash dumps aren't being created. Even though you 
found a work around I'm still interesting in figuring out this crash.

Original comment by AzuiSl...@gmail.com on 7 May 2012 at 2:49

GoogleCodeExporter commented 9 years ago
Also, are you able to reproduce the issue on another machine?

This sounds like a similar issue to one that was never resolved, so I'm really 
interested in getting some sort of answer. 

If you're comfortable with it, I can also do debugging on your server if it 
comes down to that.

Original comment by AzuiSl...@gmail.com on 7 May 2012 at 3:11