Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2020 12:48:11 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        freebsd-ports@freebsd.org
Subject:   Cannot build qt5-webkit with debug
Message-ID:  <f0a4e30f-8856-b4e6-dc9b-ad87ecf1a17a@quip.cz>

next in thread | raw e-mail | index | archive | help
Short story:
I am trying to build qt5-webkit with WITH_DEBUG=yes in make.conf on our 
E3 Xeon machine with FreeBSD 11.3, poudriere-devel, 16GB of RAM and 10GB 
of swap.
The build always hangs, machine is unresponsive on SSH / HTTP, only ping 
is responding. I track it down to build eats all memory (RAM + Swap).

Did anybody tried to build (successfully?) qt5-webkit with debug option?

Is there a bug in build process with WITH_DEBUG or is 16GB of RAM and 
10GB of swap not enough in these days?

Any help appreciated.

Long story:
As I didn't found replacement for removed port lang/phantomjs nor found 
how to build firefox or chromium as static binary I am trying to create 
new port of lang/phantomjs.
I posted few weeks ago - phantomjs github is active again
https://lists.freebsd.org/pipermail/freebsd-ports/2020-January/117556.html

The new development version of phantomjs has different building process, 
newer dependencies, can be built with current OpenSSL 1.1.1 etc.
My (ugly) temporary version of this port is buildable, resulting binary 
"phantomjs" can run simple "Hello world" example
https://github.com/ariya/phantomjs/blob/master/examples/hello.js

But when I try to run some real work (fetching web page) it segfaulted.

This is what I get when phantomjs is run with gdb

(root@testjail) phantomjs/# gdb 
/var/ports/usr/ports/headtest/lang/phantomjs/work/stage/usr/local/bin/phantomjs
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) run /tmp/phantom.2.js
Starting program: 
/var/ports/usr/ports/headtest/lang/phantomjs/work/stage/usr/local/bin/phantomjs 
/tmp/phantom.2.js
warning: Lowest section in /usr/local/lib/libicudata.so.65 is .hash at 
0000000000000120

Program received signal SIGSEGV, Segmentation fault.
0x0000000802b29eeb in WebCore::CSSValue::destroy () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
Current language:  auto; currently minimal
(gdb) bt
#0  0x0000000802b29eeb in WebCore::CSSValue::destroy () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#1  0x0000000802ad1b67 in WebCore::StyleProperties::getPropertyCSSValue 
() from /usr/local/lib/qt5/libQt5WebKit.so.5
#2  0x0000000802b011d1 in WebCore::CSSParser::parseDeclaration () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#3  0x0000000802aed375 in WebCore::CSSParser::parseDeclaration () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#4  0x0000000802fbeee5 in WebCore::httpHeaderNameString () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#5  0x0000000802ae7d16 in WebCore::CSSParser::~CSSParser () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#6  0x0000000802b58e2c in WebCore::StyleSheetContents::parseString () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#7  0x0000000802ac800d in WebCore::CSSComputedStyleDeclaration::deref () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#8  0x0000000802ac7b8a in WebCore::CSSComputedStyleDeclaration::deref () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#9  0x0000000802ac818b in WebCore::CSSComputedStyleDeclaration::deref () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#10 0x0000000802b38433 in WebCore::valueForLength () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#11 0x0000000802a32e3b in WebCore::Element::setPseudo () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#12 0x0000000802a330d5 in WebCore::Element::setPseudo () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#13 0x00000008029085e0 in 
WebCore::HTMLTextFormControlElement::lastChangeWasUserEdit () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#14 0x0000000802908551 in 
WebCore::HTMLTextFormControlElement::lastChangeWasUserEdit () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#15 0x00000008029ef110 in WebCore::ContainerNode::appendChild () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#16 0x00000008029edaae in WebCore::Element::shadowRoot () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#17 0x00000008033b38a0 in WebCore::DOMPath::~DOMPath () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#18 0x00000008033af440 in WebCore::DOMPath::~DOMPath () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#19 0x00000008033b26f9 in WebCore::DOMPath::~DOMPath () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#20 0x0000000802ce5525 in WebCore::testPreloadScannerViewportSupport () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#21 0x0000000802ce2287 in WebCore::testPreloadScannerViewportSupport () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#22 0x0000000802ce1778 in WebCore::testPreloadScannerViewportSupport () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#23 0x0000000802cc8746 in WebCore::FileIconLoader::notifyFinished () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#24 0x0000000802cc814c in WebCore::FileIconLoader::notifyFinished () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#25 0x0000000802cc9319 in WebCore::FileIconLoader::notifyFinished () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#26 0x00000008029fb7d3 in WebCore::Element::setAttribute () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#27 0x0000000802cfffa3 in WebCore::DocumentLoader::commitData () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#28 0x0000000801d66a74 in QWebSettings::enablePersistentStorage () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#29 0x0000000802d01fa3 in WebCore::DocumentLoader::responseReceived () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#30 0x0000000802d4c8f2 in WebCore::CachedImage::imageForRenderer () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#31 0x0000000802d4c7d4 in WebCore::CachedImage::imageForRenderer () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#32 0x0000000802d3d7d5 in WebCore::SubresourceLoader::create () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#33 0x0000000802d3d8aa in WebCore::SubresourceLoader::create () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#34 0x0000000802d3995c in WebCore::ResourceLoader::cancelledError () 
from /usr/local/lib/qt5/libQt5WebKit.so.5
#35 0x0000000802f4a1f1 in WebCore::proxyServersForURL () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#36 0x0000000802f48b7f in WebCore::proxyServersForURL () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#37 0x0000000802f4a0e6 in WebCore::proxyServersForURL () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#38 0x0000000802f492b6 in WebCore::proxyServersForURL () from 
/usr/local/lib/qt5/libQt5WebKit.so.5
#39 0x00000008052bd241 in QMetaObject::activate () from 
/usr/local/lib/qt5/libQt5Core.so.5
#40 0x000000080441c4a4 in QHttpMultiPart::setBoundary () from 
/usr/local/lib/qt5/libQt5Network.so.5
#41 0x00000008044b5c91 in QHttpMultiPart::qt_metacall () from 
/usr/local/lib/qt5/libQt5Network.so.5
#42 0x00000008052b6348 in QObject::event () from 
/usr/local/lib/qt5/libQt5Core.so.5
#43 0x0000000800f79f03 in QApplicationPrivate::notify_helper () from 
/usr/local/lib/qt5/libQt5Widgets.so.5
#44 0x0000000800f7b44c in QApplication::notify () from 
/usr/local/lib/qt5/libQt5Widgets.so.5
#45 0x000000080528a212 in QCoreApplication::notifyInternal2 () from 
/usr/local/lib/qt5/libQt5Core.so.5
#46 0x000000080528b2fb in QCoreApplicationPrivate::sendPostedEvents () 
from /usr/local/lib/qt5/libQt5Core.so.5
#47 0x00000008052e32a8 in QEventDispatcherGlib::qt_metacall () from 
/usr/local/lib/qt5/libQt5Core.so.5
#48 0x000000080b772837 in g_main_context_dispatch () from 
/usr/local/lib/libglib-2.0.so.0
#49 0x000000080b772bfa in g_main_context_pending () from 
/usr/local/lib/libglib-2.0.so.0
#50 0x000000080b772cb4 in g_main_context_iteration () from 
/usr/local/lib/libglib-2.0.so.0
#51 0x00000008052e2cb6 in QEventDispatcherGlib::processEvents () from 
/usr/local/lib/qt5/libQt5Core.so.5
#52 0x00000008052858be in QEventLoop::exec () from 
/usr/local/lib/qt5/libQt5Core.so.5
#53 0x000000080528a97e in QCoreApplication::exec () from 
/usr/local/lib/qt5/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#54 0x000000000043d73a in inner_main (argc=2, argv=0x7fffffffe9c8)
     at 
/var/ports/usr/ports/headtest/lang/phantomjs/work/phantomjs-cb1b04b/src/main.cpp:74
#55 0x000000000043d38d in main (argc=2, argv=0x7fffffffe9c8)
     at 
/var/ports/usr/ports/headtest/lang/phantomjs/work/phantomjs-cb1b04b/src/main.cpp:95


I guess I need debug symbols for qt5-webkit to debug it further but I am 
not able to build it with WITH_DEBUG.

Are there any ways / tuning options to build it without eating all 
memory and swap space?

Kind regards
Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f0a4e30f-8856-b4e6-dc9b-ad87ecf1a17a>