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

Server Segfault #97

Open
CrazySpence opened this issue Feb 23, 2022 · 4 comments
Open

Server Segfault #97

CrazySpence opened this issue Feb 23, 2022 · 4 comments
Labels

Comments

@CrazySpence
Copy link
Member

Currently the server will segfault when run, doesn't matter if it is 32bit or 64bit i can verify it on my host and on a 64bit docker image I just put together for testing

End of the log + gdb output:

Script execution done.
Initializing TCP/IP stack...
skipping loopback interface

Program received signal SIGSEGV, Segmentation fault.
0x00005555555aacd2 in NODE_Copy (dst=0x555555610b08 <NET_UDPDriver::GetUDPDriver()::_TheUDPDriver+40>, src=0x0) at ../../../../src/parsec_server/net_util_sv.cpp:59
59 {

@CrazySpence
Copy link
Member Author

Looking at the function it will assert if either dst or src are null and in this case src is null for some reason

@CrazySpence
Copy link
Member Author

Back trace makes it look like it's bombing on the initialization of the interface, I wonder if this is like the old Mac OS problem we had where it couldn't find interfaces?

(gdb) bt
#0 0x00005555555aacd2 in NODE_Copy (dst=0x555555610b08 <NET_UDPDriver::GetUDPDriver()::_TheUDPDriver+40>, src=0x0) at ../../../../src/parsec_server/net_util_sv.cpp:59
#1 0x00005555555ab80f in NET_UDPDriver::_SetupInterface (this=0x555555610ae0 <NET_UDPDriver::GetUDPDriver()::_TheUDPDriver>, p_Node=0x0) at ../../../../src/parsec_server/nl_udpdriver.cpp:610
#2 0x00005555555ab6ac in NET_UDPDriver::_RetrieveLocalIP (this=0x555555610ae0 <NET_UDPDriver::GetUDPDriver()::_TheUDPDriver>) at ../../../../src/parsec_server/nl_udpdriver.cpp:530
#3 0x00005555555aaf47 in NET_UDPDriver::InitDriver (this=0x555555610ae0 <NET_UDPDriver::GetUDPDriver()::_TheUDPDriver>, szInterface=0x0, selected_port=6582) at ../../../../src/parsec_server/nl_udpdriver.cpp:102
#4 0x0000555555594f1b in E_GameServer::Init (this=0x555555613ee0 <E_GameServer::GetGameServer()::_TheGameServer>) at ../../../../src/parsec_server/e_gameserver.cpp:319
#5 0x00005555555ac8ca in main (argc=1, argv=0x7fffffffecd8) at ../../../../src/parsec_server/sv_main.cpp:79

@CrazySpence
Copy link
Member Author

Ok, so! this is actually 2 issues, the one listed above is the result of running the server in a container, in bridged mode the networking for the vm is like 0.0.0.0:6589 which we never anticipated for parsec so some of the startup checks are ignoring that and then segfaulting because no addresses exist, ill make another issue for the bug im hitting in the real world

@CrazySpence
Copy link
Member Author

Commented this out of nl_udpdriver.cpp and it worked and I had parsec_server running in a local container and was able to connect to it from my machine

// only handle IPV4 entries
if ( ifr->ifr_addr.sa_family != AF_INET ) {
continue;
}

Honestly that seems like a redundant check since the interface struct is being called against AF_INET to begin with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant