Bug 260802 - devel/qbs core dumps and fails to build using poudriere on stable 13 amd64
Summary: devel/qbs core dumps and fails to build using poudriere on stable 13 amd64
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-kde (Team)
URL: https://bugreports.qt.io/browse/QBS-1684
Depends on:
Reported: 2021-12-29 17:02 UTC by Robert Cina
Modified: 2022-03-18 19:38 UTC (History)
3 users (show)

See Also:
tcberner: maintainer-feedback+

devel/qbs poudriere build log of failure (636.07 KB, text/plain)
2021-12-29 17:02 UTC, Robert Cina
no flags Details
tarball of reproducer (631 bytes, application/x-compressed-tar)
2022-02-08 23:15 UTC, Adriaan de Groot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Cina 2021-12-29 17:02:23 UTC
Created attachment 230543 [details]
devel/qbs poudriere build log of failure

The port devel/qbs core dumps with a bus error and fails to build using poudriere on my stable 13 amd64 system.

The following is the output of the build log:

--- sub-static-res-pro-all ---
( test -e Makefile.static-res || /usr/local/lib/qt5/bin/qmake -o Makefile.static-res /wrkdirs/usr/ports/devel/qbs/work/qbs-src-1.21.0/static-res.pro CONFIG+=qbs_disable_rpath CONFIG+=qbs_enable_project_file_updates -spec /usr/local/lib/qt5/mkspecs/freebsd-clang QMAKE_CC=cc QMAKE_CXX=c++ QMAKE_LINK_C=cc QMAKE_LINK_C_SHLIB=cc QMAKE_LINK=c++ QMAKE_LINK_SHLIB=c++ 'QMAKE_CFLAGS=-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing ' 'QMAKE_CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  ' 'QMAKE_LFLAGS= -fstack-protector-strong ' QMAKE_LIBS= QMAKE_CFLAGS_DEBUG= QMAKE_CFLAGS_RELEASE= QMAKE_CXXFLAGS_DEBUG= QMAKE_CXXFLAGS_RELEASE= PREFIX=/usr/local CONFIG+=release 'CONFIG-=debug separate_debug_info' ) && /usr/bin/make -f Makefile.static-res all
--- qbsres/default/default.bg ---
LD_LIBRARY_PATH=/wrkdirs/usr/ports/devel/qbs/work/.build/lib bin/qbs build --settings-dir qbsres/settings -f /wrkdirs/usr/ports/devel/qbs/work/qbs-src-1.21.0/qbs.qbs -d qbsres -p 'qbs resources' qbs.installPrefix:undefined project.withCode:false project.withDocumentation:false profile:none
Bus error (core dumped)
*** [qbsres/default/default.bg] Error code 138

make[2]: stopped in /wrkdirs/usr/ports/devel/qbs/work/.build
1 error

make[2]: stopped in /wrkdirs/usr/ports/devel/qbs/work/.build
*** [sub-static-res-pro-all] Error code 2

make[1]: stopped in /wrkdirs/usr/ports/devel/qbs/work/.build
1 error

make[1]: stopped in /wrkdirs/usr/ports/devel/qbs/work/.build
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

make: stopped in /usr/ports/devel/qbs
=>> Cleaning up wrkdir
===>  Cleaning for qbs-1.21.0
build of devel/qbs | qbs-1.21.0 ended at Wed Dec 29 09:01:18 EST 2021
build time: 00:01:19
!!! build failure encountered !!!
Comment 1 Adriaan de Groot freebsd_committer 2022-01-02 22:06:10 UTC
I see this in package-build fallout all the time, but that's on 14-, not 13, and it doesn't happen to me locally, either. Not in the host, nor in a poudriere build on the same. So I'm a bit mystified. It needs a backtrace to even start to figure out what's actually going wrong.
Comment 2 Robert Cina 2022-01-03 02:02:48 UTC
Thanks for the information. How would I go about getting a backtrace while building the port with poudriere? At this point I am not really sure what needs to be configured to get a backtrace or if it is relatively simple but any further help is appreciated.
Comment 3 Tobias C. Berner freebsd_committer 2022-01-04 17:27:34 UTC
Semi-helpful backtrace:
Comment 4 Steve Wills freebsd_committer 2022-02-08 21:35:58 UTC
I'm seeing this too. FWIW:

Comment 5 Adriaan de Groot freebsd_committer 2022-02-08 23:15:58 UTC
Created attachment 231660 [details]
tarball of reproducer

The upstream bugreport has a simple reproducer attached -- I've now tarred it up here. It extracts to a subdirectory pr-260802, cd to that directory and run `make` to see it in action.

Somewhat strangely, on 13- I now have Clang 13 and can't reproduce the problem. I haven't got an up-to-date 14- to try it with.
Comment 6 Steve Wills freebsd_committer 2022-02-09 03:09:31 UTC
(In reply to Adriaan de Groot from comment #5)
Tried it on my 14-CURRENT system from Jan 21 and indeed it does reproduce, until I enable debugging. Here's the back trace:

(lldb) bt                                          
* thread #1, name = 'qbs-1684', stop reason = signal SIGBUS
  * frame #0: 0x000000082109fcad libQt5Script.so.5`___lldb_unnamed_symbol1864 + 2269
    frame #1: 0x000000082109db20 libQt5Script.so.5`___lldb_unnamed_symbol1861 + 46736
    frame #2: 0x0000000821092268 libQt5Script.so.5`___lldb_unnamed_symbol1859 + 968
    frame #3: 0x00000008210a14bf libQt5Script.so.5`___lldb_unnamed_symbol1870 + 127
    frame #4: 0x000000082114252f libQt5Script.so.5`___lldb_unnamed_symbol3391 + 687   
    frame #5: 0x0000000821146321 libQt5Script.so.5`QScriptEngine::evaluate(QString const&, QString const&, int) + 337
    frame #6: 0x0000000000202a8b qbs-1684`main + 1019
    frame #7: 0x00000000002024a0 qbs-1684`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:73:7    

Now, having rebuilt devel/qt5-script with debugging, it no longer core dumps. But if I use the existing core I see:

(lldb) bt
* thread #1, name = 'qbs-1684', stop reason = signal SIGBUS
  * frame #0: 0x000000082109fcad libQt5Script.so.5
    frame #1: 0x0000000000000002
    frame #2: 0x000000082109db20 libQt5Script.so.5
    frame #3: 0x0000000821092268 libQt5Script.so.5
    frame #4: 0x00000008210a14bf libQt5Script.so.5
    frame #5: 0x000000082114252f libQt5Script.so.5`QTWTF::Vector<unsigned int, 0ul>::reserveCapacity(this=0x000000083c200688, newCapacity=28) at Vector.h:806:24
    frame #6: 0x0000000821146321 libQt5Script.so.5`QTWTF::Vector<QTJSC::StringJumpTable, 0ul>::reserveCapacity(this=0x0000000000000008, newCapacity=8) at Vector.h:803
    frame #7: 0x0000000000202a8b qbs-1684`main(argc=1, argv=<unavailable>) at main.cpp:22:27
    frame #8: 0x00000000002024a0 qbs-1684`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:73:7

Not sure if this is valid or not or how else I can help.
Comment 7 Tobias C. Berner freebsd_committer 2022-03-18 19:33:34 UTC
Moin moin 

devel/qbs was now marked broken in b97a7f5984cb5894ea5e2047ed749778b0ef51dc . 

Upstream does not really care about this piece of software anymore, and it is not used by anything in the tree. 

I'll close this for now, and will remove the port in the near future.

mfg Tobias
Comment 8 commit-hook freebsd_committer 2022-03-18 19:38:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1ef62d0494bf7f6742bf346d53a2be8a40a8321e

commit 1ef62d0494bf7f6742bf346d53a2be8a40a8321e
Author:     Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2022-03-18 19:37:34 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-03-18 19:38:20 +0000

    devel/qbs: mark for removal

    PR:             260802

 devel/qbs/Makefile | 2 ++
 1 file changed, 2 insertions(+)