Re: [Interest] ASAN (Qt 6.4 + Glib) build shows stackoverflow in trivial Qt program
On Sunday, 13 November 2022 09:51:54 PST Henry Skoglund wrote: > not only are those libcxb files cluttering up my RAM they're also > creating litter on my SSD :-( You chose that when you chose to use Snap or AppImage or Flatpak applications. -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] ASAN (Qt 6.4 + Glib) build shows stackoverflow in trivial Qt program
On 2022-11-13 18:29, Thiago Macieira wrote: On Sunday, 13 November 2022 09:03:40 PST Henry Skoglund wrote: I can confirm "several tiny libraries" i.e. I had the same problem when building Qt on Ubuntu 22.04. After fiddling for a while, I took the easy way out: sudo apt-get install libxcb* That installed 68 libs (all beginning with libxcb-) probably overkill but at least it solved the problem :-) Those XCB libraries are generated from the X specification, that's why there are so many of them. But this split up is counter-productive now. As you've seen, it causes headache in forgetting just one of them. And as we add content to Qt, what built one version may not build the next, so you have to review after the upgrade. The next problem is memory fragmentation. At a bare minimum, each library on Linux must be one read-only page containing code and one read-write page containing the GOT. Most Linux distros actually split a bit more for security, with a read-only non-executable page before the executable one, then one more after for read-only constant data and yet another for post-relocation read- only, like so: Address Kbytes RSS PSS DirtySwap Mode Mapping 7fed1e9e6000 4 4 0 0 0 r--p- libxcb-shm.so. 0.0.0 7fed1e9e7000 4 4 0 0 0 r-xp-libxcb-shm.so. 0.0.0 7fed1e9e8000 4 4 0 0 0 r--p- libxcb-shm.so. 0.0.0 7fed1e9e9000 4 4 4 4 0 r--p- libxcb-shm.so. 0.0.0 7fed1e9ea000 4 4 4 4 0 rw-p-libxcb-shm.so. 0.0.0 And the last two pages are not sharable between processes, so each one of those costs 5 VMA entries in the page tables, 8 kB of non-sharable data, and a bit of load-time work processing relocations. All this for this tiny XCB library: -rwxr-xr-x 1 root root 14416 Aug 31 05:33 /lib64/libxcb-shm.so.0.0.0 For Clear Linux, we've "tricked" the build to just merge all those libraries and libX11.so into a single .so, so they are loaded once only and occupy Much less memory. Yeah maybe Ubuntu is not the cream of the crop anymore: find / -name libxcb-shm.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0 /snap/snap-store/582/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0 /snap/snap-store/599/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0 /snap/gnome-3-38-2004/119/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0 /snap/gnome-3-38-2004/115/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0 not only are those libcxb files cluttering up my RAM they're also creating litter on my SSD :-( ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] ASAN (Qt 6.4 + Glib) build shows stackoverflow in trivial Qt program
On Sunday, 13 November 2022 09:03:40 PST Henry Skoglund wrote: > I can confirm "several tiny libraries" i.e. I had the same problem when > building Qt on Ubuntu 22.04. > After fiddling for a while, I took the easy way out: > sudo apt-get install libxcb* > > That installed 68 libs (all beginning with libxcb-) probably overkill > but at least it solved the problem :-) Those XCB libraries are generated from the X specification, that's why there are so many of them. But this split up is counter-productive now. As you've seen, it causes headache in forgetting just one of them. And as we add content to Qt, what built one version may not build the next, so you have to review after the upgrade. The next problem is memory fragmentation. At a bare minimum, each library on Linux must be one read-only page containing code and one read-write page containing the GOT. Most Linux distros actually split a bit more for security, with a read-only non-executable page before the executable one, then one more after for read-only constant data and yet another for post-relocation read- only, like so: Address Kbytes RSS PSS DirtySwap Mode Mapping 7fed1e9e6000 4 4 0 0 0 r--p- libxcb-shm.so. 0.0.0 7fed1e9e7000 4 4 0 0 0 r-xp-libxcb-shm.so. 0.0.0 7fed1e9e8000 4 4 0 0 0 r--p- libxcb-shm.so. 0.0.0 7fed1e9e9000 4 4 4 4 0 r--p- libxcb-shm.so. 0.0.0 7fed1e9ea000 4 4 4 4 0 rw-p-libxcb-shm.so. 0.0.0 And the last two pages are not sharable between processes, so each one of those costs 5 VMA entries in the page tables, 8 kB of non-sharable data, and a bit of load-time work processing relocations. All this for this tiny XCB library: -rwxr-xr-x 1 root root 14416 Aug 31 05:33 /lib64/libxcb-shm.so.0.0.0 For Clear Linux, we've "tricked" the build to just merge all those libraries and libX11.so into a single .so, so they are loaded once only and occupy Much less memory. -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] ASAN (Qt 6.4 + Glib) build shows stackoverflow in trivial Qt program
On 2022-11-13 17:52, Thiago Macieira wrote: On Saturday, 12 November 2022 23:11:45 PST Dennis Luehring wrote: forcing -xcb gives me these configure output (https://pastebin.com/ML8QCJRQ) XCB: Using system-provided xcb-xinput . no GL integrations: GLX Plugin . yes XCB GLX .. yes EGL-X11 Plugin . yes but also configure fails with ERROR: Feature "xcb": Forcing to "ON" breaks its condition: QT_FEATURE_thread AND TARGET XCB::XCB AND TEST_xcb_syslibs AND QT_FEATURE_xkbcommon_x11 i've double checked every required package that is needed and can't find a missing package Your log says: TEST_xcb_syslibs = "FALSE" This is the problem. You're missing the XCB libraries in your environment (we don't ship them bundled in Qt any more). You may want to increase the log level because XCB support requires several tiny libraries and any of them missing means the entire support is missing. I can confirm "several tiny libraries" i.e. I had the same problem when building Qt on Ubuntu 22.04. After fiddling for a while, I took the easy way out: sudo apt-get install libxcb* That installed 68 libs (all beginning with libxcb-) probably overkill but at least it solved the problem :-) /Henry ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] ASAN (Qt 6.4 + Glib) build shows stackoverflow in trivial Qt program
On Saturday, 12 November 2022 23:11:45 PST Dennis Luehring wrote: > forcing -xcb gives me these configure output (https://pastebin.com/ML8QCJRQ) > >XCB: > Using system-provided xcb-xinput . no > GL integrations: >GLX Plugin . yes > XCB GLX .. yes >EGL-X11 Plugin . yes > > but also configure fails with > > ERROR: Feature "xcb": Forcing to "ON" breaks its condition: > QT_FEATURE_thread AND TARGET XCB::XCB AND TEST_xcb_syslibs AND > QT_FEATURE_xkbcommon_x11 > > > i've double checked every required package that is needed and can't find > a missing package Your log says: > TEST_xcb_syslibs = "FALSE" This is the problem. You're missing the XCB libraries in your environment (we don't ship them bundled in Qt any more). You may want to increase the log level because XCB support requires several tiny libraries and any of them missing means the entire support is missing. -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest