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

Dedicated server hangs in qcommon/common.c:Com_Milliseconds() ONLY when ran in GDB #426

Open
quakemmo opened this issue Oct 18, 2019 · 4 comments

Comments

@quakemmo
Copy link

It will display the ] prompt right after "Hunk_Clear: reset the hunk ok", and react to entering commands but pause the server initialisation (ie, the next line sohuld be "--- Common Init Complete --, but it doesn't come). Pushing just "enter" will just display another prompt. Entering any kind of command will continue the server initialisation for a bit, then hang again. In this fashion, I need to enter a few commands (any really), for the server to finish init.

Only happens when ran under GDB. I tracked the issue down to Com_Milliseconds()

Am I missing something guys? Thanks!

Running 8.2.1 on a Debian 10/64 bit, with gcc 8.3.0.

@ensiform
Copy link

ensiform commented Oct 18, 2019

Are you using code built by yourself from the latest git master? The builds available still are ancient because the test builds are offline due to security issues with the server.

@quakemmo
Copy link
Author

Code built myself. Used to work perfectly before, not sure it does it with this particular version of GDB or maybe GCC...

@quakemmo
Copy link
Author

The more research I've conducted, the more interesting it gets.

The problem is that when ran under GDB, STDIN_FILENO's non blocking flag gets reset by....the getpwuid() call in sys_unix.c. It does sound a little weird... I keep looking.

@quakemmo
Copy link
Author

quakemmo commented Oct 20, 2019

Here's a quick test snippet that demonstrates the behavior:
https://gist.github.com/x3c/24d9e49297751c886069214359bc19fe

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

No branches or pull requests

2 participants