Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash when disconnecting after sending PACKET_CLIENT_GETMAP #4503

Closed
DorpsGek opened this issue Feb 12, 2011 · 2 comments
Closed

crash when disconnecting after sending PACKET_CLIENT_GETMAP #4503

DorpsGek opened this issue Feb 12, 2011 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Zydeco opened the ticket and wrote:

Trying to reproduce bug # 4497, I found that the server will sometimes crash if a client disconnects just after sending the PACKET_CLIENT_GETMAP packet, although where the crash occurs is different on different OSes.

I've been tracking it a bit under Mac OS X, and it seems to happen when the send() under this->SendPackets() in network_sever.cpp:575 gets a broken pipe error, so it closes the connection and in the ServerNetworkGameSocketHandler destructor, it tries to lock the savegame_mutex that is already locked by the same thread, so it gets a EDEADLK error.

On linux it crashes on a different place, but it is caused in the same way.

To cause the crash I used a ruby script that sends the appropriate packets and disconnects after GETMAP, I'm attaching it too.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4503
@DorpsGek
Copy link
Member Author

Zydeco wrote:

I have tried it with the 1.0.5 release (sending the right newgrf revision), but it doesn't crash there, it only crashes on 1.1 (I've tried b5 and r22064)


This comment was imported from FlySpray: https://bugs.openttd.org/task/4503#comment9673

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r22067-70 (I hope). Thanks for the script.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4503

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Network labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant