Anonymous | Login | Signup for a new account | 2024-04-25 06:15 UTC |
My View | View Issues | Change Log | Roadmap | Doomseeker Issue Support Ranking | Rules | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0003324 | Doomseeker | [All Projects] Bug | public | 2017-11-03 12:38 | 2018-10-27 22:55 | ||||
Reporter | WubTheCaptain | ||||||||
Assigned To | Zalewa | ||||||||
Priority | normal | Severity | major | Reproducibility | sometimes | ||||
Status | closed | Resolution | fixed | ||||||
Platform | x86_64 | OS | Debian GNU/Linux | OS Version | buster/sid | ||||
Product Version | 1.1 | ||||||||
Target Version | 1.2 | Fixed in Version | 1.2 | ||||||
Summary | 0003324: RCon client process stays alive after RCon fails and init is finished, doesn't exit normally after error | ||||||||
Description | Failed RCon client initialization can keep the RCon client running in background, wasting host computer resources (e.g. memory). LookupHost thread is never finalized. Ideally, it should return to the dialog asking for server details, or exit gracefully. | ||||||||
Steps To Reproduce | Start Doomseeker in RCon client mode, preferably from a terminal for stdout:$ doomseeker --rcon [12:23:28] Starting Doomseeker. Hello World! :) ... [12:23:28] Starting RCon client. Try an engine which doesn't support RCon (currently as of writing, anything but Zandronum). The server address and password don't seem to matter, I've set both to blank (null). The following two lines (ignoring the timestamp) should be appended to stdout: [12:23:30] Init finished. ================================ An error should also be printed about lack of support. Notice the process is still alive but nothing is happening. This is verifiable with pgrep (GNU/Linux): $ pgrep doomseeker 28567 Repeating these steps will create more processes, which can be found with pgrep. Ctrl + C (^C) will forcefully terminate the process. | ||||||||
Additional Information | Reproducible in 1.2~beta-171103-0428. This does not happen when the plugin is specified from command line:$ doomseeker --rcon ChocolateDoom localhost [12:37:39] Starting Doomseeker. Hello World! :) ... [12:37:39] Starting RCon client. [12:37:39] Plugin does not support RCon. $ (I thought I already reported this. I guess I didn't, sorry!) | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Notes | |
(0019039) Zalewa (developer) 2018-02-14 14:09 |
Fix:'https://bitbucket.org/Doomseeker/doomseeker/commits/7b9605ec4ad6b35ca46ec12537637787a97bfd06 [^]' |
(0019045) WubTheCaptain (reporter) 2018-02-15 03:09 |
I'm going to reopen this, because the exit code is screwed:$ /tmp/doomseeker/doomseeker --rcon [... no RCon support is triggered here ...] $ echo $? 0 1.2~beta-180214-1407 |
(0019046) WubTheCaptain (reporter) 2018-02-15 03:35 edited on: 2018-02-15 03:40 |
I notice you've done something to fix another (unrelated) bug with exit codes in 1.1: In 1.1, no Chocolate Doom installed: $ doomseeker --rcon ChocolateDoom localhost [...] [03:23:01] Couldn't find specified plugin: ChocolateDoom $ echo $? 0 Also in 1.1, but with Chocolate Doom installed: $ doomseeker --rcon ChocolateDoom localhost [...] [03:27:29] Plugin does not support RCon. LookupHostConsumerThread: 0x7fbb6f93b700 $ echo $? 0 But in 1.2~beta-180214-1407, without Chocolate Doom: $ /tmp/doomseeker/doomseeker --rcon ChocolateDoom localhost [...] [03:34:10] Starting RCon client. [03:34:10] Couldn't find specified plugin: ChocolateDoom $ echo $? 2 and 1.2~beta-180214-1407 with Chocolate Doom: $ /tmp/doomseeker/doomseeker --rcon ChocolateDoom localhost [...] [03:27:19] Plugin does not support RCon. [03:27:19] Finalizing LookupHost thread LookupHostConsumerThread: 0x7f16321d1700 [03:27:20] Finalized LookupHost thread $ echo $? 2 but the exit code 0 is still a thing when the plugin is not specified from the command line. (EDIT: Lol, I accidentally found this via experimentation before reading the actual code changes in the commit.) |
(0019047) WubTheCaptain (reporter) 2018-02-15 03:49 edited on: 2018-02-15 03:55 |
I also note that there's no convention for non-0/1 exit values. Exit code 2 is a bash shell builtin misuse thing, a user/command error. There's sysexits(3) for preferable exit codes for programs on FreeBSD, but... yeah... |
(0019048) Zalewa (developer) 2018-02-15 07:24 |
Exit codes are what programmer wants them to be. In our case non-zero means error. I don't use 1 because on Windows 1 can be a success code too, generated by Windows, and there's nothing you can do about it. |
(0019049) Zalewa (developer) 2018-02-15 07:31 |
The actual problem with "No RCon" support is that the port should not be listed if it doesn't have RCon. |
(0019052) Zalewa (developer) 2018-02-15 09:52 |
This commit should disallow quitting "--rcon" with an error condition:'https://bitbucket.org/Doomseeker/doomseeker/commits/cfedcedc860336f11118fb0a569dd867e3dc38fc [^]' |
(0019054) WubTheCaptain (reporter) 2018-02-15 17:41 |
Quote from Zalewa EXIT_FAILURE from stdlib.h? |
(0019056) Zalewa (developer) 2018-02-15 20:07 |
Regardless, unless there's '0' returned where a clear failure occurs, I won't be changing the exit codes. It's beyond this ticket too. So, if Doomseeker doesn't get stuck anymore, I will consider this as resolved. |
(0019057) WubTheCaptain (reporter) 2018-02-16 08:11 |
Functionally this issue has been fixed, although I'll create another issue ticket about a possible small typo introduced now. Thanks. |
This issue is already marked as resolved. If you feel that is not the case, please reopen it and explain why. |
|
Supporters: | No one explicitly supports this issue yet. |
Opponents: | No one explicitly opposes this issue yet. |
Issue History | |||
Date Modified | Username | Field | Change |
2017-11-03 12:38 | WubTheCaptain | New Issue | |
2017-11-03 12:44 | WubTheCaptain | Steps to Reproduce Updated | View Revisions |
2017-11-03 12:44 | WubTheCaptain | Steps to Reproduce Updated | View Revisions |
2018-02-14 13:13 | Zalewa | Assigned To | => Zalewa |
2018-02-14 13:13 | Zalewa | Status | new => assigned |
2018-02-14 14:09 | Zalewa | Note Added: 0019039 | |
2018-02-14 14:09 | Zalewa | Status | assigned => needs testing |
2018-02-15 01:30 | WubTheCaptain | Status | needs testing => resolved |
2018-02-15 01:30 | WubTheCaptain | Resolution | open => fixed |
2018-02-15 01:30 | WubTheCaptain | Target Version | => 1.2 |
2018-02-15 01:30 | WubTheCaptain | Fixed in Version | => 1.2 |
2018-02-15 03:09 | WubTheCaptain | Note Added: 0019045 | |
2018-02-15 03:09 | WubTheCaptain | Status | resolved => assigned |
2018-02-15 03:09 | WubTheCaptain | Resolution | fixed => reopened |
2018-02-15 03:35 | WubTheCaptain | Note Added: 0019046 | |
2018-02-15 03:40 | WubTheCaptain | Note Edited: 0019046 | View Revisions |
2018-02-15 03:49 | WubTheCaptain | Note Added: 0019047 | |
2018-02-15 03:51 | WubTheCaptain | Note Edited: 0019047 | View Revisions |
2018-02-15 03:53 | WubTheCaptain | Note Edited: 0019047 | View Revisions |
2018-02-15 03:53 | WubTheCaptain | Note Edited: 0019047 | View Revisions |
2018-02-15 03:55 | WubTheCaptain | Note Edited: 0019047 | View Revisions |
2018-02-15 07:24 | Zalewa | Note Added: 0019048 | |
2018-02-15 07:31 | Zalewa | Note Added: 0019049 | |
2018-02-15 09:52 | Zalewa | Note Added: 0019052 | |
2018-02-15 09:52 | Zalewa | Status | assigned => needs testing |
2018-02-15 17:41 | WubTheCaptain | Note Added: 0019054 | |
2018-02-15 18:21 | WubTheCaptain | Status | needs testing => needs review |
2018-02-15 20:07 | Zalewa | Note Added: 0019056 | |
2018-02-15 20:07 | Zalewa | Status | needs review => needs testing |
2018-02-16 08:11 | WubTheCaptain | Note Added: 0019057 | |
2018-02-16 08:11 | WubTheCaptain | Status | needs testing => resolved |
2018-02-16 08:11 | WubTheCaptain | Resolution | reopened => fixed |
2018-02-16 08:25 | WubTheCaptain | Relationship added | related to 0003374 |
2018-10-27 22:55 | WubTheCaptain | Status | resolved => closed |
Copyright © 2000 - 2024 MantisBT Team |