VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Bugs Server Bugs Server Bugs (Closed)
  • Search

Vague world crash

Closed Server Bugs

Moderators: Community Managers, Developers

Locked
  • Print view
Advanced search
16 posts
  • Previous
  • 1
  • 2
User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: Vague world crash
  • Quote

Post by John Adams » Wed Aug 19, 2015 3:55 pm

So here's my first observation; None of the existing thread starters have Loggers. Yours does. The crash is in a memcpy, which we've seen dozens of times when LogWrite freaks out. There probably is no stack for this crashing thread since the thread just started up. I will comment these Loggers out and run the server for a while. If it's stable again, it's back to you to figure out why.

Code: Select all

/**
 * @brief This is the thread function for the chunk regen tick thread.
 *
 * @author Ratief
 * @date 18 Aug 2015
 */
void ChunkRegenThread(void *data) {
	timem_t start_time = 0;
	timem_t end_time = 0;
	timem_t diff_time = 0;
	ChunkServer *chunk = (ChunkServer *)data;

	// A bit of logging
	LogTrace(LOG_CHUNK, 1, "Starting regen thread for chunk %s.", chunk->GetChunkDisplayName());

	// Set that we are running
	chunk->regen_thread_active = true;

	while (chunk->regen_thread_running) {
		// Get the current microtime
		start_time = TimeMS();

		chunk->ProcessRegen();

		// Get the end time
		end_time = TimeMS();

		// Sleep for the appropriate time
		diff_time = end_time-start_time;
		SleepMS(REGEN_TICK_INTERVAL-diff_time);
	}

	// A bit of logging
	LogTrace(LOG_CHUNK, 1, "Exiting regen thread for chunk %s.", chunk->GetChunkDisplayName());

	// Set that we are NOT running
	chunk->regen_thread_active = false;
}
Top

User avatar
Ratief
Developer
Developer
Posts: 393
Joined: Thu Feb 06, 2014 8:21 am
Re: Vague world crash
  • Quote

Post by Ratief » Wed Aug 19, 2015 4:13 pm

Great observation! I'm thinking about committing a check to make sure that chunk isn't NULL. Sadly I don't know of any way to verify that it is a valid chunk object though. However, I don't see how it could be anything except a valid chunk object unless the compiler is doing something really strange. I'm basically passing 'this', but in such a way that the compiler doesn't complain. You can't pass 'this' directly to a C function, so I have an intermediate pointer to it and pass that.
Top

User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: Vague world crash
  • Quote

Post by John Adams » Wed Aug 19, 2015 4:26 pm

Right, I dismissed the invalid chunk argument because I don't think we should even be in here without one, though we've been hit with "timing issues" thanks to the Stupid Pointers problem. Still, probably not a bad idea to check it regardless.
Top

User avatar
Ratief
Developer
Developer
Posts: 393
Joined: Thu Feb 06, 2014 8:21 am
Re: Vague world crash
  • Quote

Post by Ratief » Wed Aug 19, 2015 4:31 pm

I've been trying to crash my server with various character creations. I've tried creating a character in IoD while it is running (so the thread was active already). This is what I normally do. I have also tried creating a character in a home town when that chunk is down (so the thread is created as soon as the character is created). That didn't seem to cause a crash either.

I have also tried rifting all over the place, so far that hasn't caused a crash either.
Top

User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: Vague world crash
  • Quote

Post by John Adams » Fri Aug 21, 2015 10:26 am

2 days without crashing with those Log lines commented out, I will add them back in now and run over the weekend. If they re-appear, then we are not to put logging inside a thread startup - no matter what common sense dictates.
Top

User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: Vague world crash
  • Quote

Post by John Adams » Sat Aug 22, 2015 9:53 am

24h without a crash after putting the LogTrace lines back in, and as long as no one broke my statistics counters again, it looks like we have had over 40 connections since last restart. I'll give it the rest of the weekend before calling this one "a solved mystery".
Top


Locked
  • Print view

16 posts
  • Previous
  • 1
  • 2

Return to “Server Bugs (Closed)”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD