NationStates Jolt Archive


Is it possible for a nation to 'crash'?

Baikalistan
03-12-2003, 18:29
I hope that this is the right forum for this question...

Twelve hours ago I was leader of the People's Republic of Ochakov, a country with a population of around 2,4 billion, an established set of positions on the issues, and a proud cultural heritage. Or something like that.

Regardless I recieved a new issue (baseball) and selected the option to fund a national baseball league. The page stalled, then returned a 'page not found' in that frame. I shrugged and clicked back on my main nation's page to discover that I had become the 0 of 0, with a population of 0 and a currency of 0, a national flag of [x] and a motto of '...'

I tried logging in and discovered that my password didn't work. When I tried to get a new one, I was told that I hadn't entered an E-Mail address when I first started, and although it was some time ago I doubt this is the case--I enter E-Mail for everything.

My country has since disappeared from its indigenous region (the Snopesean Archipelago) and appears to have vanished entirely. On the other hand, searching for 'Ochakov' does not return a standard 'nation not found error.' It brings me, at least, to an extremely bizarre page with some long hyperlink (leading to the Archipelago), and then another listing of 0s in every field--although the 'most recent government activity' is listed as being almost thirty-four years ago.

My question, then, is, 'what happened?' Is this something that happens fairly often?--I did a cursory check of the topics here and they didn't seem to address it. It doesn't seem to be listed in the FAQs or the known problems. It hasn't happened to anyone that I know of. Anyone know what's up?

-Baikal, deposed leader of the PRO
Phoebos
03-12-2003, 18:42
I've heard of incidents involving the 0 of 0 before... sounds like your nation's stats have for some reason been dropped from the database. Very weird...

Salusa, [violet]...

http://www.nationstates.net/cgi-bin/index.cgi/page=display_nation/nation=Ochakov
Crazy girl
03-12-2003, 18:43
wow, this is weird..

Spotlight on:
The 0 of 0
""

UN Category: Inoffensive Centrist Democracy
Civil Rights: Good Economy: Good Political Freedoms: Good

Location: [Error evaluating "{ my $r = Region->load($xtra->{nref}->{region}); $r->{name}; }", type eval: No nation name supplied! at /home/nation/public_html/cgi-bin/JClass.pm line 202. JGConfig::__ANON__('No nation name supplied! at /home/nation/public_html/cgi-bin/JC...') called at /home/nation/public_html/cgi-bin/JClass.pm line 202 JClass::load('Region', undef) called at (eval 452) line 1 eval '{ my $r = Region->load($xtra->{nref}->{region}); $r->{name}; } ;' called at /home/nation/public_html/cgi-bin/Dynamic.pm line 143 Dynamic::handle_macros('Nation=HASH(0x8cd85d0)', undef, 'HASH(0x8c8d314)') called at /home/nation/public_html/cgi-bin/Dynamic.pm line 290 Dynamic::parse('^J<...', 'Nation=HASH(0x8cd85d0)', 'HASH(0x8c8d314)') called at /home/nation/public_html/cgi-bin/Dynamic.pm line 274 Dynamic::generate_page('Nation=HASH(0x8cd85d0)', 'display_other_nation', 'HASH(0x8c8d314)') called at /home/nation/public_html/cgi-bin/index.cgi line 337 Apache::ROOT::cgi_2dbin::index_2ecgi::handler('Apache=SCALAR(0x8a86bbc)') called at /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/Apache/Registry.pm line 143 eval {...} called at /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/Apache/Registry.pm line 143 Apache::Registry::handler('Apache=SCALAR(0x8a86bbc)') called at (eval 452) line 0 eval {...} called at (eval 452) line 0 ]
The 0 of 0 is a tiny, pleasant nation, notable for its barren, inhospitable landscape. Its hard-working population of 0 million have some civil rights, but not too many, enjoy the freedom to spend their money however they like, to a point, and take part in free and open elections, although not too often.

There is no government in the normal sense the word; however, a small group of community-minded individuals appears to have no policy direction whatsoever. Income tax is unheard of. The private sector is almost wholly made up of enterprising fourteen-year-old boys selling lemonade on the sidewalk, although the government is looking at stamping this out.

Crime is a problem, and the police force struggles against a lack of funding and a high mortality rate. 0's national animal is the 0 and its currency is the 0.



Most Recent Government Activity: 12389 days ago

[Add 0 to your Dossier]


--------------------------------------------------------------------------------
SalusaSecondus
03-12-2003, 18:44
Oh ----. Yes, this happens sometimes, and we have no idea what causes it (though personally I suspect the server load). I have a copy of your email address (from that nation) and will be in contact with you directly to fix this (and with the admin of the site).

I warn you, this will not be a quick, nor a particularly happy fix. I'm sorry. We'll do everything we can.

http://www.weirdozone.0catch.com/projects/nationstates/salusasecondus/salusasecondus2.jpg
SalusaSecondus
Tech Modling
The Underground City
03-12-2003, 19:38
I've seen 0 as nation name in the bar down the left side before (cant remember what nation I was playing at the time), but the main page was ok.
Peng-Pau
03-12-2003, 19:53
Just a small note, based on the "almost 34 years ago" I think I can safely say that the date specified as the most recent governmental activity is the same date which occasionally appears in the forums; "Wednesday 31st December ,1969"... ;)

EDIT: I've checked the math, yup, it's the same answer. That you're getting this date at all anywhere is worrying me... The earliest possible date is '0' or "Thursday 1st January 1970"... :?

I'm thinking it's a server date/time functions problem, which could explain the database errors also (MySQL logs the last access times for databases at the very least...). [violet]/Salusa, what version of Linux/*BSD (incl. Solaris) does the server use?
SalusaSecondus
03-12-2003, 20:03
I'm not sure why, but on this system 0 resolves to the date that you see. I believe that we are running RH 9.? I don't have the specific specs.

http://www.weirdozone.0catch.com/projects/nationstates/salusasecondus/salusasecondus2.jpg
SalusaSecondus
Tech Modling
Baikalistan
03-12-2003, 20:34
All right...

Thank you for the quick responses. I just wasn't sure what had happened; it seemed to occur fairly suddenly and I didn't know if I had done anything wrong, or what was up.

Of course December 31st, 1969 is exactly one year before the dissolution of the Beatles. Perhaps it was a failed time-travelling experiment.

Anyway, thanks everyone.

-Baikal
Phoebos
03-12-2003, 20:44
On a slight side note, this settles the matter I was discussing with Peng-Pau a while back. The garbage clearly shows that NS is stored under /home, not under /

Thought so
SalusaSecondus
03-12-2003, 21:07
Yeah, it gives you guys more info than I'd like (slight security risks), but there is also absolutely nothing that I can do about it so . . . enjoy!

http://www.weirdozone.0catch.com/projects/nationstates/salusasecondus/salusasecondus2.jpg
SalusaSecondus
Tech Modling
Phoebos
04-12-2003, 19:23
You'll be happy to know that I, sad git that I am, copied the text so I could analyse it at a later date :oops:
Peng-Pau
04-12-2003, 19:30
I'm not sure why, but on this system 0 resolves to the date that you see. I believe that we are running RH 9.? I don't have the specific specs.

http://www.weirdozone.0catch.com/projects/nationstates/salusasecondus/salusasecondus2.jpg
SalusaSecondus
Tech Modling

Er... Redhat should resolve 0 to Thursday 1st January 1970... O.o

EDIT: NOTE: Googling for "man date" is not a good idea... :?

EDIT: EDIT: Aha, here we go... Dates Potentially Causing Problems in Computer Systems (http://www.iee.org/Policy/Areas/SCS/problemdates.cfm)
Peng-Pau
04-12-2003, 19:34
On a slight side note, this settles the matter I was discussing with Peng-Pau a while back. The garbage clearly shows that NS is stored under /home, not under /

Thought so

Oh shush you.

*slaps*
Peng-Pau
04-12-2003, 19:35
Yeah, it gives you guys more info than I'd like (slight security risks), but there is also absolutely nothing that I can do about it so . . . enjoy!

http://www.weirdozone.0catch.com/projects/nationstates/salusasecondus/salusasecondus2.jpg
SalusaSecondus
Tech Modling

No security risk here at all. You can't access /home from a URL no matter how hard you try, unless [violet]/whoever runs the server is a complete dink and has set the document path to /home... And if they logged into the server, they'd know considerably more than enough to find where NS lives.

:P
04-12-2003, 19:40
Unix (and Java) dates are normally recorded as "The number of millisecons since 12:00 AM UTC, Thu, Jan 1, 1970." Therefore, a value of -1 (a common return value for when something went wrong) would be the last millisecond of 11:59 PM UTC, Wed, Dec 31, 1969. Sounds like your nation's record in the database table got [DELETE]d.

For troubleshooting, I'd look at memory leaks and unchecked arrays in any C/C++ code that was built in-house.
Peng-Pau
04-12-2003, 19:44
Unix (and Java) dates are normally recorded as "The number of millisecons since 12:00 AM UTC, Thu, Jan 1, 1970." Therefore, a value of -1 (a common return value for when something went wrong) would be the last millisecond of 11:59 PM UTC, Wed, Dec 31, 1969. Sounds like your nation's record in the database table got [DELETE]d.

For troubleshooting, I'd look at memory leaks and unchecked arrays in any C/C++ code that was built in-house.

"Thursday 1st January 1970" is UNIX's birthday. ;)

All dates start from here, so in theory "Wednesday 31st December 1969" should never happen, heh.
SalusaSecondus
04-12-2003, 19:47
Actually the file path wasn't the data that I was looking at with concern, but it is minor anyway.

It returns 0, I'm quite sure, that is why that nation's name, motto, animal, etc. are all 0.

The game is entirely in Perl.

Yes, the record is essentially deleted. I believe that it happenes when the server hiccups while actually updating the record, but I'm not sure.
Peng-Pau
04-12-2003, 19:52
Actually the file path wasn't the data that I was looking at with concern, but it is minor anyway.

It returns 0, I'm quite sure, that is why that nation's name, motto, animal, etc. are all 0.

The game is entirely in Perl.

Yes, the record is essentially deleted. I believe that it happenes when the server hiccups while actually updating the record, but I'm not sure.

This is what I thought (RE: 'hiccups')...

It could be that the wrongly returned times cause the date() function to 'fart' as it were and MySQL or Perl dies/refuses to stick it in the database...

How good is the error/action logging in the code?
SalusaSecondus
04-12-2003, 19:53
Not good enough. If it were good enough to catch this, it could prevent it. I may well poke around it later.
Peng-Pau
04-12-2003, 20:00
Not good enough. If it were good enough to catch this, it could prevent it. I may well poke around it later.

Ok, in that case, can I suggest adding a line to write $sql or whatever variable you use to hold the actual SQL statement to the log files, and also the data sent to date() and the line returned afterwards when it's called when updating the nation database...

I know this will add extra load on the server, but it's needed...
[violet]
05-12-2003, 13:25
Nations get toasted when the web server (or, more specifically, an instance of it) dies in between starting to write out a nation's save file and finishing writing it. The real culprit is some dodgy NationStates code that was never intended to handle this kind of load and doesn't implement ironclad file locking. (It also doesn't use a database.)

It's very rare but does happen when our server is getting really, really, really hammered.
Peng-Pau
05-12-2003, 19:15
]Nations get toasted when the web server (or, more specifically, an instance of it) dies in between starting to write out a nation's save file and finishing writing it. The real culprit is some dodgy NationStates code that was never intended to handle this kind of load and doesn't implement ironclad file locking. (It also doesn't use a database.)

It's very rare but does happen when our server is getting really, really, really hammered.

Ah, joy, you use profiles, heh. But wouldn't it be faster to use a database? :?
SalusaSecondus
05-12-2003, 19:33
Not sure what you mean by profiles, but yeah, probably. This game had an expected userbase of about 1,000 (max), we are two powers higher. However, changing the backend now would be obscene.

Also, I'd be a tad skeptical. The forums use a DB (mySQL) and are slow and unstable, while the game (with often 5 to 10 times the userload) run just fine . . ..
Peng-Pau
05-12-2003, 19:39
Not sure what you mean by profiles, but yeah, probably. This game had an expected userbase of about 1,000 (max), we are two powers higher. However, changing the backend now would be obscene.

Also, I'd be a tad skeptical. The forums use a DB (mySQL) and are slow and unstable, while the game (with often 5 to 10 times the userload) run just fine . . ..

Yes, but the forums use php. Whilst it's a more powerful language, it's slower.

A suggestion for the forums would be to use mysql-min instead of mysql-opt or mysql-max as the MySQL daemon... This'd load up less of the functions which php doesn't use, and the server should then run faster...
Goobergunchia
05-12-2003, 20:04
Spotlight on:
The People's Republic of Ochakov
"Fear will keep the local systems in line..."

UN Category: Corrupt Dictatorship
Civil Rights: Very Good Economy: Imploded Political Freedoms: Outlawed

Location: Snopesean Archipelago
The People's Republic of Ochakov is a massive, environmentally stunning nation, renowned for its punitive income tax rates. Its hard-nosed, cynical population of 2.224 billion are ruled with an iron fist by the dictatorship government, which ensures that no-one outside the party gets too rich. In their personal lives, however, citizens are relatively unoppressed; it remains to be seen whether this is because the government genuinely cares about its people, or if it hasn't gotten around to stamping out civil rights yet.

It is difficult to tell where the omnipresent, corrupt, socially-minded government stops and the rest of society begins, but it juggles the competing demands of Education, the Environment, and Defence. The average income tax rate is 100%. The private sector is almost wholly made up of enterprising fourteen-year-old boys selling lemonade on the sidewalk, although the government is looking at stamping this out.

The mining industry has taken a hit from tighter environmental regulations, streakers swamp all public events in order to bare it all, citizens are encouraged to report friends, family members or co-workers who seem depressed to the government for "counselling", and the government is attempting to impose a new national language on the public. Crime -- especially youth-related -- is totally unknown, thanks to the all-pervasive police force and progressive social policies in education and welfare. Ochakov's national animal is the border collie, which frolics freely in the nation's many lush forests, and its currency is the Green M and M.


Ochakov is ranked 37th in the region and 78,509th in the world for Most Compassionate Citizens.

Most Recent Government Activity: 99 minutes ago

Seems to work now.
SalusaSecondus
05-12-2003, 20:08
Seems to work now.

[violet] fixed it.
Peng-Pau
05-12-2003, 20:45
Something I've noticed, they're all bigger nations... Like over 1bil...

I think, at least, heh.