bugFreeciv - Bugs: bug #22048, Crashes and other trouble with...

 
 
Show feedback again

bug #22048: Crashes and other trouble with repeated "Connect to network game" / "Cancel"

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sun 18 May 2014 12:18:00 PM UTC  
 
Category: client-gtk-2.0Severity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: trunk r24892Operating System: GNU/Linux
Planned Release: 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 12 Jul 2014 02:21:35 PM UTC, comment #10:

> Opened bug #22108 about the wrong usage of gtk from metaserver
> thread.

I haven't been able to reproduce any crashes with current trunk (r25504), so I'm claiming this is now fixed by a combination of that thread fix and fixes committed under this bug.

(I did see some minor remaining trouble, for which I've raised bug #22316.)

Jacob Nevins <jtn>
Project Administrator
Thu 29 May 2014 08:49:55 PM UTC, comment #9:

Opened bug #22108 about the wrong usage of gtk from metaserver thread.

Marko Lindqvist <cazfi>
Project Administrator
Sat 24 May 2014 10:22:37 AM UTC, comment #8:

Sadly, with trunk r24941 (containing both r24918 under this bug and the fix for bug #22066), I reproduced symptoms (1) and (2) (or at least the backtrace looks the same, given lack of debugging symbols).
(I haven't reproduced (3) yet, but it was rare enough that I can't be sure it's gone.)

> So we keep this one for uninitialized scan result bug (of
> which 2 seems to be symptom of)?

Sadly this turns out to have been a bad idea, so I guess we should migrate the symptoms to a new ticket.
As a rule, I think we should submit fixes that we're not entirely sure address symptoms in new, specific tickets, reserving the original to be closed when we've evidence the symptom(s) are gone.

Thanks for the fixes, anyway. Since only I seem to be able to reproduce the issues, probably I should be finding time to dig into them myself rather than just posting backtraces. It's possible that it's related to old libraries (I'm still on Xubuntu 12.04).

However, are we violating rules for using Gtk+ in threads? The GDK3 docs say "GTK+, however, is not thread safe. You should only use GTK+ and GDK from the thread gtk_init() and gtk_main() were called on." (That's a Grk3 doc, but I would be surprised if the same weren't also true of Gtk2.)

Jacob Nevins <jtn>
Project Administrator
Wed 21 May 2014 09:57:50 PM UTC, comment #7:

I opened bug #22066 (with fix) of one symptom I'm seeing. While symptom is different, it's quite possible that it's the same bug as one of the symptoms you're seeing but different behavior with different glib/gtk+ versions.

Marko Lindqvist <cazfi>
Project Administrator
Wed 21 May 2014 09:23:09 PM UTC, SVN revision 24919:

Initialize meta server scan result before starting the scan. This makes sure the main thread does
not assume scan to have finished before it actually is.
Got rid of meta server scan "state" that was never used, only set at one place

Reported by Jacob Nevins

See bug #22048

(Browse SVN revision 24919)

Marko Lindqvist <cazfi>
Project Administrator
Wed 21 May 2014 09:23:04 PM UTC, SVN revision 24918:

Initialize meta server scan result before starting the scan. This makes sure the main thread does
not assume scan to have finished before it actually is.
Got rid of meta server scan "state" that was never used, only set at one place

Reported by Jacob Nevins

See bug #22048

(Browse SVN revision 24918)

Marko Lindqvist <cazfi>
Project Administrator
Wed 21 May 2014 09:08:15 PM UTC, comment #4:

> Which suggests those are unrelated and probably need new
> ticket(s).


So we keep this one for uninitialized scan result bug (of which 2 seems to be symptom of)?

Marko Lindqvist <cazfi>
Project Administrator
Mon 19 May 2014 09:02:28 PM UTC, comment #3:

Seen symptoms (1) and (3) with unpatched S2_5 as well. Not seen (2) in my testing.
Not reproduced any trouble with S2_4.

Jacob Nevins <jtn>
Project Administrator
Mon 19 May 2014 08:08:16 PM UTC, comment #2:

With this patch, in sessions which survived bug #22047, I was still able to reproduce symptoms (1) and (3) but didn't see (2).

Which suggests those are unrelated and probably need new ticket(s).

Jacob Nevins <jtn>
Project Administrator
Mon 19 May 2014 04:04:23 AM UTC, comment #1:

I could reproduce the crash a couple of times without the attached patch, but not once with it.

It initializes meta server scan result before new scan. Presumably it used to get SCAN_STATUS_DONE from the previous scan, causing attempt to handle the scan results even before they are created. Do not overwrite SCAN_STATUS_ABORT with SCAN_STATUS_DONE.

Also get rid of scan->meta.state that was never used, only set at one place.

(file #20766)

Marko Lindqvist <cazfi>
Project Administrator
Sun 18 May 2014 12:18:00 PM UTC, original submission:

(Found while trying to verify fix for bug #21896.)

Xubuntu 12.04 amd64; start freeciv-gtk2; repeatedly "Connect to network game" then "Cancel" (using keyboard shortcuts for speed: hold down Alt then c[O]nnect, [C]ancel, [O], [C], ...).

Observe a variety of symptoms:


1. This verbose warning message from Gtk:


2. A crash like this in the metaserver thread (seen twice):

Main thread looks like this:


3. A crash like this in the main thread:

Another thread exists looking like this (not sure what this is):

(This one may be unrelated, but like (2) it has gtk_text_layout_get_line_display() in the backtrace.)

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #20766:  InitMetaScanStatus.patch added by cazfi (2kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 12 Jul 2014 02:21:35 PM UTCjtnStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 08 Jun 2014 10:14:49 PM UTCcazfiStatusReady For Test=>None
    Mon 19 May 2014 09:02:28 PM UTCjtnPlanned Release2.6.0=>2.5.0, 2.6.0
    Mon 19 May 2014 04:07:44 AM UTCcazfiStatusNone=>Ready For Test
    Mon 19 May 2014 04:04:23 AM UTCcazfiAttached File-=>Added InitMetaScanStatus.patch, #20766
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup