Author Topic: Dedicated server crashes some hours after player's login  (Read 6603 times)

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« on: May 30, 2016, 06:32:55 pm »


               

I've just fixed one crash problem in my module and here's another. '<img'> Oh well.


 


My module tends to crash about 10 hours (but this is not constant, it sometimes happens earlier, sometimes later) after a first player logs in. At least I think so - while I have no solid proof that logging in causes it to happen at some point later, I've not encountered any crashes many hours from launching it if no player joined.


 


The crash happens whether there are some players on the server or not. 


 


I launch the server with NWNX and the following plugins: nwnx_connect, nwnx_patch, nwnx_serverlist, nwnx_files.


 


It would be very difficult, if not impossible, for anyone to magically know what causes this crash just by looking at this post, but perhaps you know at least where I should start the search for the cause?


 


Thanks. '<img'>



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #1 on: May 30, 2016, 06:51:55 pm »


               


I've just fixed one crash problem in my module and here's another. '<img'> Oh well.


 


My module tends to crash about 10 hours (but this is not constant, it sometimes happens earlier, sometimes later) after a first player logs in. At least I think so - while I have no solid proof that logging in causes it to happen at some point later, I've not encountered any crashes many hours from launching it if no player joined.


 


The crash happens whether there are some players on the server or not. 


 


I launch the server with NWNX and the following plugins: nwnx_connect, nwnx_patch, nwnx_serverlist, nwnx_files.


 


It would be very difficult, if not impossible, for anyone to magically know what causes this crash just by looking at this post, but perhaps you know at least where I should start the search for the cause?


 


Thanks. '<img'>




basically when its crashing you need to run it without nwnx, so you run it without nwnx - if it helps then you know the problem is in nwnx and then you start adding plugins one by one


 


however, in your case when the crash occurs randomly, this is a bit problematic...


 


nwnx_files are definitely not the cause


nwnx_connect should also not by the cause but well unlike nwnx_files can't guarantee


 


remains only nwnx_patch and nwnx_serverlist


 


I assume you are using the 1.71 version of nwnx_patch that should be safe, however nwnx_patch is still the most likely cause of the crash.


 


So try it without it, if it helps it means its caused by it. And if, then you need to remove it. You might try the version from 1.72beta12 but it will not be any less stable though...


               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #2 on: May 30, 2016, 07:04:01 pm »


               

I'll try it out! But as you said, it's a bit problematic with the apparent randomness of the crash.


 


Oh, and nwnservererror log file is empty, so that doesn't help me either.



               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #3 on: May 31, 2016, 09:35:47 am »


               

So I've removed temporarily nwnx_patch and nwnx_serverlist. As of now, the server has been running for 14+ hours (with people playing during this period) with no crashes. I'll wait some time longer, just to be sure, but it looks like, as you said, Shadooow, one of these plugins is the culprit.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #4 on: May 31, 2016, 10:06:07 am »


               

you are using the nwnx_patch from CPP 1.71 I assume?



               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #5 on: May 31, 2016, 10:49:19 am »


               


you are using the nwnx_patch from CPP 1.71 I assume?




 


Yes. I even made sure yesterday by downloading CPP 1.71 and comparing my nwnx_patch to the one downloaded.


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #6 on: May 31, 2016, 11:27:26 am »


               


Yes. I even made sure yesterday by downloading CPP 1.71 and comparing my nwnx_patch to the one downloaded.




Thats unfortunate, so I can't advice you to use older version.


 


It is possible I fixed that problem (when its random like in your case its usually memory leak) already in newer versions, however those contain more new features and are likely cause the same problem again.


 


On the other hand, newer version of nwnx_patch allows to disable hooks via ini so you could try it. So get nwnx_patch from 1.72beta12 or 13 and put this into nwnplayer.ini


[Community Patch]


DisableConnect=1

DisableSetLocalStringHook=1

DisableLoadModuleFinishHook=1

DisableWeaponHooks=0

DisableGetTotalACSkillModHook=1

DisableGetUseMonkAbilitiesHook=1

DisableGetCriticalHitRollHook=1

DisableResolveAttackHook=0

DisableAddEquipItemActionsHook=1

DisableSummonAnimalCompanionHook=1

DisableSummonFamiliarHook=1

DisableSummonAssociateHook=1

DisableGetAssociateIdHook=1

DisableUseItemHook=1

DisableEffectImmunityHook=0

DisableResolveDamageShieldsHook=1

DisableGetRelativeWeaponSizeHook=1

DisableHolyAvengerHook=1

DisableToggleModeHook=1

DisableResolveAmmunitionHook=1

DisableSetActivityHook=1

DisableResolveSpecialAttackDamageBonusHook=1

DisableGetMinEquipLevelHook=1

DisableClearAllPartyInvalidActionsHook=1

DisableFireTrapHook=1

DisableFavoredEnemyHook=1

DisableSpellSlotsInPolymorphHook=1

DisableAttackOfOpportunity=1

DisableEffectCasterLevel=1

DisableOnHitCastSpellHook=1

DisableValidateServerCharacter=1


 


With this settings, it should only provide the functionalities from 1.71. BTW if it will still crash with this you can try to disable other options one by one by changing 0 to 1 - this way you will be able to track what exactly is causing the problem which would be very helpful to me as without it there is not much hope I can fix it.



               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #7 on: May 31, 2016, 11:40:57 am »


               


Thats unfortunate, so I can't advice you to use older version.


 


It is possible I fixed that problem (when its random like in your case its usually memory leak) already in newer versions, however those contain more new features and are likely cause the same problem again.


 


On the other hand, newer version of nwnx_patch allows to disable hooks via ini so you could try it. So get nwnx_patch from 1.72beta12 or 13 and put this into nwnplayer.ini


[Community Patch]


DisableConnect=1

DisableSetLocalStringHook=1

DisableLoadModuleFinishHook=1

DisableWeaponHooks=0

DisableGetTotalACSkillModHook=1

DisableGetUseMonkAbilitiesHook=1

DisableGetCriticalHitRollHook=1

DisableResolveAttackHook=0

DisableAddEquipItemActionsHook=1

DisableSummonAnimalCompanionHook=1

DisableSummonFamiliarHook=1

DisableSummonAssociateHook=1

DisableGetAssociateIdHook=1

DisableUseItemHook=1

DisableEffectImmunityHook=0

DisableResolveDamageShieldsHook=1

DisableGetRelativeWeaponSizeHook=1

DisableHolyAvengerHook=1

DisableToggleModeHook=1

DisableResolveAmmunitionHook=1

DisableSetActivityHook=1

DisableResolveSpecialAttackDamageBonusHook=1

DisableGetMinEquipLevelHook=1

DisableClearAllPartyInvalidActionsHook=1

DisableFireTrapHook=1

DisableFavoredEnemyHook=1

DisableSpellSlotsInPolymorphHook=1

DisableAttackOfOpportunity=1

DisableEffectCasterLevel=1

DisableOnHitCastSpellHook=1

DisableValidateServerCharacter=1


 


With this settings, it should only provide the functionalities from 1.71. BTW if it will still crash with this you can try to disable other options one by one by changing 0 to 1 - this way you will be able to track what exactly is causing the problem which would be very helpful to me as without it there is not much hope I can fix it.




 


Alright, I'll try. But given the nature of this problem, it will take rather long to check all these options (assuming crashes still occur if I use the 1.72 version of the plugin). You didn't mention nwnx_serverlist, so I guess it's unlikely to be the problem?


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #8 on: May 31, 2016, 11:52:35 am »


               


Alright, I'll try. But given the nature of this problem, it will take rather long to check all these options (assuming crashes still occur if I use the 1.72 version of the plugin). You didn't mention nwnx_serverlist, so I guess it's unlikely to be the problem?




I don't know that plugin. Well sure try to plug that one back first but I assume the problem is in my plugin.


 


After all I couldn't test it in a long-term PW environment and it does a bit complicated stuff so its likely the cause of the crash.


               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #9 on: May 31, 2016, 03:01:58 pm »


               

I've plugged in nwnx_serverlist and a crash occured, though it was weird. NWNX didn't report any restarts, even though there was one. And it happened rather early, so I'm not sure if nwnx_serverlist really is its cause or if it was something unrelated altogether. I'll try it again with this plugin before trying nwnx_patch.



               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #10 on: May 31, 2016, 03:21:47 pm »


               

Just wondering 


Linux or Windows?


If windows - then any crash would most likely have created an entry in Windows Event Viewer (eventvwr.exe)


If Linux - you can configure your system to take a core dump.


 


Both of these will usually have a stack trace or a generic message that points to a faulting module.


Eg: If it says the faulting module was nwserver.exe - (on windows) - then you might have a compatibility issue with the server and the dedicated server application.


(On Amazon EC2 - I had difficulty with 2008+, Had to host on 2003 for stability)


 


More often than not - the error reports will say the faulting module was nwnx_chat or something like that - which then tells you the offset and possibly the method that caused the issue.


if you have symbols for the dlls - you can even get more debug info.



               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #11 on: June 01, 2016, 01:22:07 pm »


               

Thanks for the info! I'll try to use it the next time a crash occurs... however! I experienced yet another crash when nwnx_serverlist was plugged in and nwnx_patch wasn't, so I unplugged serverlist and plugged patch. The server has been running for 14 hours straight now without a single crash. Let's see if it crashes later - if it doesn't, then it means nwnx_serverlist was the problem here, not nwnx_patch. '<img'>



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #12 on: June 01, 2016, 01:45:58 pm »


               


Thanks for the info! I'll try to use it the next time a crash occurs... however! I experienced yet another crash when nwnx_serverlist was plugged in and nwnx_patch wasn't, so I unplugged serverlist and plugged patch. The server has been running for 14 hours straight now without a single crash. Let's see if it crashes later - if it doesn't, then it means nwnx_serverlist was the problem here, not nwnx_patch. '<img'>




if thats the case then your options are:


- remove it and live without it


- try older/newer verson of that plugin


- contact author


 


Where you even get this plugin and what it's doing?


               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #13 on: June 01, 2016, 01:48:50 pm »


               


if thats the case then your options are:


- remove it and live without it


- try older/newer verson of that plugin


- contact author


 


Where you even get this plugin and what it's doing?




 


If I recall correctly, I got it directy from neverwinternights.info. It adds the server to the browser list, so I can definitely live without it - especially considering there are other methods of getting listed.


               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Dedicated server crashes some hours after player's login
« Reply #14 on: June 01, 2016, 03:02:04 pm »


               

Well... it's good that I waited a bit, because the server crashed half an hour ago. I'll unplug both of these plugins again.