[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#803669: Breaks QProcess in owncloud-client tests on mips an mipsel



Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> writes:

> Hi Gaudenz!
>
> On Sunday 01 November 2015 17:32:12 Gaudenz Steinlin wrote:
> [snip]
>> Setting the severity of this bug to serious because it causes another
>> package to fail to build from source.
>> 
>> This version of Qt breaks the tests of owncloud-sync on mips and mipsel.
>> Test also break when compiling version 2.0.0+dfsg-1 of owncloud-client
>> which previously successfully built against the newer version of Qt. So I
>> suspect this is a bug in Qt and not in owncloud-client.
>> 
>> See here for the failing build logs:
>> https://buildd.debian.org/status/fetch.php?pkg=owncloud-client&arch=mipsel&v
>> er=2.0.2%2Bdfsg-1&stamp=1445685652
>> 
>> I tried to debug this on the mipsel porter box but could not resovlve
>> the problem. This is what I found out:
>> 
>> - The problem is also present when running the tests with Qt
>>   5.5.0+dfsg-3 so setting this version. This is the first version of Qt
>>   5.5 available for mipsel. This is likely a bug introduced with Qt 5.5.
>> 
>> - This is the problematic part of the code in owncloud-client which
>>   triggers the bug (see test/testfilesystem.h in owncloud-client):
>>  
>> https://anonscm.debian.org/cgit/pkg-owncloud/owncloud-client.git/tree/test/
>> testfilesystem.h
>> 
>>  26     QByteArray shellSum( const QByteArray& cmd, const QString& file )
>>  27     {
>>  28        QProcess md5;
>>  29        QStringList args;
>>  30        args.append(file);
>>  31        md5.start(cmd, args);
>>  32        QByteArray sumShell;
>>  33        qDebug() << "File: "<< file;
>>  34
>>  35        if( md5.waitForFinished()  ) {
>>  36
>>  37          sumShell = md5.readAll();
>>  38          sumShell = sumShell.left( sumShell.indexOf(' '));
>>  39        }
>>  40        return sumShell;
>>  41     }
>> 
>>   This is called twice during the test to compute a md5/sha1 sum with the
>> command line tool to compare this against owncloud-clients internal
>> implementation. The test then fails because this function returns an empty
>> string instead of the correct result.
>> 
>> - Running the test under strace shows that the md5sum/sha1sum call succeeds
>> and returns the correct string. But apparently waitForFinished just hangs
>> for 30s (default timeout value) and then returns an error.
>
> An important detail here would be to know if the md5sum value gets returned 
> during the 30 seconds that waitForFinished and +/- how many seconds 
> before/after.

If I read the strace output right (attached) md5sum only tahkes less
than 1 second. The long 2x30s delay comes from subsequent pselect calls
which may be unrelated to waitForFinished, but related to the fact the
QProcess tries to kill the no longer running md5sum process.  

>  
>> At this point I'm out of ideas on how to further debug this. Help by Qt
>> maintainers or mips porters would be appreciated.
>
> If you can please test with md5.waitForFinished(60000) on line 35. It's not 
> strange to have great delays on mips and mipsel.

I tried that but it did not help.

I also tried removing the if clause and just calling
md5.waitForFinished(). This makes the test pass as it reads the md5sum
output even if waitForFinished() fails. But it still causes a long delay
(~ 60s).

While running the test I see a zombie md5sum process with ps. So it
seems that the program does not properly "wait" for the process. This is
a bit weird because there is a waitid call in the strace output for the
process which also properly returns.

Gaudenz

Attachment: occ_test_trace
Description: Binary data


Reply to: