Page 1 of 1

Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Wed Jan 06, 2016 16:14
by amadin
Server sometimes doesn't respond (without sending error to client) for some players until they reconnect. I increased max_objects_per_block = 70 but it not help. 0.4.13 stable, minetest_game from developer version.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51629 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51630 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51631 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51632 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51633 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51634 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: Server::ProcessData(): Canceling: No player for peer_id=213 disconnecting peer!
2016-01-05 06:54:20: ERROR[ServerThread]: Server::ProcessData(): Canceling: No player for peer_id=222 disconnecting peer!
2016-01-05 06:54:21: ERROR[ServerThread]: Server::ProcessData(): Canceling: No player for peer_id=214 disconnecting peer!
2016-01-05 06:54:22: ERROR[ServerThread]: suspiciously large amount of objects detected: 56 in (-34,0,19); removing all of them.
2016-01-05 06:55:50: ERROR[ServerThread]: suspiciously large amount of objects detected: 64 in (-34,0,19); removing all of them.
2016-01-05 06:56:10: ERROR[ServerThread]: suspiciously large amount of objects detected: 64 in (-34,0,19); removing all of them.
2016-01-05 06:57:16: ERROR[ServerThread]: suspiciously large amount of objects detected: 64 in (-34,0,19); removing all of them.
2016-01-05 06:57:40: ERROR[ServerThread]: ServerEnv: Trying to store id=52944 statically but block (-33,0,18) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:57:40: ERROR[ServerThread]: ServerEnv: Trying to store id=52945 statically but block (-33,0,18) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:57:40: ERROR[ServerThread]: ServerEnv: Trying to store id=52946 statically but block (-33,0,18) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:57:40: ERROR[ServerThread]: ServerEnv: Trying to store id=52947 statically but block (-33,0,18) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:57:40: ERROR[ServerThread]: ServerEnv: Trying to store id=52948 statically but block (-33,0,18) already contains 49 obje
cts. Forcing delete.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Thu Jan 07, 2016 07:15
by DI3HARD139
If the players are getting an error upon connection its usually their connection. Doing /clearobjects every now and then stops the
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
ERROR[ServerThread]: ServerEnv: Trying to store id=52948 statically but block (-33,0,18) already contains 49 obje
cts. Forcing delete.
from showing up.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Fri Jan 08, 2016 06:45
by amadin
Players not get any error, server just sometimes not respont to some player and print error in log only. i Used /clearobject today, but error as:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-01-08 04:35:57: ERROR[ServerThread]: ServerEnv: Trying to store id=13726 statically but block (-34,0,19) already contains 49
objects. Forcing delete.
2016-01-08 04:38:15: ERROR[ServerThread]: suspiciously large amount of objects detected: 64 in (-34,0,19); removing all of them.

still show.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Sat Jan 09, 2016 04:48
by DI3HARD139
What your server called?

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Sat Jan 09, 2016 15:47
by amadin
[RU] Russian Ama, now i changed max_objects_per_block = 100 and error go away, but i don't think this is a good idea.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Sat Jan 09, 2016 22:46
by DI3HARD139
Has the error caused any issues? If not then i'd just ignore it.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Sun Jan 10, 2016 07:57
by amadin
DI3HARD139 wrote:Has the error caused any issues? If not then i'd just ignore it.

Yes. Server crashed if in log many errors as this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51629 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51630 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51631 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.
2016-01-05 06:54:20: ERROR[ServerThread]: ServerEnv: Trying to store id=51632 statically but block (-34,0,19) already contains 49 obje
cts. Forcing delete.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Sun Jan 10, 2016 23:44
by DI3HARD139
Try backing up the current map and replacing it with an older map. If it goes away then the map may be corrupted.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Mon Jan 11, 2016 07:30
by amadin
But why it corrupted????

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Tue Jan 12, 2016 21:39
by DI3HARD139
Power loss, Ram Errors, Anti-virus scanning the map files while they were being written to, Hard Drive errors. There are a lot of reasons for it becoming corrupted if it did. Could you paste the debug.txt file to pastebin.com . It's hard to determine without knowing what else was occurring at the time of the errors.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Tue Feb 14, 2017 12:28
by Wuzzy
I am currently struggling with this bug as well in my subgame “MineClone 2”.

2017-02-14 13:18:37: WARNING[Server]: ServerEnv: Trying to store id = 1720 statically but block (17,0,-5) already contains 64 objects. Forcing delete.
2017-02-14 13:18:37: ERROR[Server]: Server::ProcessData(): Canceling: No player for peer_id=2 disconnecting peer!


Questions: So does this mean that Minetest hangs because of too many objects?
Also, what exactly does the second line mean? It's rather cryptic to me. :-(

Finally, what could possibly go wrong in mod code to cause this bug?

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Tue Feb 14, 2017 17:08
by sorcerykid
Wuzzy, this issue is addressed in another thread:

viewtopic.php?f=6&t=16483

If you are using Minetest 0.4.14, you just need to change the following code in src/environment.cpp and then recompile:

Old code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
void ServerEnvironment::deactivateFarObjects(bool force_delete)
{
        std::vector<u16> objects_to_remove;
        for(std::map<u16, ServerActiveObject*>::iterator
                        i = m_active_objects.begin();
                        i != m_active_objects.end(); ++i) {
                ServerActiveObject* obj = i->second;
                assert(obj);

                // Do not deactivate if static data creation not allowed
                if(!force_delete && !obj->isStaticAllowed())
                        continue;

                // If pending deactivation, let removeRemovedObjects() do it
                if(!force_delete && obj->m_pending_deactivation)
                        continue;

                u16 id = i->first;
                v3f objectpos = obj->getBasePosition();

                // The block in which the object resides in
                v3s16 blockpos_o = getNodeBlockPos(floatToInt(objectpos, BS));
:
:
:
                // If block is active, don't remove
                if(!force_delete && m_active_blocks.contains(blockpos_o))
                        continue;


New code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
void ServerEnvironment::deactivateFarObjects(bool force_delete)
{
        std::vector<u16> objects_to_remove;
        for(std::map<u16, ServerActiveObject*>::iterator
                        i = m_active_objects.begin();
                        i != m_active_objects.end(); ++i)
        {
                ServerActiveObject* obj = i->second;
                assert(obj);

// REK begin
                // Don't delete non-static objects, including PlayerSAO's, or
                // objects already pending deactivation (sorcerykid 01/24/2017)
                if(!obj->isStaticAllowed() || obj->m_pending_deactivation)
                        continue;
// REK end

                u16 id = i->first;
                v3f objectpos = obj->getBasePosition();

                // The block in which the object resides in
                v3s16 blockpos_o = getNodeBlockPos(floatToInt(objectpos, BS));
:
:
:
// REK begin
                // Ignore objects in active map blocks, otherwise they risk being deleted
                // as soon as "max_objects_per_block" threshold is exceeded within any
                // previously deactivated map block. (sorcerykid 01/24/2017)
                if(m_active_blocks.contains(blockpos_o))
                        continue;
// REK end


In Minetest 0.4.15, the offending deactivateFarObjects( ) function is found in src/serverenvironment.cpp.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Wed Feb 15, 2017 18:58
by Krock
Fixed ~2 hours ago: a5e4273
VanessaE confirmed that it is fixed now.

Re: Canceling: No player for peer_id=214 disconnecting peer!

PostPosted: Wed Feb 15, 2017 21:51
by sorcerykid
None of the commits to GitHub thus far get to the root of this problem.

The changes I made above are the proper way of resolving this issue. In fairness, that entire function probably ought to be rewritten because it has become a patchwork mess :( Also "force_delete = true" should be removed from line 2100.

I've tested my fix rigorously on JT2 server with extensive debugging output. It has worked without fail for nearly three weeks.