Zandronum Chat @ irc.zandronum.com
#zandronum
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003395Doomseeker[All Projects] Bugpublic2018-03-03 19:472018-12-17 05:18
ReporterWubTheCaptain 
Assigned ToZalewa 
PrioritylowSeveritycrashReproducibilityrandom
StatusacknowledgedResolutionopen 
Platformx86_64OSDebian GNU/LinuxOS Versionbuster/sid
Product Version1.1 
Target VersionFixed in Version 
Summary0003395: Possible crash at start after the configuration directory was removed
DescriptionStarting a second process of Doomseeker crashed on start (quit immediately) and on next start displayed an empty server list. The first process survived after the crash.

I couldn't reproduce this bug yet, but I'll try my best to explain what happened in case it can be reproduced again.

In my window manager workspace 5 (out of cursor focus), I had Doomseeker 1.1 running for a long time. Because there was no cursor focus, the server list was also showing as empty. This would of course list all the servers immediately on cursor focus.

While this was open and in this state or right before it, I removed the configuration folder $HOME/.doomseeker. (Note, I have $HOME/.config/doomseeker too and didn't touch it, however Doomseeker 1.1 has no awareness of it since it's a Doomseeker 1.2 thing.) Then, I executed Doomseeker 1.1 again in workspace 6.

The main window displayed for a brief moment without any servers and then crashed. No dialog for "first time run" was displayed.

The first process in workspace 5 was still out of focus, but working and got the servers again after focus. Starting the second process in workspace 6 again would display the empty server list, and again have no "first time run" dialog.
Additional InformationWhether any of these steps to reproduce are correct is unknown. I didn't have stdout or stderr open, unfortunately.

It could also be the "empty server list" is the master server throttling response.
Attached Fileslog file icon 2018-09-22-crash.log [^] (2,458 bytes) 2018-09-22 01:48
log file icon 2018-09-22-02-05-14-crash.log [^] (2,134 bytes) 2018-09-22 02:12

- Relationships

-  Notes
User avatar (0019351)
WubTheCaptain (developer)
2018-08-20 20:43

Reproduced this today while launching 1.1. I think I launched 1.2 with a first launch, closed it and launched 1.1 with a first launch. Not sure anymore.

Now my Doomseeker 1.1 doesn't list servers due to this fault or something else, heh. (Recreating the .doomseeker directory will probably fix this.)
User avatar (0019352)
WubTheCaptain (developer)
2018-08-20 20:45

Doomseeker 1.1 output from console:

$ doomseeker
[20:44:27] Starting Doomseeker. Hello World! :)
[20:44:27] Setting up data directories.
[20:44:27] Attempting to load plugins from directory: /home/wub/.doomseeker/engines
[20:44:27] Attempting to load plugins from directory: /usr/bin/engines
[20:44:27] Attempting to load plugins from directory: engines
[20:44:27] Attempting to load plugins from directory: /usr/share/doomseeker/engines
[20:44:27] Loaded plugin: "Zandronum"!
[20:44:27] Listening to Zandronum's LAN servers broadcasts on port 15101.
[20:44:27] Initializing configuration file.
[20:44:27] Setting INI file: /home/wub/.doomseeker/doomseeker.ini
[20:44:27] Loading translations definitions
[20:44:27] Loading translation "en_US".
[20:44:27] Translation 'qt_en_US' not found.
[20:44:27] Translation 'en_US' not found.
[20:44:27] Failed to load translation.
[20:44:27] Initializing IP2C database.
[20:44:27] Initializing passwords configuration file.
[20:44:27] Initializing configuration for plugins.
[20:44:27] Initializing IRC configuration file.
[20:44:27] Setting IRC INI file: /home/wub/.doomseeker/doomseeker-irc.ini
[20:44:27] Starting refreshing thread.
[20:44:27] Preparing GUI.
[20:44:27] Please wait. IP2C database is being read. This may take some time.
[20:44:27] Parsing IP2C database: :/IpToCountry.dat
[20:44:27] IP2C database read in 63 ms. Entries read: 119365
[20:44:27] Init finished.
================================
[20:44:27] IP2C parsing thread has finished.
[20:44:27] IP2C parsing finished.


Zandronum plugin is definitely loaded, reports servers on the list, but the GUI tells there are none even with cursor focus on the window.
User avatar (0019353)
WubTheCaptain (developer)
2018-08-20 20:48

Quote
Zandronum plugin is definitely loaded, reports servers on the list, but the GUI tells there are none even with cursor focus on the window.


Wrong paste, but definitely said to have found some 629 servers with the GUI empty.
User avatar (0019609)
WubTheCaptain (developer)
2018-09-22 01:46

Removed $HOME/.doomseeker/doomseeker.ini on 1.2~beta (!) built with Qt4 and crashed on OpenBSD with this:

[01:34:50] Parsing IP2C database: /home/doomseeker/.local/share/data/doomseeker/
IpToCountry.dat
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
Abort trap (core dumped)


Backtracing the core dump with gdb isn't so helpful, because of abort trap.

(gdb) bt       
#0  thrkill () at -:3
#1  0x000002c607f9655e in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
Die: DW_TAG_unspecified_type (abbrev = 4, offset = 251222)
        has children: FALSE
        attributes:
                DW_AT_name (DW_FORM_strp) string: "decltype(nullptr)"
Dwarf Error: Cannot find type of die [in module /usr/lib/libc++abi.so.0.1]


Something to note, $HOME/.config/doomseeker/doomseeker.ini exists. I've been switching between 1.1, 1.2, Qt4 and Qt5 versions.

Something very special to note too, just before the crash every checkbox in Doomseeker settings for this 1.2~beta-1 build (latest) was unchecked through no action of mine. (But I think it may have been like that ever since Qt5 was found to be broken; 0003494.)

Hopefully someone can reproduce soon, or at least finally find a cause.
User avatar (0019611)
WubTheCaptain (developer)
2018-09-22 01:58

Quote from WubTheCaptain
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.


But it's odd, because I can't find any try{...}catch{...} in Doomseeker's source code (specifically Qt) with a grep search.
User avatar (0019612)
WubTheCaptain (developer)
2018-09-22 02:09

Yep, okay, Doomseeker 1.1 also crashed on OpenBSD shortly after deleting ~/.config/doomseeker/* – but there was no doomseeker.ini, only doomseeker-irc.ini and the other .ini file. Same backtrace.

But uh, 1.1 is not even supposed to use that directory. In fact, XDG basedir support is broken on OpenBSD. I wonder how sometimes my files got into $HOME/.config/doomseeker/, sometimes to legacy $HOME/.doomseeker/ path.

[02:05:13] Setting IRC INI file: /home/doomseeker/.doomseeker/doomseeker-irc.ini
[02:05:13] Starting refreshing thread.
[02:05:13] Preparing GUI.
[02:05:13] Please wait. IP2C database is being read. This may take some time.
[02:05:13] Parsing IP2C database: /home/doomseeker/.doomseeker/IpToCountry.dat
[02:05:13] Init finished.
================================
[02:05:13] Total refresh process initialized!
[02:05:14] IP2C database read in 340 ms. Entries read: 175445
[02:05:14] IP2C parsing thread has finished.
[02:05:14] IP2C parsing finished.
LookupHostConsumerThread: 0x10c6777b8c40
terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
Abort trap (core dumped)
User avatar (0019613)
WubTheCaptain (developer)
2018-09-22 02:13

Okay, and now it's reproducible on 1.1 all the time on my machine.
User avatar (0019617)
WubTheCaptain (developer)
2018-09-22 02:33
edited on: 2018-09-22 02:55

I'd take a guess it's the IP2C autoupdater behind this.

src/core/ip2c/ip2cupdater.cpp calls lots to abort(); and there's no line for IP2C remote/local comparison. When the config directory is removed, settings get reset on the next launch of Doomseeker; That is, IP2C autoupdate gets enabled again by default.

Then, something with IP2C autoupdate fails on OpenBSD. Code calls abort, abort trap, do this few times until the settings file gets corrupt with no checkboxes enabled by default (disables IP2C updating), and the issue doesn't exist anymore.

This is very reproducible with 1.1-0 (note: didn't try 1.1-p1) built with Qt4 on OpenBSD (using QEMU KVM virtual machine).

That doesn't explain bad_alloc easily, though...

User avatar (0019618)
WubTheCaptain (developer)
2018-09-22 02:42
edited on: 2018-09-22 02:43

Quote from WubTheCaptain
Now my Doomseeker 1.1 doesn't list servers due to this fault or something else, heh. (Recreating the .doomseeker directory will probably fix this.)


Omg, it totally makes sense now. Yes!

The most likely answer in retrospect is that in this scenario too, the config checkbox for "refresh servers on startup" (Configuration → Query) got unchecked due to config file corruption (probably an abnormal quit during a critical process), so that's why I saw no servers at all! And of course, re-creating .doomseeker directory reset that setting and things worked again for a while.

This same symptom, no servers on startup, is part of what I experience on OpenBSD with reproducible results, for the same reasons.

User avatar (0019619)
WubTheCaptain (developer)
2018-09-22 02:47
edited on: 2018-09-22 02:47

And fyi, a likely reason this has gone unseen for so long is that I typically disable IP2C autoupdate on my machine (Debian GNU/Linux) in Doomseeker settings.

User avatar (0019620)
WubTheCaptain (developer)
2018-09-22 03:03

Oh, and std::bad_alloc in most cases with OpenBSD means memory exhaustion. If it was that (seems a bit unlikely), two plausible explanations:

  1. 4 GB RAM in a virtual machine is not enough to run X with fvwm and Doomseeker (untrue); or
  2. /etc/login.conf memory limits on users limit the maximum available memory to programs.


Dunno?
User avatar (0019955)
Zalewa (developer)
2018-10-06 17:11

The std::bad_alloc may be caused by some "size()" function returning a negative value and then this negative value being passed to malloc() without checking. As malloc() takes the size as the unsigned size_t type, the negative value is interpreted as a really huge number and thus std::bad_alloc happens.

Let's return to this when we go forth with 0003541 and see if it still happens.
User avatar (0020264)
WubTheCaptain (developer)
2018-12-17 05:06
edited on: 2018-12-17 05:18

Quote from Zalewa
Let's return to this when we go forth with 0003541 and see if it still happens.


0003541 was closed as "denied".


Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2018-03-03 19:47 WubTheCaptain New Issue
2018-03-03 19:47 WubTheCaptain Steps to Reproduce Updated View Revisions
2018-03-03 19:49 WubTheCaptain Steps to Reproduce Updated View Revisions
2018-03-03 19:50 WubTheCaptain Additional Information Updated View Revisions
2018-03-03 19:54 WubTheCaptain Description Updated View Revisions
2018-03-03 19:54 WubTheCaptain Steps to Reproduce Updated View Revisions
2018-08-20 20:43 WubTheCaptain Note Added: 0019351
2018-08-20 20:45 WubTheCaptain Note Added: 0019352
2018-08-20 20:48 WubTheCaptain Note Added: 0019353
2018-09-22 01:46 WubTheCaptain Note Added: 0019609
2018-09-22 01:48 WubTheCaptain File Added: 2018-09-22-crash.log
2018-09-22 01:58 WubTheCaptain Note Added: 0019611
2018-09-22 02:09 WubTheCaptain Note Added: 0019612
2018-09-22 02:12 WubTheCaptain File Added: 2018-09-22-02-05-14-crash.log
2018-09-22 02:13 WubTheCaptain Note Added: 0019613
2018-09-22 02:19 WubTheCaptain Note Added: 0019614
2018-09-22 02:20 WubTheCaptain Note Added: 0019615
2018-09-22 02:23 WubTheCaptain Note Added: 0019616
2018-09-22 02:24 WubTheCaptain Note Deleted: 0019614
2018-09-22 02:24 WubTheCaptain Note Deleted: 0019615
2018-09-22 02:25 WubTheCaptain Note Deleted: 0019616
2018-09-22 02:33 WubTheCaptain Note Added: 0019617
2018-09-22 02:33 WubTheCaptain Status new => acknowledged
2018-09-22 02:33 WubTheCaptain Note Edited: 0019617 View Revisions
2018-09-22 02:36 WubTheCaptain Note Edited: 0019617 View Revisions
2018-09-22 02:36 WubTheCaptain Note Edited: 0019617 View Revisions
2018-09-22 02:37 WubTheCaptain Priority low => normal
2018-09-22 02:42 WubTheCaptain Note Added: 0019618
2018-09-22 02:43 WubTheCaptain Note Edited: 0019618 View Revisions
2018-09-22 02:47 WubTheCaptain Note Added: 0019619
2018-09-22 02:47 WubTheCaptain Note Edited: 0019619 View Revisions
2018-09-22 02:47 WubTheCaptain Note Edited: 0019619 View Revisions
2018-09-22 02:55 WubTheCaptain Note Edited: 0019617 View Revisions
2018-09-22 03:03 WubTheCaptain Note Added: 0019620
2018-10-05 08:43 WubTheCaptain Priority normal => low
2018-10-06 17:11 Zalewa Note Added: 0019955
2018-12-17 05:06 WubTheCaptain Note Added: 0020264
2018-12-17 05:06 WubTheCaptain Assigned To => Zalewa
2018-12-17 05:18 WubTheCaptain Note Edited: 0020264 View Revisions






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker