Author Topic: Qt6 Application Testing  (Read 262226 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #360 on: May 21, 2023, 07:30:51 am »
Thanks for testing Dave!

re: silent exits - I updated my libcn0 build at https://smedley.id.au/tmp/libcn0-silentexit-20230521.zip

By default, it will work exactly like a production built libcn0 and no product TRP files.

However, if the EXCEPTQ environment variable is set in a session, then it that session only, a TRP file will be produced whenever the _exit() function is called. These might help give clues as to where the 'silent' exit stems from.

Hangs are more problematic to debug....

David McKenna

  • Hero Member
  • *****
  • Posts: 807
  • Karma: +25/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #361 on: May 21, 2023, 02:28:49 pm »
 Thanks Paul... attached is the first exit from Youtube after loading this libcn0.dll - it was found in C:\qt6\bin.

 Re: hangs - back in the March time frame, you created a QT 6.2 build that I never got any hangs from after you updated libvpx to not use AVX. The next build you started using dav1d6.dll and the hangs came back (although that made AV1 videos work properly). Is AVX disabled in dav1d6.dll - or is that just a coincidence?

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #362 on: May 21, 2023, 10:53:07 pm »
Hi David,
I'll take a look at the trip this evening.

Interesting, my recollection of the no-avx build was that it didn't make much difference to stability.

Komh build the dav1d dll so I'll have to check with him how he built it.

Are you able to confirm if the YouTube hangs occur with vp9 or av1 videos (or both)?

David McKenna

  • Hero Member
  • *****
  • Posts: 807
  • Karma: +25/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #363 on: May 22, 2023, 12:58:22 am »
Paul,

  The no-avx build was the most stable one yet for me at the time, except AV1 videos still would hang (but not the whole system) and I could hit the 'back' button and keep browsing. I'll pay closer attention to the video format in future, but I'm almost positive they are AV1 (because most use that these days if they are new). It doesn't always happen when playing videos though...sometimes when browsing YouTube. But that may be because if you hover over a video, it shows scenes from it.

  My processor supports both AVX and AVX2 (and SSE up to 4.2). Don't know if that matters, but could be the difference from other people who don't see the system hangs?

Regards,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4996
  • Karma: +111/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #364 on: May 22, 2023, 01:10:57 am »
What programs are supposed to do is query the CPU and the operating system for AVX+ support. I quickly looked at libdav1d and couldn't see where it tested for OS AVX support. It is also quite possible that libdav1d etc use assembly for AVX so harder to disable.
As most all current operating systems now support AVX, I wonder if some programs just don't bother to test for support anymore. I think that is what has happened with SSE+ as well so Warp V4 and earlier may have problems with SSE code. The problem is simply not saving the new/extended registers during a context switch.
I guess one fix would be to find where programs/libraries query the CPU support and patch it so it always reports no AVX support in the CPU.
Be nice to update exceptq's dissembler to support AVX code too.

David McKenna

  • Hero Member
  • *****
  • Posts: 807
  • Karma: +25/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #365 on: May 22, 2023, 01:53:16 am »
 Hey Dave,

  What I'm thinking is that if the CPU reports it supports a thing (like AVX), but the OS kernel does not, then a hang is in store.

  I wonder if there is any way to either support AVX (through ACPI maybe?) or prevent detection of the CPU supporting it?

Regards,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4996
  • Karma: +111/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #366 on: May 22, 2023, 03:29:02 am »
I just looked, from qt6\qt6-webengine-os2\src\3rdparty\dav1d\libdav1d\src\x86\cpu.c
Code: [Select]
#if ARCH_X86_64
        /* We only support >128-bit SIMD on x86-64. */
...
So AVX should never be used on any 32 bit platform by libdav1d. Greping for AVX in 3rdparty gives 1324 hits, some like openh264 which only says not supported yet, others like opus which looks like it needs to undefine OPUS_X86_MAY_HAVE_AVX for an example. I'd assume that Opus checks better if it needs to.
Hopefully everyone does it right.
Qt5 is simpler, global flag for no_avx, which hopefully is honoured everywhere.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #367 on: May 22, 2023, 04:11:12 am »
  My processor supports both AVX and AVX2 (and SSE up to 4.2). Don't know if that matters, but could be the difference from other people who don't see the system hangs?

This could definitely the results, most of my testing is under Virtualbox.

Cheers,

Paul.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #368 on: May 22, 2023, 04:13:09 am »
Hi Dave,

I just looked, from qt6\qt6-webengine-os2\src\3rdparty\dav1d\libdav1d\src\x86\cpu.c
Code: [Select]
#if ARCH_X86_64
        /* We only support >128-bit SIMD on x86-64. */
...
So AVX should never be used on any 32 bit platform by libdav1d. Greping for AVX in 3rdparty gives 1324 hits, some like openh264 which only says not supported yet, others like opus which looks like it needs to undefine OPUS_X86_MAY_HAVE_AVX for an example. I'd assume that Opus checks better if it needs to.
Hopefully everyone does it right.
Qt5 is simpler, global flag for no_avx, which hopefully is honoured everywhere.

Qt6 has the no_avx flag as well - but this doesn't seem to be respected by Chromium.

Opus we're using the system version - same with libvpx and dav1d. I've pinged komh to get a copy of the source he used to generate dav1d.dll - perhaps I can recompile it with different flags and see if it helps.

Cheers,

Paul.

roberto

  • Hero Member
  • *****
  • Posts: 824
  • Karma: +3/-6
    • View Profile
Re: Qt6 Application Testing
« Reply #369 on: May 22, 2023, 09:43:20 am »
Can you test with simplebrowser to open www.ebay.es ?
saludos

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #370 on: May 22, 2023, 10:26:15 am »
I get a SIGTRAP here with http://www.ebay.es/

I tried it twice and got two different TRP files...
« Last Edit: May 22, 2023, 10:50:46 am by Paul Smedley »

roberto

  • Hero Member
  • *****
  • Posts: 824
  • Karma: +3/-6
    • View Profile
Re: Qt6 Application Testing
« Reply #371 on: May 22, 2023, 04:29:44 pm »
I see the same error in ebay, but with the old libcn0 and other old version. And fail in single processor unmark, and no fail in single processor mark with Dooble.
[138:13:0522/162052.504000:FATAL:scoped_file.cc(43)] Check failed: . : Bad file
number (9)

saludos

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #372 on: May 25, 2023, 07:45:00 am »
I see the same error in ebay, but with the old libcn0 and other old version. And fail in single processor unmark, and no fail in single processor mark with Dooble.
[138:13:0522/162052.504000:FATAL:scoped_file.cc(43)] Check failed: . : Bad file
number (9)

I created https://github.com/psmedley/qt6-webengine-os2/issues/15 for this.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2249
  • Karma: +171/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #373 on: May 25, 2023, 10:36:54 am »
https://smedley.id.au/tmp/qt6webee-6.3.2-20230525.zip contains a hack/workaround for the ebay.es issue

Lars

  • Hero Member
  • *****
  • Posts: 1353
  • Karma: +69/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #374 on: May 26, 2023, 07:22:49 am »
Why did you comment out the check? I think you should add OS2 to the IFDEF clause preceding the check (I would assume that our close resembles the UNIX/LINUX close).