Bug 162380 - konsole crashes at startup probably getting out of memory
Summary: konsole crashes at startup probably getting out of memory
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-20 22:57 UTC by Torsten Ekedahl
Modified: 2008-05-21 00:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Ekedahl 2008-05-20 22:57:05 UTC
Version:            (using KDE 4.0.3)
Installed from:    Fedora RPMs
OS:                Linux

After starting konsole its memory use grows to about 200 Mb and then crashes.

Running under gdb shows that it crashes at
0x07ac9cdc in _int_malloc (av=<value optimized out>, bytes=<value optimized
out>) at malloc.c:4085

Giving a backtrace is not possible as there seems to be some (almost) infinite
recursion happening. 

Going up a few steps gives this:

#1  0x07acadc6 in malloc_check (sz=<value optimized out>, caller=Could not find
the frame base for "mallo
c_check".
) at hooks.c:265
265       victim = (top_check() >= 0) ? _int_malloc(&main_arena, sz+1) : NULL;
(gdb) 
#2  0x07acbbf5 in __libc_malloc (bytes=<value optimized out>) at malloc.c:3546
3546        return (*hook)(bytes, RETURN_ADDRESS (0));
(gdb) 
#3  0x005bbd9d in qMalloc (size=Could not find the frame base for
"qMalloc(unsigned int)".
) at global/qglobal.cpp:1971
1971    void *qMalloc(size_t size) { return ::malloc(size); }
Current language:  auto; currently c++
(gdb) 
#4  0x005f54e7 in QString (this=<value optimized out>, unicode=<value optimized
out>, 
    size=<value optimized out>) at tools/qstring.cpp:795
795             d = (Data*) qMalloc(sizeof(Data)+size*sizeof(QChar));
(gdb) 
#5  0x005f58af in QString::mid (this=<value optimized out>, position=<value
optimized out>, 
    n=<value optimized out>) at tools/qstring.cpp:2854
2854        return QString((const QChar*) d->data + position, n);
(gdb) 
#6  0x0064ee3a in QFSFileEngine::fileName (this=<value optimized out>,
file=<value optimized out>)
    at io/qfsfileengine_unix.cpp:660
660                 return d->filePath.mid(slash + 1);
(gdb) 
#7  0x0064e9f8 in QFSFileEngine::fileFlags (this=<value optimized out>,
type=<value optimized out>)
    at io/qfsfileengine_unix.cpp:630
630             if (fileName(BaseName)[0] == QLatin1Char('.')
(gdb) up 10
#17 0x00304320 in Konsole::SessionManager::loadProfile (this=<value optimized out>, 
    shortPath=<value optimized out>)
    at /usr/src/debug/kdebase-4.0.3/apps/konsole/src/SessionManager.cpp:140
140         bool result = reader->readProfile(path,newProfile,parentProfile);

Further attempts to go up leads to the same position:

(gdb) up 10
#27 0x00304346 in Konsole::SessionManager::loadProfile (this=<value optimized out>, 
    shortPath=<value optimized out>)
    at /usr/src/debug/kdebase-4.0.3/apps/konsole/src/SessionManager.cpp:146
146             QString parentKey = loadProfile(parentProfile);
(gdb) up
#28 0x00304346 in Konsole::SessionManager::loadProfile (this=<value optimized out>, 
    shortPath=<value optimized out>)
    at /usr/src/debug/kdebase-4.0.3/apps/konsole/src/SessionManager.cpp:146
146             QString parentKey = loadProfile(parentProfile);
(gdb) 
#29 0x00304346 in Konsole::SessionManager::loadProfile (this=<value optimized out>, 
    shortPath=<value optimized out>)
    at /usr/src/debug/kdebase-4.0.3/apps/konsole/src/SessionManager.cpp:146
146             QString parentKey = loadProfile(parentProfile);
Comment 1 Robert Knight 2008-05-20 23:18:41 UTC
Konsole is getting stuck in an infinite loop loading settings.  

In ~/.kde/share/apps/konsole one of the *.profile files probably has a "Parent" key which points to the file itself.  

This is fixed in trunk and I believe, KDE 4.0.4, although it may be KDE 4.0.5

Comment 2 Torsten Ekedahl 2008-05-20 23:27:38 UTC
Removing Parent key did work.