[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-02-04 Thread Martin Pitt
** Changed in: qt4-x11 (Ubuntu Natty)
Milestone: natty-alpha-2 = natty-alpha-3

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
kubuntu-bugs mailing list
kubuntu-b...@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-02-03 Thread Jani Monoses
The unity-2d-launcher crash can be reproduced with a locally built Qt, however 
the app I pasted in comment #9 works.
I built Qt with regular system libs and not in a chroot so maybe there's a 
slight difference.

As seen for the sample app, if I built Qt with either g++ or gcc
4.4(there are both C++ and C files in the source) the crash is similar,
so I don't think this is a compiler regression.

The bug occurs when accessing a volatile int member of a struct via an
int() operator defined on that class and which simply returns the value.

QBasicAtomicInt class in this file
http://qt.gitorious.org/qt/qt/blobs/4.7/src/corelib/thread/qbasicatomic.h

The two crashes I have seen both access that field from within the macro 
Q_DECLARE_METATYPE at line 265 in
http://qt.gitorious.org/qt/qt/blobs/4.7/src/corelib/kernel/qmetatype.h

That macro is used to define GestureState metatype, the one seen in the
stacktraces above.

I'll try to check whether https://bugs.launchpad.net/gcc-
linaro/+bug/675347 is related.

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
kubuntu-bugs mailing list
kubuntu-b...@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-02-01 Thread Jani Monoses
When disassembling the 10.10 Qt library which has ittt no warning is
given, so that was probably a false trail, sorry.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-02-01 Thread Michael Casadevall
Yeah, I'm agreeing with Jani, that was a false trail. here's the new
backtrace with ittt in the patch and unity-2d rebuilt against it:


(gdb) bt
#0  0x404fce2c in operator int (this=0xdf6ce0, 
parent=value optimized out)
at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:85
#1  qt_metatype_id (this=0xdf6ce0, parent=value optimized out)
at ../../include/QtGui/private/../../../src/gui/kernel/qgesture.h:56
#2  qt_metatype_id (this=0xdf6ce0, parent=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:169
#3  qMetaTypeIdQt::GestureState (this=0xdf6ce0, 
parent=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:230
#4  qRegisterMetaTypeQt::GestureState (this=0xdf6ce0, 
parent=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:243
#5  QGestureManager::QGestureManager (this=0xdf6ce0, 
parent=value optimized out) at kernel/qgesturemanager.cpp:76
#6  0x404c108a in QGestureManager::instance ()
at kernel/qapplication.cpp:5849
#7  0x404f0f0e in QWidget::grabGesture (this=value optimized out, 
gesture=Qt::PanGesture, flags=...) at kernel/qwidget.cpp:12079
#8  0x4079aba8 in QAbstractScrollAreaPrivate::init (this=0xddfd20)
at widgets/qabstractscrollarea.cpp:299
#9  0x4079ac58 in QAbstractScrollArea::QAbstractScrollArea (
this=0xbeac75ac, dd=value optimized out, 
parent=value optimized out) at widgets/qabstractscrollarea.cpp:493
#10 0x40893aac in QGraphicsView::QGraphicsView (this=0xbeac75ac, 
dd=value optimized out, parent=value optimized out)
at graphicsview/qgraphicsview.cpp:1146
#11 0x40a96e4e in QDeclarativeView::QDeclarativeView (this=0xbeac75ac, 
parent=0x0) at util/qdeclarativeview.cpp:254
#12 0xcc76 in LauncherView::LauncherView() ()
#13 0xc2dc in main ()

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
kubuntu-bugs mailing list
kubuntu-b...@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-31 Thread Michael Casadevall
So after active debugging on #linaro, I tore apart some maverick
binaries built against stock-maverick qt4-x11, which has implicate-its
enabled, and found the compiler generated an 'i' instruciton vs
'ittt'.

I'm currently testbuilding a new version of Qt with this modification.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-31 Thread Michael Casadevall
Test code on maverick (no explicate it block):

mcasadevall@risingsun:/srv/chroots/maverick-armel$ cat test.c
#include stdio.h

int _q_value = 10;

inline bool testAndSetOrdered(int expectedValue, int newValue)
{
register int result;
asm volatile(0:\n
 ldrex %[result], [%[_q_value]]\n
 eors %[result], %[result], %[expectedValue]\n
 strexeq %[result], %[newValue], [%[_q_value]]\n
 teqeq %[result], #1\n
 beq 0b\n
 : [result] =r (result),
   +m (_q_value)
 : [expectedValue] r (expectedValue),
   [newValue] r (newValue),
   [_q_value] r (_q_value)
 : cc, memory);
return result == 0;
}

int main() {
return testAndSetOrdered(1, 1);
}

Relevant disassembly from objdump:


8378 _Z17testAndSetOrderedii:
8378:   b490push{r4, r7}
837a:   b082sub sp, #8
837c:   af00add r7, sp, #0
837e:   6078str r0, [r7, #4]
8380:   6039str r1, [r7, #0]
8382:   f241 0124   movwr1, #4132   ; 0x1024
8386:   f2c0 0101   movtr1, #1
838a:   6878ldr r0, [r7, #4]
838c:   f8d7 c000   ldr.w   ip, [r7]
8390:   f241 0324   movwr3, #4132   ; 0x1024
8394:   f2c0 0301   movtr3, #1
8398:   f241 0224   movwr2, #4132   ; 0x1024
839c:   f2c0 0201   movtr2, #1
83a0:   e853 4f00   ldrex   r4, [r3]
83a4:   4044eorsr4, r0
83a6:   bf02ittteq
83a8:   e843 c400   strexeq r4, ip, [r3]
83ac:   f094 0f01   teqeq   r4, #1
83b0:   e7f6beq.n   83a0 _Z17testAndSetOrderedii+0x28
83b2:   2c00cmp r4, #0
83b4:   bf14ite ne
83b6:   2300movne   r3, #0
83b8:   2301moveq   r3, #1
83ba:   b2dbuxtbr3, r3
83bc:   4618mov r0, r3
83be:   f107 0708   add.w   r7, r7, #8
83c2:   46bdmov sp, r7
83c4:   bc90pop {r4, r7}
83c6:   4770bx  lr

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
kubuntu-bugs mailing list
kubuntu-b...@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-31 Thread Jani Monoses
An alternatve to rebuilding Qt with the patch applied is to binary patch
the Qt libs and test:

I copied libQtCore.so and libQtGui.so (the two Qt deps of the simple Qt app 
which crashes) in the current dir
Then
sed -i 's/\x04\(\xbf.\xe8\x00.\)/\x02\1/' libQtCore.so.4 
same on QtGui

export LD_LIBRARY_PATH=.
ldd ./crasherapp (just to confirm it ineed gets the libs from the current dir)

This sed invocation changes itt to ittt in the places where a strexeq
follows

The app crashes in the same way so unlikely imho that the patch is the
issue, or that indeed the patch is incorrect.

With ittt objdump -d annotates that disas line with 
beq.n   1242c8 _ZN12QApplication11qt_metacastEPKc+0x5c; unpredictable 
IT:eq

because it is unclear whether the ittt of the previous teq should affect
the conditional bits in the beqeq instruction

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
kubuntu-bugs mailing list
kubuntu-b...@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-31 Thread Dr. David Alan Gilbert
Hi Jani,
  Assuming for the moment that sed didn't trip over any other matching chunk of 
binary, ok, but

  It's not clear to me why the assembler is warning on that branch; can you 
disassemble the 4 or 5 instructions leading up to that?
My reading of binutils is that it prints that message for a branch that is not 
the last element of an IT block, and in the original code quoted the branch 
should be the last one.

I don't see anything that marks unpredictability due to the shadow of a
teq; and I don't see anything in the ARM ARM that says it's
unpredictable.

Dave

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-28 Thread Jani Monoses
Definitely not a unity-2d bug :)

This simple app build on pandaboard and current natty crashes in the same way 
as the launcher (in QReadUnlock())
Crashes 4 runs out of 5 maybe, built with either g++-4.4 or g++4.5

//to build: c++  -I/usr/include/qt4   -I/usr/include/qt4/QtGui
crashercpp -lQtGui -o crasher

#include qapplication.h

int main(int argc, char *argv[]) {
QApplication a(argc, argv);
return 0;
}

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-28 Thread Michael Casadevall
Did another round of tests, with maverick build 4.7.0 with the natty IT
patch added (posted above) and I got a segfault similar to the one we
got earlier, which leads me to believe we have a bad patch.

 Backtrace is identical to current faults. Looks like this is a bad
patch to Qt vs. a gcc regression; closing gcc task.

** Changed in: gcc-4.5 (Ubuntu Natty)
   Status: New = Invalid

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
kubuntu-bugs mailing list
kubuntu-b...@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-27 Thread Michael Casadevall
** Also affects: gcc-4.5 (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-27 Thread Michael Casadevall
Opening new task on gcc-4.5 due to possibility of compiler regression.

Attempting to build natty's Qt on maverick caused a compiler ICE, but
since I was building in sbuild, I lost the build environment when it
failed. Will try and rerun build at some point so I can file that bug. I
was pointed at unit tests for Qt, so I'm going to run the suite and see
if we can isolate the specific problem areas.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-26 Thread Michael Casadevall
On a hunch that we're looking at a possible compiler regression, I
recompiled the maverick Qt 4.7.0 source package against natty (and added
the thumb2 patch attached below from the 4.7.1 package) and installed it
on a working natty system which still developed a segfault.

Backtrace with 4.7.0 built on natty.

Program received signal SIGSEGV, Segmentation fault.
0x404695ba in operator int (this=0xe0ab10, parent=value optimized out)
at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:85
85  return _q_value;
(gdb) bt
#0  0x404695ba in operator int (this=0xe0ab10, 
parent=value optimized out)
at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:85
#1  qt_metatype_id (this=0xe0ab10, parent=value optimized out)
at ../../include/QtGui/private/../../../src/gui/kernel/qgesture.h:56
#2  qt_metatype_id (this=0xe0ab10, parent=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:222
#3  qMetaTypeIdQt::GestureState (this=0xe0ab10, 
parent=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:232
#4  qRegisterMetaTypeQt::GestureState (this=0xe0ab10, 
parent=value optimized out)
at ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:245
#5  QGestureManager::QGestureManager (this=0xe0ab10, 
parent=value optimized out) at kernel/qgesturemanager.cpp:76
#6  0x4042e0d2 in QGestureManager::instance ()
at kernel/qapplication.cpp:5798
#7  0x4045dece in QWidget::grabGesture (this=value optimized out, 
gesture=Qt::PanGesture, flags=...) at kernel/qwidget.cpp:12066
#8  0x40705d18 in QAbstractScrollAreaPrivate::init (this=0xe1f4c0)
at widgets/qabstractscrollarea.cpp:299
#9  0x40705dc8 in QAbstractScrollArea::QAbstractScrollArea (
this=0xbe8d65b0, dd=value optimized out, 
parent=value optimized out) at widgets/qabstractscrollarea.cpp:493
#10 0x407ff78c in QGraphicsView::QGraphicsView (this=0xbe8d65b0, 
dd=value optimized out, parent=value optimized out)
at graphicsview/qgraphicsview.cpp:1146
#11 0x40a07a8e in QDeclarativeView::QDeclarativeView (this=0xbe8d65b0, 
parent=0x0) at util/qdeclarativeview.cpp:254
#12 0xc796 in LauncherView::LauncherView() ()
#13 0xc050 in main ()


mcasadevall@risingsun:~$ cat 
src/qt4-x11-4.7.0/debian/patches/kubuntu_22_thumb2_support.diff 
Provide Thumb2 support on armel - See LP Bug #673085 for details
Index: qt-everywhere-opensource-src-4.7.1/src/corelib/arch/qatomic_armv6.h
===
--- 
qt-everywhere-opensource-src-4.7.1.orig/src/corelib/arch/qatomic_armv6.h2010-11-06
 01:55:18.0 +
+++ qt-everywhere-opensource-src-4.7.1/src/corelib/arch/qatomic_armv6.h 
2010-11-16 17:58:27.831286420 +
@@ -144,6 +144,7 @@
 asm volatile(0:\n
  ldrex %[result], [%[_q_value]]\n
  eors %[result], %[result], %[expectedValue]\n
+ itt eq\n
  strexeq %[result], %[newValue], [%[_q_value]]\n
  teqeq %[result], #1\n
  beq 0b\n
@@ -202,6 +203,7 @@
 asm volatile(0:\n
  ldrex %[result], [%[_q_value]]\n
  eors %[result], %[result], %[expectedValue]\n
+ itt eq\n
  strexeq %[result], %[newValue], [%[_q_value]]\n
  teqeq %[result], #1\n
  beq 0b\n

Will attempt building natty's Qt on maverick to confirm compiler
regression.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 705689] Re: unity-2d-launcher crashes with segfault error on armel (natty only)

2011-01-25 Thread Oliver Grawert
** Also affects: qt4-x11 (Ubuntu Natty)
   Importance: High
 Assignee: Michael Casadevall (mcasadevall)
   Status: Confirmed

** Changed in: unity-2d
   Status: New = Invalid

** Changed in: qt4-x11 (Ubuntu Natty)
Milestone: None = natty-alpha-2

** Changed in: unity-2d
   Importance: Critical = High

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qt4-x11 in ubuntu.
https://bugs.launchpad.net/bugs/705689

Title:
  unity-2d-launcher crashes with segfault error on armel (natty only)

-- 
kubuntu-bugs mailing list
kubuntu-b...@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs