Just from a gut feeling I'd say this is the typical Qt4/Qt5 problem. Somewhere 
you have a plugin or lib,
which links against qt4, but which is also used by your qt5 program. This is a 
sure recipe for unexplainable 
seg faults.

Guido

On Tue, 9 Sep 2014 08:32:51 +0200
"Niels Becker" <[email protected]> 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&#124;PROT_WRITE&#124;PROT_EXEC,MAP_PRIVATE&#124;MAP_ANONYMOUS&#124;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&#124;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&#124;O_CLOEXEC) = 18
> fcntl(18, F_SETFD, FD_CLOEXEC) = 0
> fstat(18, {st_mode=S_IFREG&#124;0644, st_size=305, …}) = 0
> fstat(18, {st_mode=S_IFREG&#124;0644, st_size=305, …}) = 0
> fstat(18, {st_mode=S_IFREG&#124;0644, st_size=305, …}) = 0
> read(18, “{&#92;n &#92;“name&#92;”: &#92;“qbs&#92;”,&#92;n &#92;“search”…, 
> 16384) = 305
> read(18, “”, 16079) = 0
> mmap(NULL, 2147483648, 
> PROT_READ&#124;PROT_WRITE&#124;PROT_EXEC,MAP_PRIVATE&#124;MAP_ANONYMOUS&#124;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&#124;O_NONBLOCK&#124;O_DIRECTORY&#124;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&#124;O_NONBLOCK&#124;O_DIRECTORY&#124;O_CLOEXEC) = -1 ENOENT (No 
> such file or directory) clock_gettime(CLOCK_MONOTONIC, {2608050, 303164993}) 
> = 0 poll([{fd=3, events=POLLIN&#124;POLLOUT}], 1, 4294967295) = 1 ([{fd=3, 
> revents=POLLOUT}]) writev(3, 
> [{”&#92;17&#92;0&#92;2&#92;0&#92;17&#92;0&#92;0&#92;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, 
> “&#92;1&#92;0&#92;0&#92;0&#92;0&#92;0&#92;0&#92;0”, 8) = 8 write(5, 
> “&#92;1&#92;0&#92;0&#92;0&#92;0&#92;0&#92;0&#92;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
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to