Jump to content

userxdb.db corrupted


ailmanki

Recommended Posts

*=====INITIALISING USER DATABASE
 * Opening user database file userdb.db.
 * Opening user database file userxdb.db.
   Existing userxdb.db file is for wrong server version or corrupted.
*=====DATABASE IS NOT IN USE

 

I got these in the log, and the userxdb.db is actually empty.

Link to comment
Share on other sites

Looks like we lost data. Not a fresh install, quite old one.

Would there be something relevant in logs? I can dig out older ones, if wished?

 

edit: the other files where fine, I copied all other files from the "database" folder into a new one. Changed the server config to that new folder - and restarted the server. That worked fine..

 

What is that file good for anyway? I thought its for xp, but apparently everyone had there xp after restart..

Edited by ailmanki
Link to comment
Share on other sites

  • Management

The X in the name refers to extra data. It contains needed data for admin level protection, personal greetings and similar things. There is an extremely small window of chance the server could be killed right between the file has been truncated and before it gets written. It is that way a special file that it is rewritten on every shutdown.

 

To find the moment, you would need to go to the last shutdown before the first initialization where it said it is corrupted. Looking if the shutdown does not complete. If the shutdown completes, the issue is external.

 

EDIT:

By killed I mean a signal from console or similar event and that the engine would not wait for the shutdown it has previously issued, to complete.

Link to comment
Share on other sites

I found the spot in the log, but I sent you the log by PM; since it might contain sensitive data - not sure. Please only share it with - well - just keep it private.

 

Server has not been shutdown, and it was running already lots of maps before that.

Only thing which got recently changed - few weeks ago, is that map voting is enabled. No new lua scripts or anything since longer.

 

Could this indicate corruption/troubles with harddisk?

Link to comment
Share on other sites

  • Management

Already lost twice what I was writing because mozilla keeps crashing on me.

 

Anyway again:

The file should always have a database header. This is static data that is written and flushed right after the file has been opened. (Consecutive lines) I'm looking at this and I don't see how the file could be empty because of programmatic error.

 

EDIT:

Now that I have something out, bit more chat. The program in this case does not output possible writing errors to the log. By writing errors I mean if the underlying standard library is refusing to co-operate for any reason. This thing probably needs fixing now. Possible reasons would include another process locking the file.

 

EDIT:

Found out there was an update to 33 version of Firefox. Less surprisingly, it managed to crash instantly after the update. I wonder how they can manage making it less and less stable on every update.

Link to comment
Share on other sites

I have opened a ticket where the server is hosted, and asked them if that file locking could be possible. And referred them to this topic.

 

The underlying library, is compiled into the mod? I couldn't see a separate dll for it.

 

 

Firefox :), yeah can be a pita. I suggest to create a new profile, https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

You can just create a new one, and see if it helps, before deleting the old one. And besides that I noticed firefox to crash lots on some flash ads. Really annoying stuff, if you have to incorporate those ads on a website :angry:  and your browser is constantly crashing, after 2-3 refreshes of the site.

 

edit: They replied,

It may be that our systems were performing a backup at the time, or something similar. That would have to be very unusual timing, though. Does that file store data using sqlite? If so, all file writes *and* reads to/from that file would be denied while it is in use, except for the process that is using it.

Since I couldn't rename/delete that file (cause its windows server), I suppose ET had it locked for its own use.

Edited by ailmanki
Link to comment
Share on other sites

  • Management

 

The underlying library, is compiled into the mod? I couldn't see a separate dll for it.

The standard library (also know as the C POSIX library) is not statically linked. It is provided by the OS. This is also why there are compatibility issues with different Linux versions and some server providers would not be able to run the mod if we would link against too new version of libc. I don't think there is any issue with that library itself, it would manifest all around if there were. But if the OS for some reason would not want the file to be written, the calls to the standard library would then fail.

 

 

Firefox :), yeah can be a pita. I suggest to create a new profile, https://support.mozi...irefox-profiles

You can just create a new one, and see if it helps, before deleting the old one. And besides that I noticed firefox to crash lots on some flash ads. Really annoying stuff, if you have to incorporate those ads on a website :angry:  and your browser is constantly crashing, after 2-3 refreshes of the site.

Thanks. I will keep that in mind. I wouldn't mind deleting the whole profile. I have been suspecting it is something to do with flash. At least I finally cleaned up the left overs of the duckduckgo, the damn thing requires javascript, or it doesn't work at all, and I'm not going to enable it for a search page that I don't think needs it for anything. That was another surprisingly hard task as it hides itself well.

Link to comment
Share on other sites

  • Management

Maybe a hardware or a Windows issue then.

 

 

Also they never had that issue with a sqlite database getting corrupted by there backup.

Irrelevant, as they didn't run it and it hasn't had any issues with these files either. Though, there is the first time for everything.

Link to comment
Share on other sites

  • Management

 

Well I hope you guys can figure out what the problem is, and maybe add some fail-safe.

Support said its highly unlikely a problem on there end. So most likely its related to ET or the mod.

Have to go sleep :)

All we can do is to add some more logging. This kind of issue is not preventible by the mod.

 

Good night.

Link to comment
Share on other sites

  • Management

I took another look at the log extract you provided and I noticed some weird thing about it. There is a 4 minute gap between the succesful shutdown and the next initialization where the file was found corrupt.

 

6:47:57 ShutdownGame: done. Closing log.

 6:47:57 ------------------------------------------------------------

 6:51:53 ------------------------------------------------------------

 6:51:53 InitGame:

Link to comment
Share on other sites

  • Management
I have no idea. The time is missing from a part when the mod was not running and I don't know anything that would put engine to a hold like that either. You probably need to ask your provider what has happened during that time. If you can find out what was the calendar time, they might be able to dig some of the system logs.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...