[Qt-creator] Segmentation fault in Ubuntu x64, Qt 5.3.1
Ziller Eike
Eike.Ziller at digia.com
Wed Sep 10 10:39:39 CEST 2014
Hi,
First of all, with your configuration I’d suppose that any Qt Quick 2 does not work out of the box, so you should probably run Qt Creator with
-noload Welcome -noload QmlProfiler -noload QmlDesigner
Second, what I'd guess from your traces is that the JavaScript engines want that memory. So, potentially anything JavaScript related could be problematic, which would be Qbs support, and QML support in general.
Br, Eike
On Sep 9, 2014, at 8:32 AM, Niels Becker <Niels-Becker at gmx.de> wrote:
> Hello everybody,
>
> first of all I am not sure if this is a bug or a configuration / hardware issuse.
>
> My machine is a virtual headless server with
> 2 GB Ram
> Single Core CPU
> Ubuntu x64 14.04.1 LTS
> Xvfb Display
>
> I tried to install precompiled Qt Libararies from the website (5.3.1).
> After I click on Next, it craches with Segmentation fault.
> Same with precompiled Qt-Creator.
>
> I also tried to use pre build package from apt (5.2.1).
> but from this installation I could not start Qt-Creator (3.0.1).
>
> When I build from Source (5.3.1), Qt-Creator (3.2.0) is able to start but craches when I try to open a project.
> Interesting is that my project compiles and runs without any problems.
> Build Configuration: ./configure -developer-build -opensource -nomake examples -nomake tests -prefix /usr/local/Qt-5.3.1 -qt-xcb
>
> I have read many topics but did not find a solution.
> It has probably something to do with memory allocation.
>
> I was not able to debug qtcreator because gdb threw segmentation fault, too.
> Here is a gdb trace of the setup:
>
> gdb qt-opensource-linux-x64-5.3.1.run
> GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
> This GDB was configured as “x86_64-linux-gnu”.
> Reading symbols from qt-opensource-linux-x64-5.3.1.run…(no debugging symbols found)…done.
> (gdb) run
> Starting program: /home/niels/qt/qt-opensource-linux-x64-5.3.1.run
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.
> [New Thread 0×7ffff3678700 (LWP 1913)]
> [New Thread 0×7ffff2bc1700 (LWP 1914)]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0×0000000000662223 in QTJSC::ExecutablePool::systemAlloc(unsigned long) ()
>
> (gdb) where
> #0 0×0000000000662223 in QTJSC::ExecutablePool::systemAlloc(unsigned long) ()
> #1 0×00000000006b02e3 in QTJSC::JSGlobalData::JSGlobalData(bool) ()
> #2 0×00000000006b0a6c in QTJSC::JSGlobalData::create() ()
> #3 0×0000000000611927 in QScriptEnginePrivate::QScriptEnginePrivate() ()
> #4 0×00000000006127fe in QScriptEngine::QScriptEngine(QObject*) ()
> #5 0×00000000004a9cb8 in QInstaller::ScriptEngine::ScriptEngine(QInstaller::PackageManagerCore*) ()
> #6 0×0000000000455d9c in QInstaller::PackageManagerCorePrivate::componentScriptEngine() const ()
> #7 0×000000000049a5f9 in QInstaller::Component::loadComponentScript(QString const&) ()
> #8 0×000000000049b9bc in QInstaller::Component::loadComponentScript() ()
> #9 0×0000000000468e66 in QInstaller::PackageManagerCorePrivate::buildComponentTree(QHash<QString, QInstaller::Component*>&, bool) ()
> #10 0×000000000044a62e in QInstaller::PackageManagerCore::fetchAllPackages(QList<KDUpdater::Update*> const&, QHash<QString, KDUpdater::PackageInfo> const&) ()
> #11 0×000000000045032e in QInstaller::PackageManagerCore::fetchRemotePackagesTree() ()
> #12 0×000000000042d0f1 in IntroductionPageImpl::validatePage() ()
> #13 0×0000000000d4a8c7 in QWizard::next() ()
> […]
>
> last lines of strace qt-opensource-linux-x64-5.3.1.run
> mmap(NULL, 2147483648, PROT_READ|PROT_WRITE|PROT_EXEC,MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM(Cannot allocate memory)
> —- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xbbadbeef} —-
> +++ killed by SIGSEGV (core dumped) +++
>
> Why does it try to allocate 2GB memory ?
>
> strace qtcreator (own build)
> […]
> stat(”/home/niels/qt/qt-creator-opensource-src-3.2.0/share/qtcreator/qml-type-descriptions/qbs-bundle.json”, {st_mode=S_IFREG|0644, st_size=305, …}) = 0
> open(”/home/niels/qt/qt-creator-opensource-src-3.2.0/share/qtcreator/qml-type-descriptions/qbs-bundle.json”, O_RDONLY|O_CLOEXEC) = 18
> fcntl(18, F_SETFD, FD_CLOEXEC) = 0
> fstat(18, {st_mode=S_IFREG|0644, st_size=305, …}) = 0
> fstat(18, {st_mode=S_IFREG|0644, st_size=305, …}) = 0
> fstat(18, {st_mode=S_IFREG|0644, st_size=305, …}) = 0
> read(18, “{\n \“name\”: \“qbs\”,\n \“search”…, 16384) = 305
> read(18, “”, 16079) = 0
> mmap(NULL, 2147483648, PROT_READ|PROT_WRITE|PROT_EXEC,MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM(Cannot allocate memory)
> —- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xbbadbeef} —-
> +++ killed by SIGSEGV (core dumped) +++
>
> Again 2GB ?
>
> strace qtcreator (repository)
> [...]
> openat(AT_FDCWD, “/”, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 17statfs(”/”, {f_type=0×565a4653, f_bsize=4096, f_blocks=12500000, f_bfree=8499470, f_bavail=8499470, f_files=250000, f_ffree=61885, f_fsid={-1280375273, -1264953772}, f_namelen=255, f_frsize=4096}) = 0
> getdents(17, /* 27 entries */, 32768) = 704
> getdents(17, /* 0 entries */, 32768) = 0
> close(17) = 0
> openat(AT_FDCWD, “/qch”, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> clock_gettime(CLOCK_MONOTONIC, {2608050, 303164993}) = 0
> poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
> writev(3, [{”\17\0\2\0\17\0\0\1”, 8}], 1) = 8
> futex(0×200f0e8, FUTEX_WAKE_PRIVATE, 1) = 1
> futex(0×7fff12a438c0, FUTEX_WAKE_PRIVATE, 1) = 1
> futex(0×7fff12a438c4, FUTEX_WAIT_PRIVATE, 1, NULL) = -1 EAGAIN (Resource temporarily unavailable)
> futex(0×200f0e8, FUTEX_WAKE_PRIVATE, 1) = 0
> write(5, “\1\0\0\0\0\0\0\0”, 8) = 8
> write(5, “\1\0\0\0\0\0\0\0”, 8) = 8
> —- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0×7f075044c000} —-
> +++ killed by SIGSEGV (core dumped) +++
>
> I hope you can help me or at least provide a workaround for qtcreator.
>
> Kind Regards
> Niels
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the Qt-creator
mailing list