bugFreeciv - Bugs: bug #25364, Qt-client segfaults at exit

 
 
Show feedback again

bug #25364: Qt-client segfaults at exit

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Mon Dec 5 13:47:12 2016  
 
Category: client-qtSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: Operating System: None
Planned Release: Contains string changes: None

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)

Sun Jan 1 22:45:35 2017, comment #12:

"--enable-__cxa_atexit" is required for the G++ compiler to produce static destructors that fully comply with the C++ specification.

So p1.patch might work.
But its probably some debian bug, all static c++ classes will segfault.

mir3x <mir3x>
Project Member
Sun Jan 1 22:37:21 2017, comment #11:

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.2.1-5' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.2.1 20161124 (Debian 6.2.1-5)

Marko Lindqvist <cazfi>
Project Administrator
Sun Jan 1 22:32:11 2017, comment #10:

ML can u check with gcc -v if your gcc has --enable-__cxa_atexit ?
If no then it must be that issue.

mir3x <mir3x>
Project Member
Tue Dec 27 12:52:43 2016, comment #9:

I prepared 3 patchs, try if any of them works.
It just crashes at destructor of static QString, no idea why, but I saw similar reports when qt was built for wrong arch.

(file #29595, file #29596, file #29597)

mir3x <mir3x>
Project Member
Mon Dec 26 22:57:36 2016, comment #8:

In TRUNK it first happens with revision 33981.

Marko Lindqvist <cazfi>
Project Administrator
Mon Dec 26 18:48:50 2016, comment #7:

I tested this on all branches, and in that test S2_5 never segfaulted. S2_6 and TRUNK segfaulted always.

Marko Lindqvist <cazfi>
Project Administrator
Mon Dec 19 08:27:54 2016, comment #6:

I just upggraded to qt 5.7 and cannot confirm that.

Qt 5.7.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 6.2.0) on "xcb"
Features: QT_NO_EXCEPTIONS QT_NO_ZLIB

mir3x <mir3x>
Project Member
Fri Dec 16 13:15:15 2016, comment #5:

Yes.

Version: 5.7.1~20161021+dfsg-6

(I'm using Debian Testing - so both reports are from the same platform.)

Marko Lindqvist <cazfi>
Project Administrator
Fri Dec 16 13:10:22 2016, comment #4:

ML, do u use qt5.7 also ?

mir3x <mir3x>
Project Member
Fri Dec 16 12:54:52 2016, comment #3:

#11 0x00007f3873786450 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/styles/qtcurve.so

Qt-curve theme is broken and unmaintained since 2 or more years.
Freeciv-ruledit wont even start if qt-curve is used.

mir3x <mir3x>
Project Member
Fri Dec 16 10:58:37 2016, comment #2:

atexit crash reported also in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848165

Marko Lindqvist <cazfi>
Project Administrator
Mon Dec 5 14:51:22 2016, comment #1:

I've never seen that, is there any special config ?

mir3x <mir3x>
Project Member
Mon Dec 5 13:47:12 2016, original submission:

To reproduce just start and quit the client.

Thread 1 "freeciv-qt" received signal SIGSEGV, Segmentation fault.
0x0000555555606f33 in std::__atomic_base<int>::load (__m=std::memory_order_relaxed,
this=0x7fffd9899000) at /usr/include/c++/6/bits/atomic_base.h:396
396 return __atomic_load_n(&_M_i, __m);
(gdb) bt
#0 0x0000555555606f33 in std::__atomic_base<int>::load (__m=std::memory_order_relaxed,
this=0x7fffd9899000) at /usr/include/c++/6/bits/atomic_base.h:396
#1 QAtomicOps<int>::load<int> (_q_value=...)
at /usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:227
#2 QBasicAtomicInteger<int>::load (this=0x7fffd9899000)
at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:99
#3 QtPrivate::RefCount::deref (this=0x7fffd9899000)
at /usr/include/x86_64-linux-gnu/qt5/QtCore/qrefcount.h:66
#4 QString::~QString (this=0x555555b8ab78 <def_app_style>, __in_chrg=<optimized out>)
at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1078
#5 0x00007ffff2684920 in __run_exit_handlers (status=status@entry=0,
listp=0x7ffff29e75d8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true,
run_dtors=run_dtors@entry=true) at exit.c:83
#6 0x00007ffff268497a in __GI_exit (status=status@entry=0) at exit.c:105
#7 0x0000555555671155 in client_exit () at ../../../src/client/client_main.c:740
#8 0x0000555555671549 in client_main (argc=1, argv=0x7fffffffe0d8)
at ../../../src/client/client_main.c:682
#9 0x00007ffff266f2b1 in __libc_start_main (main=0x555555603780 <main(int, char**)>,
argc=1, argv=0x7fffffffe0d8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe0c8) at ../csu/libc-start.c:291
#10 0x0000555555604eca in _start ()

Marko Lindqvist <cazfi>
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 #29595:  p1.patch added by mir3x (421B - text/x-patch)
file #29596:  p2.patch added by mir3x (1kB - text/x-patch)
file #29597:  p3.patch added by mir3x (658B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mir3x (Posted a comment)
  • -unavailable- added by cazfi (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.

     

    Error: not logged in

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Dec 27 12:52:43 2016mir3xAttached File-=>Added p1.patch, #29595
      Attached File-=>Added p2.patch, #29596
      Attached File-=>Added p3.patch, #29597
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup