View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001999SphereServerexecutable - windows buildpublic14-07-11 22:3023-07-14 18:58
Reporterbabidi 
Assigned ToXuN 
PrioritynormalSeveritymajorReproducibilityrandom
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version20-09-2009, 0.56b Prerelease 
Target VersionFixed in Version0.56c Nightly 
Summary0001999: main thread
Descriptionrandomly get

21:51:WARNING:Forcing thread 'Main' to terminate...
21:51:CRITICAL:'Main' thread hang, restarting...

22:19:WARNING:Forcing thread 'Main' to terminate...
22:19:CRITICAL:'Main' thread hang, restarting...

and cpu use going to 100%
the it take minutes to login
and lags alot

but no more errors in console except that

very strange
Additional Information22:02:Sphere Version 0.56b-Nightly [WIN32] by www.sphereserver.com, compiled at Jun 22 2011 (00:03:20), internal build 0001482

// Experimental flags
// Flags for options that affect server behaviour and which might affect compatibility
// See the revisions.txt file for more details on this
// EF_DiagonalWalkCheck = 00000001
// EF_New_Triggers = 00000008
// EF_Intrinsic_Locals = 00000020
// EF_Item_Strict_Comparison = 00000040
// EF_NewPositionChecks = 00000080 // Do not set while server is running !!!
// EF_WalkCheck = 00000100
// EF_AllowTelnetPacketFilter = 00000200 // Enables packet filtering for telnet connections as well
// EF_Script_Profiler = 00000400
// EF_Size_Optimise = 00000800
// EF_Minimize_Triggers = 00001000 // Minimize trigger calls (use only 0.51 triggers)
// EF_DamageTools = 00002000 // damage tools (and fire @damage on them) while mining or lumberjacking
// EF_PetSlots = 00004000 // INCOMPLETE YET! DO NOT USE until this warning is removed!
// EF_UsePingServer = 00008000 // Enable the experimental Ping Server (for showing pings on the server list, uses UDP port 12000)
// EF_NPCAct_Triggers = 00010000 // Enable @NPCSpecialAction and @NPCAction triggers (mutual exclusive with EF_Minimize_Triggers)
// EF_FixCanSeeInClosedConts = 00020000 // Change CANSEE to return 0 for items inside containers that a client hasn't opened
// EF_NetworkOutThread = 00800000 // Send network data in a separate thread
// EF_Specific = 01000000 // Specific behaviour, not completly tested
Experimental=01|08|040|0800|010000|0800000

// Option flags
// Flags for options that affect server behaviour but not compatibility
// See the revisions.txt file for more details on this
// OF_Command_Sysmsgs = 00000008 //Shows status of hearall, allshow, allmove... commands after toggling them
// OF_OSIMultiSight = 00000020
// OF_Items_AutoName = 00000040
// OF_FileCommands = 00000080
// OF_NoItemNaming = 00000100
// OF_NoHouseMuteSpeech = 00000200
// OF_Flood_Protection = 00001000
// OF_Buffs = 00002000
// OF_NoPrefix = 00004000 // Add prefix "A" and "An" to itemnames or not
// OF_DyeType = 00008000 // if set allows using i_dye on all t_dye_vat instead of only i_dye_tub
// OF_DrinkIsFood = 00010000 // type T_DRINK will increase FOOD lvl like T_FOOD
// OF_Specific = 01000000 // Specific behaviour, not completly tested
OptionFlags=08|020|0200|02000

// Extra combat flags to control the fight (default:0, 0.55i compatible)
// COMBAT_NODIRCHANGE 00001 // Not rotate player when fighting (like was in 0.51a)
// COMBAT_FACECOMBAT 00002 // Allow faced combat only (recommended)
// COMBAT_PREHIT 00004 // allow prehit for close combat. first hit is instant (delay 0.1sec)
// COMBAT_USE_RESISTANCE 00008 // use character props RES* against oldfashioned damage types
// COMBAT_SPECIALDAMAGE 00010 // use character tags TAG.*DAMAGE to apply additional damage
// COMBAT_DCLICKSELF_UNMOUNTS 00020 // unmount horse when dclicking self while in warmode
// COMBAT_ALLOWHITFROMSHIP 00040 // Allow attacking opponents from ships
// COMBAT_OSIDAMAGEMOD 00080 // modify weapon damage OSI-style (taking anatomy, tactics, lumberjacking into account)
// COMBAT_ARCHERYCANMOVE 00100 // firing bow while moving
// COMBAT_STAYINRANGE 00200 // abort attack swing when out of range instead of waiting to come back in range
// COMBAT_STACKARMOR 01000 // If a region is covered by more than one armor part, all AR will count
// COMBAT_TARGETTEDHIT 02000 // Allows setting of preferred hit area by TAG.HITPREFERENCE
CombatFlags=01|020|040|0100|01000|02000

// Extra magic flags to control magic/magery behaviour (default:0, 0.55i compatible)
// MAGICF_NODIRCHANGE = 0x0000001 // Not rotate player when casting/targeting
// MAGICF_PRECAST = 0x0000002 // Precasting (cast spell before target prompt)
// MAGICF_IGNOREAR = 0x0000004 // Magic damage ignore ar
// MAGICF_CANHARMSELF = 0x0000008 // Magic can do damage on self
// MAGICF_STACKSTATS = 0x0000010 // Different stat spells don't cancel each other out
// MAGICF_FREEZEONCAST = 0x0000020 // No movement whilst casting
// MAGICF_SUMMONWALKCHECK = 0x0000040 // Summoned creatures should be able to walk on the target location (e.g. water creatures to be summoned on water)
// MAGICF_NOFIELDSOVERWALLS = 0x0000080 // Field spells cannot cross over blocking objects
MagicFlags=04|08|010

// NPC AI settings
// NPC_AI_PATH 0001 NPC pathfinding
// NPC_AI_FOOD 0002 NPC food search (objects + grass)
// NPC_AI_EXTRA 0004 NPC magics, etc
// NPC_AI_ALWAYSINT 0008 Always be as smart as possible with pathfinding
// NPC_AI_INTFOOD 0010 NPC food search (more intelligent and trusworthy)
// NPC_AI_COMBAT 0040 Look for friends in combat
// NPC_AI_VEND_TIME 0080 vendors closing their shops at nighttime
// NPC_AI_LOOTING 0100 loot corpses an the way
// NPC_AI_MOVEOBSTACLES 0200 if moveable items block my way, try to move them
NPCAI=0001|0004|0010|0040|0200
Tagscrash
Nightly VersionAutomated (specify build number)
Experimental FlagsNone
Option FlagsNone
Internal Build Number1482
Attached Files

- Relationships

-  Notes
(0001162)
Mirravin (reporter)
14-07-11 23:43
edited on: 14-07-11 23:45

Do you using MYSQL database? I had similar problems sometimes when Sphere losing connection with DB server.

or mb infinity loop caused by scripts...

(0001163)
babidi (reporter)
15-07-11 07:29

yes i use mysql for accounts and status
(0001204)
babidi (reporter)
01-08-11 20:53

12:53:World save completed, took 1.3263 seconds
12:53:(sphere_serv_triggers.scp,141)Statics data saved (save/spherestatics.scp).
12:56:WARNING:Forcing thread 'Main' to terminate...
12:56:CRITICAL:'Main' thread hang, restarting...
12:59:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:02:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:02:CRITICAL:(functions_DB.scp,17)'Main' thread hang, restarting...
13:05:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:08:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:11:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
-----
13:30:STATUS: UPDATED SERVER INFO!
13:30:STATUS: UPDATED PLAYERS INFO!
13:31:ERROR:Warning: 1209 items at 3730,2596,40,too complex!
13:31:ERROR:Warning: 1209 items at 3726,2603,39,too complex!
13:33:STATUS: UPDATED SERVER INFO!
13:35:WARNING:(new_server_status.scp,24)Forcing thread 'Main' to terminate...
13:38:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:41:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:44:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:44:(sphere_serv_triggers.scp,141)Statics data saved (save/spherestatics.scp).
13:47:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:47:CRITICAL:(functions_DB.scp,17)'Main' thread hang, restarting...
13:50:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:53:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:56:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
13:59:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
14:02:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
14:05:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
14:08:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
14:11:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
14:14:WARNING:(functions_DB.scp,17)Forcing thread 'Main' to terminate...
---
functions_DB.scp
16# IF <DB.CONNECTED>
17# DB.QUERY "SELECT username, password FROM jos_users WHERE refresh = '1'"
18# IF <DB.ROW.NUMROWS> > 0

maybe some dealay for timeout?

however i say is critical that sometimes database TOTALY blocks sphere
(0001232)
babidi (reporter)
01-09-11 15:49

no news on getting stucked after some use of the database?
(0001248)
babidi (reporter)
08-09-11 22:54

doesn't anyone think is important that using database make server crash?
(0001249)
Shaklaban (developer)
09-09-11 08:45
edited on: 09-09-11 08:48

is the sphere and mysql on the same machine? and you can log the numrows. maybe queries which returns large amount of data is freezing the main thread. im always using limit in the queries because large queries=lag.

(0001250)
babidi (reporter)
09-09-11 17:09

server and mysql are not on same server
this function is triggered by server_timer every 2-3 minutes, and not return large amount of data because is used for user registration so how many user can register in 2-3 minutes...

another function is called with server timer is a insert row for each player for status update (actualy very low player as is a beta server...)

as i said i think is enought to insert a timeout for waiting response from sql server
(0001251)
Shaklaban (developer)
09-09-11 17:24
edited on: 09-09-11 17:26

mysql connections is not fast for remote machines. query function is executed on main thread, so if the response will return slow, sphere will wait it and block the main thread. you should use aquery instead of query. timeout can prevent the crash cannot prevent to little freezes.

http://wiki.sphere.torfo.org/index.php/AQUERY [^]

(0001252)
babidi (reporter)
09-09-11 17:26

if i use aquery, the script will wait for response. right?

es.

aquery users
first user is users[1]

will work good?
(0002359)
XuN (developer)
23-07-14 18:58

Remote querys should be executed with aquery.

- Issue History
Date Modified Username Field Change
14-07-11 22:30 babidi New Issue
14-07-11 23:43 Mirravin Note Added: 0001162
14-07-11 23:45 Mirravin Note Edited: 0001162 View Revisions
15-07-11 07:29 babidi Note Added: 0001163
01-08-11 20:53 babidi Note Added: 0001204
01-08-11 20:54 babidi Tag Attached: crash
01-08-11 20:56 babidi Note Added: 0001205
01-09-11 15:48 babidi Note Deleted: 0001205
01-09-11 15:49 babidi Note Added: 0001232
08-09-11 22:54 babidi Note Added: 0001248
09-09-11 08:45 Shaklaban Note Added: 0001249
09-09-11 08:45 Shaklaban Note Edited: 0001249 View Revisions
09-09-11 08:48 Shaklaban Note Edited: 0001249 View Revisions
09-09-11 17:09 babidi Note Added: 0001250
09-09-11 17:24 Shaklaban Note Added: 0001251
09-09-11 17:25 Shaklaban Note Edited: 0001251 View Revisions
09-09-11 17:25 Shaklaban Note Edited: 0001251 View Revisions
09-09-11 17:26 Shaklaban Note Edited: 0001251 View Revisions
09-09-11 17:26 babidi Note Added: 0001252
23-07-14 18:58 XuN Note Added: 0002359
23-07-14 18:58 XuN Status new => resolved
23-07-14 18:58 XuN Fixed in Version => 0.56c Nightly
23-07-14 18:58 XuN Resolution open => fixed
23-07-14 18:58 XuN Assigned To => XuN


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker