Re: ktextwidgets on FreeBSD

2018-08-07 Thread Tobias C. Berner
I can read speech-dispatcher, which had the hanging processes, if you want.

mfg Tobias

On Sun, 5 Aug 2018 at 01:41, Ben Cooksley  wrote:

> On Sat, Aug 4, 2018 at 11:06 PM, David Faure  wrote:
> > Anyone running FreeBSD, who could to try and debug this hanging unittest
> from the ktextwidgets framework?
> >
> >
> https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-qt5%20FreeBSDQt5.10/9/testReport/junit/(root)/TestSuite/ktextwidgets_krichtextedittest/
> >
> > There's no waiting of any kind in the code, it's straight QTextDocument
> usage, this shouldn't deadlock or anything.
> > Yet it times out (after 30 seconds!!) quite often in CI.
>
> This is a rather unusual failure, as the CI system is giving that test
> 5 minutes to timeout, after the test has finished.
>
> Usually this happens when tests start background daemons and don't
> kill those processes off before the test exits (which CTest doesn't
> like).
> However I don't think it's a background process sticking around in
> this case as those type of hangs are usually
> manual-intervention-required ones, which this isn't.
>
> Unfortunately it seems that the issue has gone away though so it's not
> possible to dig into this much further...
>
> https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-qt5%20FreeBSDQt5.10/22/
>
> >
> > Just a backtrace would be very useful already.
> >
> >
> > void KRichTextEditTest::testUpdateLinkAdd()
> > {
> > KRichTextEdit edit;
> > edit.enableRichTextMode();
> >
> > // Add text, apply initial formatting, and add a link
> > QTextCursor cursor = edit.textCursor();
> > cursor.insertText(QStringLiteral("Test"));
> > QTextCharFormat charFormat = cursor.charFormat();
> > // Note that QTextEdit doesn't use the palette. Black is black.
> > QCOMPARE(charFormat.foreground().color().name(),
> QColor(Qt::black).name());
> >
> > cursor.select(QTextCursor::BlockUnderCursor);
> > edit.setTextCursor(cursor);
> > edit.setTextBold(true);
> > edit.setTextItalic(true);
> > edit.updateLink(QStringLiteral("http://www.kde.org";),
> QStringLiteral("KDE"));
> >
> > // Validate text and formatting
> > cursor.movePosition(QTextCursor::Start);
> > cursor.select(QTextCursor::WordUnderCursor);
> > edit.setTextCursor(cursor);
> > QCOMPARE(edit.toPlainText(), QStringLiteral("KDE "));
> > QCOMPARE(edit.fontItalic(), true);
> > QCOMPARE(edit.fontWeight(), static_cast(QFont::Bold));
> > QCOMPARE(edit.fontUnderline(), true);
> > charFormat = cursor.charFormat();
> > QCOMPARE(charFormat.foreground(),
> QBrush(KColorScheme(QPalette::Active,
> KColorScheme::View).foreground(KColorScheme::LinkText).color()));
> > QCOMPARE(charFormat.underlineColor(), KColorScheme(QPalette::Active,
> KColorScheme::View).foreground(KColorScheme::LinkText).color());
> > QCOMPARE(charFormat.underlineStyle(),
> QTextCharFormat::SingleUnderline);
> > }
> >
> > --
> > David Faure, fa...@kde.org, http://www.davidfaure.fr
> > Working on KDE Frameworks 5
> >
> >
> >
>
> Cheers,
> Ben
>


Re: ktextwidgets on FreeBSD

2018-08-05 Thread David Faure
On dimanche 5 août 2018 01:41:01 CEST Ben Cooksley wrote:
> On Sat, Aug 4, 2018 at 11:06 PM, David Faure  wrote:
> > Anyone running FreeBSD, who could to try and debug this hanging unittest
> > from the ktextwidgets framework?
> > 
> > https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-> 
> > > qt5%20FreeBSDQt5.10/9/testReport/junit/(root)/TestSuite/ktextwidgets_krich
> > textedittest/
> > 
> > There's no waiting of any kind in the code, it's straight QTextDocument
> > usage, this shouldn't deadlock or anything. Yet it times out (after 30
> > seconds!!) quite often in CI.
> 
> This is a rather unusual failure, as the CI system is giving that test
> 5 minutes to timeout, after the test has finished.
> 
> Usually this happens when tests start background daemons and don't
> kill those processes off before the test exits (which CTest doesn't
> like).
> However I don't think it's a background process sticking around in
> this case as those type of hangs are usually
> manual-intervention-required ones, which this isn't.
> 
> Unfortunately it seems that the issue has gone away though so it's not
> possible to dig into this much further...
> https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-qt
> 5%20FreeBSDQt5.10/22/

It went away because the freebsd people made a fix and forgot to CC this list 
;-)

See attached email.

Thanks everyone! One more green (well, blue) in the CI...

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
--- Begin Message ---
I replaced the backend of qt5-speech with flite instead of
speech-dispatcher which seemed to hang every 20-30th time
let's see if that is enough.

mfg Tobias

On Sat, 4 Aug 2018 at 16:13, Adriaan de Groot  wrote:

> On Saturday, 4 August 2018 15:09:02 CEST Adriaan de Groot wrote:
> > On Saturday, 4 August 2018 13:06:42 CEST David Faure wrote:
> > > There's no waiting of any kind in the code, it's straight QTextDocument
> > > usage, this shouldn't deadlock or anything. Yet it times out (after 30
> > > seconds!!) quite often in CI.
> >
> > I just built master -- after changing the CMakeLists.txt to accept
> > Frameworks 5.46 which I have on my live desktop -- and ran the tests
> twice
> > with "make test".
>
> On the CI nodes themselves, this does lock up, like so: (but I have no
> idea
> what to do about it)
>
> (gdb) thread apply 1 bt
>
> Thread 1 (LWP 101006 of process 16170):
> #0  0x000803a2fc7c in ?? () from /lib/libthr.so.3
> #1  0x000803a2c325 in ?? () from /lib/libthr.so.3
> #2  0x000812e45306 in spd_close () from /usr/local/lib/libspeechd.so.2
> #3  0x000812c377f6 in
> QTextToSpeechEngineSpeechd::~QTextToSpeechEngineSpeechd
> (this=0x60626840)
> at
> /wrkdirs/usr/ports/accessibility/qt5-speech/work/qtspeech-everywhere-
> src-5.10.1/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp:78
> #4  0x000812c37889 in
> QTextToSpeechEngineSpeechd::~QTextToSpeechEngineSpeechd
> (this=0x60626840)
> at
> /wrkdirs/usr/ports/accessibility/qt5-speech/work/qtspeech-everywhere-
> src-5.10.1/src/plugins/tts/speechdispatcher/qtexttospeech_speechd.cpp:74
> #5  0x0008049094f1 in QTextToSpeechPrivate::~QTextToSpeechPrivate
> (this=0x60e12aa0) at /wrkdirs/usr/ports/accessibility/qt5-speech/work/
> qtspeech-everywhere-src-5.10.1/src/tts/qtexttospeech.cpp:88
> #6  0x000804909589 in QTextToSpeechPrivate::~QTextToSpeechPrivate
> (this=0x60e12aa0) at /wrkdirs/usr/ports/accessibility/qt5-speech/work/
> qtspeech-everywhere-src-5.10.1/src/tts/qtexttospeech.cpp:86
> #7  0x000802dfce6b in QScopedPointerDeleter::cleanup
> (pointer=0x60e12aa0) at ../../include/QtCore/../../src/corelib/tools/
> qscopedpointer.h:60
> #8  0x000802df9530 in QScopedPointer QScopedPointerDeleter >::~QScopedPointer
> (this=0x6021ed98) at
> ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107
> #9  0x000802dec748 in QObject::~QObject (this=0x6021ed90) at
> kernel/
> qobject.cpp:1033
> #10 0x00080490f405 in QTextToSpeech::~QTextToSpeech
> (this=0x6021ed90)
> at
> .moc/../../../../qtspeech-everywhere-src-5.10.1/src/tts/qtexttospeech.h:54
> #11 0x00080490f429 in QTextToSpeech::~QTextToSpeech
> (this=0x6021ed90)
> at
> .moc/../../../../qtspeech-everywhere-src-5.10.1/src/tts/qtexttospeech.h:54
> #12 0x0008003b2d33 in KTextEdit::Private::~Private
> (this=0x60d16350)
> at /usr/home/jenkins/workspace/Frameworks ktextwidgets kf5-qt5
> FreeBSDQt5.10/
> src/widgets/ktextedit.cpp:99
> #13 0x0008003a0d1a in KTextEdit::~KTextEdit (this=0x7fffce00) at
> /usr/
> home/jenkins/workspace/Frameworks ktextwidgets kf5-qt5 FreeBSDQt5.10/src/
> widgets/ktextedit.cpp:341
> #14 0x000800375fca in KRichTextEdit::~KRichTextEdit
> (this=0x7fffce00)
> at /usr/home/jenkins/workspace/Frameworks ktextwidgets kf5-qt5
> FreeBSDQt5.10/
> src/widgets/krichtextedit.cpp:133
> #15 0x002be6fe in KRichTextEditTest::testUpdateLinkAdd
> (

Re: ktextwidgets on FreeBSD

2018-08-04 Thread Ben Cooksley
On Sat, Aug 4, 2018 at 11:06 PM, David Faure  wrote:
> Anyone running FreeBSD, who could to try and debug this hanging unittest from 
> the ktextwidgets framework?
>
> https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-qt5%20FreeBSDQt5.10/9/testReport/junit/(root)/TestSuite/ktextwidgets_krichtextedittest/
>
> There's no waiting of any kind in the code, it's straight QTextDocument 
> usage, this shouldn't deadlock or anything.
> Yet it times out (after 30 seconds!!) quite often in CI.

This is a rather unusual failure, as the CI system is giving that test
5 minutes to timeout, after the test has finished.

Usually this happens when tests start background daemons and don't
kill those processes off before the test exits (which CTest doesn't
like).
However I don't think it's a background process sticking around in
this case as those type of hangs are usually
manual-intervention-required ones, which this isn't.

Unfortunately it seems that the issue has gone away though so it's not
possible to dig into this much further...
https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-qt5%20FreeBSDQt5.10/22/

>
> Just a backtrace would be very useful already.
>
>
> void KRichTextEditTest::testUpdateLinkAdd()
> {
> KRichTextEdit edit;
> edit.enableRichTextMode();
>
> // Add text, apply initial formatting, and add a link
> QTextCursor cursor = edit.textCursor();
> cursor.insertText(QStringLiteral("Test"));
> QTextCharFormat charFormat = cursor.charFormat();
> // Note that QTextEdit doesn't use the palette. Black is black.
> QCOMPARE(charFormat.foreground().color().name(), 
> QColor(Qt::black).name());
>
> cursor.select(QTextCursor::BlockUnderCursor);
> edit.setTextCursor(cursor);
> edit.setTextBold(true);
> edit.setTextItalic(true);
> edit.updateLink(QStringLiteral("http://www.kde.org";), 
> QStringLiteral("KDE"));
>
> // Validate text and formatting
> cursor.movePosition(QTextCursor::Start);
> cursor.select(QTextCursor::WordUnderCursor);
> edit.setTextCursor(cursor);
> QCOMPARE(edit.toPlainText(), QStringLiteral("KDE "));
> QCOMPARE(edit.fontItalic(), true);
> QCOMPARE(edit.fontWeight(), static_cast(QFont::Bold));
> QCOMPARE(edit.fontUnderline(), true);
> charFormat = cursor.charFormat();
> QCOMPARE(charFormat.foreground(), QBrush(KColorScheme(QPalette::Active, 
> KColorScheme::View).foreground(KColorScheme::LinkText).color()));
> QCOMPARE(charFormat.underlineColor(), KColorScheme(QPalette::Active, 
> KColorScheme::View).foreground(KColorScheme::LinkText).color());
> QCOMPARE(charFormat.underlineStyle(), QTextCharFormat::SingleUnderline);
> }
>
> --
> David Faure, fa...@kde.org, http://www.davidfaure.fr
> Working on KDE Frameworks 5
>
>
>

Cheers,
Ben


Re: ktextwidgets on FreeBSD

2018-08-04 Thread Adriaan de Groot
On Saturday, 4 August 2018 13:06:42 CEST David Faure wrote:
> Anyone running FreeBSD, who could to try and debug this hanging unittest
> from the ktextwidgets framework?
> 
> https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-qt
> 5%20FreeBSDQt5.10/9/testReport/junit/(root)/TestSuite/ktextwidgets_krichtext
> edittest/
> 
> There's no waiting of any kind in the code, it's straight QTextDocument
> usage, this shouldn't deadlock or anything. Yet it times out (after 30
> seconds!!) quite often in CI.

I just built master -- after changing the CMakeLists.txt to accept Frameworks 
5.46 which I have on my live desktop -- and ran the tests twice with "make 
test".

Start 1: ktextwidgets-kfindtest
1/5 Test #1: ktextwidgets-kfindtest    Passed0.45 sec
Start 2: ktextwidgets-kreplacetest
2/5 Test #2: ktextwidgets-kreplacetest .   Passed0.60 sec
Start 3: ktextwidgets-krichtextedittest
3/5 Test #3: ktextwidgets-krichtextedittest    Passed0.56 sec
Start 4: ktextwidgets-ktextedit_unittest
4/5 Test #4: ktextwidgets-ktextedit_unittest ...   Passed0.51 sec
Start 5: ktextwidgets-kpluralhandlingspinboxtest
5/5 Test #5: ktextwidgets-kpluralhandlingspinboxtest ...   Passed0.45 sec


Start 1: ktextwidgets-kfindtest
1/5 Test #1: ktextwidgets-kfindtest    Passed1.03 sec
Start 2: ktextwidgets-kreplacetest
2/5 Test #2: ktextwidgets-kreplacetest .   Passed7.48 sec
Start 3: ktextwidgets-krichtextedittest
3/5 Test #3: ktextwidgets-krichtextedittest    Passed0.84 sec
Start 4: ktextwidgets-ktextedit_unittest
4/5 Test #4: ktextwidgets-ktextedit_unittest ...   Passed1.82 sec
Start 5: ktextwidgets-kpluralhandlingspinboxtest
5/5 Test #5: ktextwidgets-kpluralhandlingspinboxtest ...   Passed1.00 sec


This was on a fairly loaded system (parallel building packages at the same 
time) but you can see the time taken for the test is quite large. A third run 
even used 20.75 wall-clock seconds.

During the kreplacetest, I can see a window popping up, and then going away, 
multiple times. It's weird. But the third test does seem to run successfully 
here -- I'll have to dig into how the CI runs the tests, exactly.

[ade]



signature.asc
Description: This is a digitally signed message part.


ktextwidgets on FreeBSD

2018-08-04 Thread David Faure
Anyone running FreeBSD, who could to try and debug this hanging unittest from 
the ktextwidgets framework?

https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-qt5%20FreeBSDQt5.10/9/testReport/junit/(root)/TestSuite/ktextwidgets_krichtextedittest/

There's no waiting of any kind in the code, it's straight QTextDocument usage, 
this shouldn't deadlock or anything.
Yet it times out (after 30 seconds!!) quite often in CI.

Just a backtrace would be very useful already.


void KRichTextEditTest::testUpdateLinkAdd()
{
KRichTextEdit edit;
edit.enableRichTextMode();

// Add text, apply initial formatting, and add a link
QTextCursor cursor = edit.textCursor();
cursor.insertText(QStringLiteral("Test"));
QTextCharFormat charFormat = cursor.charFormat();
// Note that QTextEdit doesn't use the palette. Black is black.
QCOMPARE(charFormat.foreground().color().name(), QColor(Qt::black).name());

cursor.select(QTextCursor::BlockUnderCursor);
edit.setTextCursor(cursor);
edit.setTextBold(true);
edit.setTextItalic(true);
edit.updateLink(QStringLiteral("http://www.kde.org";), 
QStringLiteral("KDE"));

// Validate text and formatting
cursor.movePosition(QTextCursor::Start);
cursor.select(QTextCursor::WordUnderCursor);

  
edit.setTextCursor(cursor);
QCOMPARE(edit.toPlainText(), QStringLiteral("KDE "));
QCOMPARE(edit.fontItalic(), true);
QCOMPARE(edit.fontWeight(), static_cast(QFont::Bold));
QCOMPARE(edit.fontUnderline(), true);
charFormat = cursor.charFormat();
QCOMPARE(charFormat.foreground(), QBrush(KColorScheme(QPalette::Active, 
KColorScheme::View).foreground(KColorScheme::LinkText).color()));
QCOMPARE(charFormat.underlineColor(), KColorScheme(QPalette::Active, 
KColorScheme::View).foreground(KColorScheme::LinkText).color());
QCOMPARE(charFormat.underlineStyle(), QTextCharFormat::SingleUnderline);
}

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5