Log in

View Full Version : Thousands of Private Messages


Signal
September 11th, 2006, 08:56 AM
There may be some sort of glitch in the database that should be called to the administration's attention.

The little Welcome box at the top of the page tells me that I have 65534 unread PMs.

None of these supposed unread messages are actually in my inbox, but the indicator says I have that many.

JoeSixPack
September 12th, 2006, 02:46 AM
I have an interesting theory.

Certain programming languages (if not most) use 16-bit integers, which can be 'signed' (+ or -) or unsigned (just +).

2^16 == 65536
So there are 65536 possible values, or a range of numbers from 0 to +65535, for unsigned integers.

For unsigned integers, the range of possible values are -32,768 to +32,767

What it sounds like was happening, was that you had 0 (zero) PMs. Somehow, the server made a 1-bit mistake and interpreted the 0 as a -2, which was displayed as 65534.

This sounds like there was an error that caused a "signed integer overflow", but it's just a guess.

There is an interesting consequence to the fact that in 2's complement arithmetic, one expects to throw away the final carry: in unsigned arithmetic a carry out of the most significant digit means that there has been an overflow, but in signed arithmetic an overflow is not so easy to detect. In fact, signed arithmetic overflows are detected by checking the consistency of the signs of the operands and the final answer. A signed overflow has occurred in an addition or subtraction if:

* the sum of two positive numbers is negative;
* the sum of two negative numbers is positive;
* subtracting a positive number from a negative one yields a positive result; or
* subtracting a negative number from a positive one yields a negative result.

http://www.rwc.uc.edu/koehler/comath/13.html

Signal
September 12th, 2006, 08:47 AM
That is an interesting theory, JSP. It's probably what happened.

I had first exprienced this on Sunday evening, after reading and replying to several PMs. Then Monday morning it was still occuring.

I went into my Inbox and deleted one older message at random and the Unread Messages count returned to normal.

It appears to be normal now.