Summary: | dev-qt/qtdeclarative-6.6.0 may fail with sandbox under unknown conditions when using qsb (FAILED: src/quick/.qsb/<snip>) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | he.ousia <he.ousia> |
Component: | Current packages | Assignee: | Qt Bug Alias <qt> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ionen, sandbox, vowstar |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=908809 https://bugs.gentoo.org/show_bug.cgi?id=913493 https://codereview.qt-project.org/c/qt/qtbase/+/513140 https://bugs.gentoo.org/show_bug.cgi?id=918664 https://bugs.gentoo.org/show_bug.cgi?id=923013 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
full build log
no-silent.patch j=1, nosilent build log core dump of "sandbox qsb args" qmake crash qsb crash qsb strace patch for dev-qt/qtbase-6.6.0 patch for dev-qt/qtbase-6.6.0 patch for dev-qt/qtbase-6.6.0 |
Description
he.ousia
2023-10-13 17:14:53 UTC
Created attachment 872724 [details]
full build log
Created attachment 872728 [details, diff]
no-silent.patch
Can't reproduce and I don't really have ideas given it says nothing about why it failed.
Could you try to rebuild with the attached patch? This is not a fix, but it removes the -s flag (silent) and "perhaps" it'll tell us what happened. May possibly have errors about spirv-opt being not found, but that shouldn't be the cause (it's optional), Qt added -s to silence that. Anything else would be suspicious though.
Could also try with a lower MAKEOPTS -j, at -j30 I wouldn't be surprised if it hits some rare race condition not that I've been able to have it fail that way.
Created attachment 872729 [details]
j=1, nosilent build log
Thanks, unfortunately it still doesn't say why qsb is failing (that's from dev-qt/qtshadertools). The .frag/.vert files themselves haven't changed since 2021, so if there's an issue it's "probably" in qtshadertools. It's not completely broken right? `/usr/lib64/qt6/bin/qsb --version` should return "qsb 6.6.0". If not, then no idea what may be going on, nor anything else to suggest at the moment. Running directly ninja from build directory succeeds, and then the package installs ok using the ebuild commands. Evidently there is some problem with my portage system. Maybe a sandbox thing then. Does it build with FEATURES="-sandbox -usersandbox", if still doesn't could try FEATURES="-ipc-sandbox -pid-sandbox" too I guess. Albeit if it is I wonder why I don't run into it and why there's no sandbox errors. (In reply to Ionen Wolkens from comment #6) > Maybe a sandbox thing then. > > Does it build with FEATURES="-sandbox -usersandbox", if still doesn't could > try FEATURES="-ipc-sandbox -pid-sandbox" too I guess. If both still fail, could try letting run as root too (FEATURES="-sandbox -userpriv -usersandbox), reminds me of unsolved bug #913493 comment #5 where qmake6 was strangely acting up with sandbox. qsb being a qt tool as well could have the same problem. With FEATURES="-sandbox -usersandbox" it builds OK. (In reply to Ionen Wolkens from comment #7) I always do all emerge operations as root. (In reply to he.ousia from comment #9) > (In reply to Ionen Wolkens from comment #7) > I always do all emerge operations as root. FEATURES="userpriv" makes the compilation phase run as the portage user regardless of what you ran emerge as. (In reply to he.ousia from comment #8) > With FEATURES="-sandbox -usersandbox" it builds OK. Well, guess it can be a workaround until this is figured out. I do assume it's related to bug #908809 and bug #913493 (except it was qmake rather than qsb). Found a host of qsb segfaults in a syslog. So it is a real culprit. a) then how it is that sandbox trick does work? b) what is wrong with qtshadertools? I'm not the expert on sandbox, but it uses LD_PRELOAD to wrap calls qsb does which could potentially result in unexpected behaviour and making things crash. Like if qsb only does minimal error checking (aka things that under normal conditions without sandbox do not fail, and then it continues while expecting that it worked then segfaults). Debug symbols and a backtrace could potentially reveal more. FWIW, I am seeing exactly the same issue on only one of my four Gentoo machines that pretty much run the same configuration and USE flags. I also have segfaults from qsb in the logs. The machine has an Intel Xeon, so I guess a hardware-specific issue is to be ruled out... I've compiled qsb + its library with -g but have no clue how to extract the debug info during emerge process. Syslog shows nothing interesting: Oct 17 00:47:37 [kernel] [1321881.325768] qsb[4882]: segfault at 7ffd92fcf1a8 ip 00007ffd92fcf1a8 sp 00007ffd92fcf0f0 error 15 likely on CPU 31 (core 15, socket 0) Oct 17 00:47:37 [kernel] [1321881.325772] Code: 00 00 8f 00 00 00 00 00 00 00 c0 11 ab 40 91 7f 00 00 78 d4 fe 40 91 7f 00 00 ce fe de 40 91 7f 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 68 95 5d 42 91 7f I would suggest trying to run the crashing command manually outside of portage, but prefix it with 'sandbox ...' to run it under there. Then try gdb to step through. Sorry, I do not know how to work with gdb. qsb crashes gladly in sandbox: t ~ # sandbox /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert Sandboxed process killed by signal: Segmentation fault but in gdb it kind of runs: gdb sandbox --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert GNU gdb (Gentoo 13.2 vanilla) 13.2 ---------------------------------------------snip Reading symbols from /usr/lib64/qt6/bin/qsb... (gdb) run Starting program: /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [Detaching after vfork from child process 28017] [Detaching after vfork from child process 28018] [Inferior 1 (process 28016) exited normally] Created attachment 873111 [details]
core dump of "sandbox qsb args"
Same issue for me. [ 9090.185549] qsb[567219]: segfault at 7ffd232e5e28 ip 00007ffd232e5e28 sp 00007ffd232e5d70 error 15 likely on CPU 7 (core 3, socket 0) [ 9090.185564] Code: 00 00 f8 28 48 63 4b 7f 00 00 00 a0 65 63 4b 7f 00 00 00 61 69 6e 00 00 00 00 00 00 00 00 00 00 00 00 38 5e 2e 23 00 00 00 00 <00> 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 70 d4 2d 65 4b 7f [10481.175952] qsb[573504]: segfault at 7fffbe73d768 ip 00007fffbe73d768 sp 00007fffbe73d6b0 error 15 likely on CPU 13 (core 6, socket 0) [10481.175967] Code: 00 00 f8 08 02 88 26 7f 00 00 00 80 1f 88 26 7f 00 00 00 61 69 6e 00 00 00 00 00 00 00 00 00 00 00 00 78 d7 73 be 00 00 00 00 <00> 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 70 b4 e7 89 26 7f [10481.202488] qsb[573506]: segfault at 7ffe6a5b96a8 ip 00007ffe6a5b96a8 sp 00007ffe6a5b95f0 error 15 likely on CPU 5 (core 2, socket 0) [10481.202501] Code: 00 00 f8 e8 7d ac 31 7f 00 00 00 60 9b ac 31 7f 00 00 00 61 69 6e 00 00 00 00 00 00 00 00 00 00 00 00 b8 96 5b 6a 00 00 00 00 <00> 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 70 94 63 ae 31 7f CPU: AMD Ryzen 9 PRO 7940HS w/ Radeon 780M Graphics (16) @ 5.583GHz (In reply to he.ousia from comment #18) > Created attachment 873111 [details] > core dump of "sandbox qsb args" If you load it in gdb, then run 'bt', what do you get? Not only qsb, but also qmake6 crash. QT 6.5.3 works with sandbox. QT 6.6.0 crash with sandbox. [13202.157418] qsb[623005]: segfault at 7ffc7240b668 ip 00007ffc7240b668 sp 00007ffc7240b5b0 error 15 likely on CPU 14 (core 7, socket 0) [13202.157426] likely on CPU 8 (core 4, socket 0) [13202.157429] Code: 00 00 90 00 00 00 00 00 00 00 90 a2 f2 c2 a0 7f 00 00 80 44 45 c3 a0 7f 00 00 98 8f 26 c3 a0 7f 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 70 04 83 c4 a0 7f [13202.157431] Code: 00 00 90 00 00 00 00 00 00 00 90 92 ce 4b 7a 7f 00 00 80 34 21 4c 7a 7f 00 00 98 7f 02 4c 7a 7f 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 70 f4 5e 4d 7a 7f [13821.623309] qmake[631528]: segfault at 7ffd9f4f7068 ip 00007ffd9f4f7068 sp 00007ffd9f4f6fb0 error 15 likely on CPU 0 (core 0, socket 0) [13821.623319] Code: 00 00 f8 18 71 b4 23 7f 00 00 b0 b0 1b b5 23 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 a4 1b b5 23 7f - qmake In sandbox: gdb --args qmake6 Kactus2.pro GNU gdb (Gentoo 13.2 vanilla) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://bugs.gentoo.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from qmake6... (No debugging symbols found in qmake6) (gdb) run Starting program: /usr/bin/qmake6 Kactus2.pro * ACCESS DENIED: open_wr: /proc/self/mem warning: opening /proc/self/mem file failed: Permission denied (13) * ACCESS DENIED: open_wr: /proc/639163/task/639163/mem warning: opening /proc/PID/mem file for lwp 639163.639163 failed: Permission denied (13) * ACCESS DENIED: mkdir: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/__pycache__ * ACCESS DENIED: mkdir: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ * ACCESS DENIED: mkdir: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ * ACCESS DENIED: mkdir: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". * ACCESS DENIED: mkdir: /usr/share/glib-2.0/gdb/__pycache__ * ACCESS DENIED: open_wr: /proc/639166/task/639166/mem warning: opening /proc/PID/mem file for lwp 639166.639166 failed: Permission denied (13) [Detaching after vfork from child process 639166] Program received signal SIGSEGV, Segmentation fault. 0x00007fffffff9e68 in ?? () (gdb) bt #0 0x00007fffffff9e68 in ?? () #1 0x00007fffffff9e64 in ?? () #2 0x00007ffff7d180e6 in ?? () from /usr/lib64/qt6/bin/../../libQt6Core.so.6 #3 0x00007ffff7d18a16 in ?? () from /usr/lib64/qt6/bin/../../libQt6Core.so.6 #4 0x00007ffff7cff57a in ?? () from /usr/lib64/qt6/bin/../../libQt6Core.so.6 #5 0x00005555556898ce in ?? () #6 0x000055555568d3aa in ?? () #7 0x00005555556925a0 in ?? () #8 0x00005555556a3f7e in ?? () #9 0x00005555556a428f in ?? () #10 0x00005555556a4da6 in ?? () #11 0x00005555556a51fa in ?? () #12 0x00005555556a2076 in ?? () #13 0x00005555556a6c21 in ?? () #14 0x00005555556a7617 in ?? () #15 0x00005555556a90c9 in ?? () #16 0x00005555556a750e in ?? () #17 0x00005555556a7617 in ?? () #18 0x00005555556c12eb in ?? () #19 0x00005555556b81fc in ?? () #20 0x0000555555564d03 in ?? () #21 0x00007ffff7536f0a in ?? () from /lib64/libc.so.6 #22 0x00007ffff7536fc5 in __libc_start_main () from /lib64/libc.so.6 --Type <RET> for more, q to quit, c to continue without paging-- qsb In sandbox: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert GNU gdb (Gentoo 13.2 vanilla) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://bugs.gentoo.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/lib64/qt6/bin/qsb... (No debugging symbols found in /usr/lib64/qt6/bin/qsb) (gdb) run Starting program: /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert * ACCESS DENIED: open_wr: /proc/self/mem warning: opening /proc/self/mem file failed: Permission denied (13) * ACCESS DENIED: open_wr: /proc/645208/task/645208/mem warning: opening /proc/PID/mem file for lwp 645208.645208 failed: Permission denied (13) * ACCESS DENIED: mkdir: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/__pycache__ * ACCESS DENIED: mkdir: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ * ACCESS DENIED: mkdir: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ * ACCESS DENIED: mkdir: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". * ACCESS DENIED: mkdir: /usr/share/glib-2.0/gdb/__pycache__ * ACCESS DENIED: open_wr: /proc/645211/task/645211/mem warning: opening /proc/PID/mem file for lwp 645211.645211 failed: Permission denied (13) [Detaching after vfork from child process 645211] Program received signal SIGSEGV, Segmentation fault. 0x00007fffffffac68 in ?? () (gdb) bt #0 0x00007fffffffac68 in ?? () #1 0x00007fffffffac64 in ?? () #2 0x00007ffff69680e6 in ?? () from /usr/lib64/qt6/bin/../../libQt6Core.so.6 #3 0x00007ffff6968a16 in ?? () from /usr/lib64/qt6/bin/../../libQt6Core.so.6 #4 0x00007ffff694f57a in ?? () from /usr/lib64/qt6/bin/../../libQt6Core.so.6 #5 0x000055555555ee41 in ?? () #6 0x000055555555c0cc in ?? () #7 0x00007ffff6184f0a in ?? () from /lib64/libc.so.6 #8 0x00007ffff6184fc5 in __libc_start_main () from /lib64/libc.so.6 #9 0x000055555555d191 in ?? () (gdb) Message with sandbox exit: exit Cleaning up sandbox process ============================= Gentoo path sandbox ============================== The protected environment has been shut down. * ----------------------- SANDBOX ACCESS VIOLATION SUMMARY ----------------------- * LOG FILE: "/var/log/sandbox/sandbox-645021.log" * VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: open_wr S: deny P: /proc/self/mem A: /proc/self/mem R: /proc/645190/mem C: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert F: open_wr S: deny P: /proc/645208/task/645208/mem A: /proc/645208/task/645208/mem R: /proc/645208/task/645208/mem C: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert F: mkdir S: deny P: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/__pycache__ A: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/__pycache__ R: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/__pycache__ C: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert F: mkdir S: deny P: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ A: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ R: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ C: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert F: mkdir S: deny P: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ A: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ R: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ C: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert F: mkdir S: deny P: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ A: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ R: /usr/share/gcc-data/x86_64-pc-linux-gnu/13/python/libstdcxx/v6/__pycache__ C: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert F: mkdir S: deny P: /usr/share/glib-2.0/gdb/__pycache__ A: /usr/share/glib-2.0/gdb/__pycache__ R: /usr/share/glib-2.0/gdb/__pycache__ C: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert F: open_wr S: deny P: /proc/645211/task/645211/mem A: /proc/645211/task/645211/mem R: /proc/645211/task/645211/mem C: gdb --args /usr/lib64/qt6/bin/qsb --glsl 100es,120,150 --hlsl 50 --msl 12 -b -O -s -o /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0_build/src/quick/.qsb/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert.qsb /var/tmp/portage/dev-qt/qtdeclarative-6.6.0/work/qtdeclarative-everywhere-src-6.6.0/src/quick/scenegraph/shaders_ng/loqsubpixeldistancefieldtext.vert * -------------------------------------------------------------------------------- vowstar, was your qtcore etc built with debugging symbols (https://wiki.gentoo.org/wiki/Debugging#Per-package)? if not, please do that. (also, please use attachments for big pastes, to help keep things readable) + glibc pls Created attachment 873163 [details]
qmake crash
Thanks for your patient guidance, I have learned how to add debug symbols.
This attachment is qmake crash gdb bt with symbol.
Created attachment 873164 [details]
qsb crash
This attachment is qsb crash gdb bt with symbol.
Created attachment 873165 [details]
qsb strace
This attachment is strace of qsb in sandbox
A segfault after a vfork probably indicates that the child process is corrupting the stack of the parent. Maybe the child stack is too small? https://github.com/qt/qtbase/blob/dev/src/3rdparty/forkfd/forkfd_linux.c#L160 Created attachment 873170 [details, diff] patch for dev-qt/qtbase-6.6.0 (In reply to Mike Gilbert from comment #28) > A segfault after a vfork probably indicates that the child process is > corrupting the stack of the parent. > > Maybe the child stack is too small? > > https://github.com/qt/qtbase/blob/dev/src/3rdparty/forkfd/forkfd_linux.c#L160 Thank you so much. This may be the root cause. After I changed childStack[4096] to childStack[8192], both qsb and qmake can work normally. I made a patch qtbase-6.6.0-fix-vfork-stack.patch, after applied to /etc/portage/patches/dev-qt/qtbase-6.6.0, this problem fixed. Created attachment 873173 [details, diff]
patch for dev-qt/qtbase-6.6.0
Created attachment 873179 [details, diff]
patch for dev-qt/qtbase-6.6.0
Maybe I'll just do 8192 for now until upstream figures out on exactly what's best, SIGSTKSZ has strings attached and I'd rather not have to think about it (haven't forgotten things like e.g. [1]). That aside, many thanks for figuring this out. [1] https://github.com/axboe/liburing/commit/8aac320a The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9152c25f592db19e2d6f6ab0aab991a463503a34 commit 9152c25f592db19e2d6f6ab0aab991a463503a34 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2023-10-21 05:46:22 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2023-10-21 06:21:50 +0000 dev-qt/qtbase: fix qsb and qmake with sandbox Also add to 6.5.3, while the issue has been less prominent in 6.5.x, there has been users that ran into issues with older versions, and is needed for stable users. See bug #915695 for details, the others are essentially duplicates which are hopefully fixed too (please report if still issues given I could never reproduce myself and cannot confirm). Closes: https://bugs.gentoo.org/908809 Closes: https://bugs.gentoo.org/908816 Closes: https://bugs.gentoo.org/913493 Closes: https://bugs.gentoo.org/915695 Thanks-to: vowstar Thanks-to: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Ionen Wolkens <ionen@gentoo.org> .../qtbase-6.5.3-forkfd-childstack-size.patch | 27 ++++++++++++++++++++++ ...{qtbase-6.5.3.ebuild => qtbase-6.5.3-r1.ebuild} | 1 + ...{qtbase-6.6.0.ebuild => qtbase-6.6.0-r1.ebuild} | 1 + 3 files changed, 29 insertions(+) (In reply to Ionen Wolkens from comment #33) > Maybe I'll just do 8192 for now until upstream figures out on exactly what's > best, SIGSTKSZ has strings attached and I'd rather not have to think about > it (haven't forgotten things like e.g. [1]). > > That aside, many thanks for figuring this out. > > [1] https://github.com/axboe/liburing/commit/8aac320a Yes, 8192 may a good idea, SIGSTKSZ not being a constant, it may cause compile error. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=313ee5bd17f851405ea0f9176797bc7355a9e648 commit 313ee5bd17f851405ea0f9176797bc7355a9e648 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2023-11-29 04:44:24 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2023-11-29 05:36:15 +0000 dev-qt/qtbase: re-add forkfd stacksize patch but with 32k Bug: https://bugs.gentoo.org/918664 Bug: https://bugs.gentoo.org/915695 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> .../qtbase-6.6.1-forkfd-childstack-size.patch | 23 ++++++++++++++++++++++ ...{qtbase-6.6.1.ebuild => qtbase-6.6.1-r1.ebuild} | 1 + dev-qt/qtbase/qtbase-6.6.9999.ebuild | 1 + dev-qt/qtbase/qtbase-6.9999.ebuild | 1 + 4 files changed, 26 insertions(+) |