[Bug 160284] New: bad mmap causes cores in KPCMemoryDevice

Matthew Woehlke mw_triad at users.sourceforge.net
Thu Apr 3 01:11:59 CEST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=160284         
           Summary: bad mmap causes cores in KPCMemoryDevice
           Product: kdelibs
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdelibs-bugs kde org
        ReportedBy: mw_triad users sourceforge net


Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 4.1.2 
OS:                Linux

I've had about a half dozen cores in nearly as few days involving KPCMemoryDevice, all of which seem to have the same backtrace, and the same problem (memory pointer from mmap is invalid). Here's a backtrace from KWrite:

#0  0xb7956a4e in KPCMemoryDevice (this=0xbf96eb08, start=0xb4c82000 <Address 0xb4c82000 out of bounds>, size=0x807e3a8, available=16240640)                             
    at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kpixmapcache.cpp:153                                                                                    
#1  0xb7956dcf in KPixmapCache::Private::mmapFile (this=0x807e360, filename= 0x807e374, info=0x807e3a0, newsize=16240640)                                                
    at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kpixmapcache.cpp:467                                                                                    
#2  0xb79584f3 in KPixmapCache::Private::mmapFiles (this=0x807e360) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kpixmapcache.cpp:397                    
#3  0xb7957267 in KPixmapCache::recreateCacheFiles (this=0x809c778) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kpixmapcache.cpp:1159                   
#4  0xb7957833 in KPixmapCache::Private::checkFileVersion (this=0x807e360, filename= 0x807e374) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kpixmapcache.cpp:682
#5  0xb7957aa6 in KPixmapCache::Private::init (this=0x807e360) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kpixmapcache.cpp:990                                 
#6  0xb7957c25 in KPixmapCache::discard (this=0x809c778) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kpixmapcache.cpp:1185                                      
#7  0xb7955412 in KIconCache::Private::checkForThemeUpdates (this=0x80bd938) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kiconcache.cpp:81                      
#8  0xb79536ce in KIconCache::find (this=0x809c778, key= 0xbf96eec4, pix= 0xbf96eec8, path=0x0) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kiconcache.cpp:266  
#9  0xb7946dab in KIconLoader::loadIcon (this=0x80bd4b8, _name= 0x838e3d0, group=KIconLoader::Desktop, size=22, state=0, overlays= 0x838e3d4, path_store=0x0, canReturnNull=false)
    at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kiconloader.cpp:988                                                                                              
#10 0xb7941dc8 in KIconEngine::pixmap (this=0x81b1280, size= 0xbf96fb1c, mode=QIcon::Normal, state=QIcon::Off) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/icons/kiconengine.cpp:126
#11 0xb68cdb67 in QIcon::pixmap (this=0xbf970cb0, size= 0xbf96fb1c, mode=QIcon::Normal, state=QIcon::Off) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/image/qicon.cpp:660              
#12 0xb6b13561 in QCommonStyle::drawControl (this=0x80bd648, element=QStyle::CE_ToolButtonLabel, opt=0xbf970c78, p=0xbf971274, widget=0x83d5750)                                               
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/styles/qcommonstyle.cpp:1479                                                                                                           
#13 0xb799964a in KStyle::drawControl (this=0x80bd648, element=QStyle::CE_ToolButtonLabel, option=0xbf970c78, p=0xbf971274, widget=0x83d5750)                                                  
    at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/kernel/kstyle.cpp:2141                                                                                                              
#14 0xb605328e in OxygenStyle::drawControl (this=0x80bd648, element=QStyle::CE_ToolButtonLabel, option=0xbf970c78, p=0xbf971274, widget=0x83d5750)                                             
    at /usr/local/kde/home/src/kde-trunk-svn/kdebase/runtime/kstyles/oxygen/oxygen.cpp:312                                                                                                     
#15 0xb798ee05 in KStyle::drawComplexControl (this=0x80bd648, cc=QStyle::CC_ToolButton, opt=0xbf971214, p=0xbf971274, w=0x83d5750)                                                             
    at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/kernel/kstyle.cpp:2977                                                                                                              
#16 0xb6053375 in OxygenStyle::drawComplexControl (this=0x80bd648, control=QStyle::CC_ToolButton, option=0xbf971214, painter=0xbf971274, widget=0x83d5750)                                     
    at /usr/local/kde/home/src/kde-trunk-svn/kdebase/runtime/kstyles/oxygen/oxygen.cpp:288                                                                                                     
#17 0xb6beecbd in QStylePainter::drawComplexControl (this=0xbf971274, cc=QStyle::CC_ToolButton, opt= 0xbf971214)                                                                               
    at ../../include/QtGui/../../../../../../../src/kde/kde-trunk-svn/qt-copy/src/gui/painting/qstylepainter.h:96                                                                              
#18 0xb6ce4cd5 in QToolButton::paintEvent (this=0x83d5750) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/widgets/qtoolbutton.cpp:537                                                     
#19 0xb687c45b in QWidget::event (this=0x83d5750, event=0xbf971900) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:6988                                                
#20 0xb6be038d in QAbstractButton::event (this=0x83d5750, e=0xbf971900) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/widgets/qabstractbutton.cpp:1078                                   
#21 0xb6ce23f8 in QToolButton::event (this=0x83d5750, e=0xbf971900) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/widgets/qtoolbutton.cpp:1105                                           
#22 0xb681269f in QApplicationPrivate::notify_helper (this=0x8055fc8, receiver=0x83d5750, e=0xbf971900) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qapplication.cpp:3735       
#23 0xb68144f9 in QApplication::notify (this=0xbf9730ec, receiver=0x83d5750, e=0xbf971900) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qapplication.cpp:3702                    
#24 0xb79823a4 in KApplication::notify (this=0xbf9730ec, receiver=0x83d5750, event=0xbf971900) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/kernel/kapplication.cpp:311              
#25 0xb730a5d1 in QCoreApplication::notifyInternal (this=0xbf9730ec, receiver=0x83d5750, event=0xbf971900) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:586
#26 0xb68201b7 in QCoreApplication::sendSpontaneousEvent (receiver=0x83d5750, event=0xbf971900)
    at ../../include/QtCore/../../../../../../../src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.h:218
#27 0xb6889a32 in qt_sendSpontaneousEvent (receiver=0x83d5750, event=0xbf971900) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qapplication_x11.cpp:4698
#28 0xb687ac8c in QWidgetPrivate::drawWidget (this=0x83ba078, pdev=0x80e0d3c, rgn= 0xbf971a8c, offset= 0xbf971ac4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4421
#29 0xb687b554 in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=4, rgn= 0xbf971b50, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4519
#30 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=5, rgn= 0xbf971c10, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#31 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=7, rgn= 0xbf971cd0, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#32 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=9, rgn= 0xbf971d90, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#33 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=12, rgn= 0xbf971e50, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#34 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=14, rgn= 0xbf971f10, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#35 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=19, rgn= 0xbf971fd0, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#36 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=20, rgn= 0xbf972090, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#37 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=21, rgn= 0xbf972150, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#38 0xb687b39d in QWidgetPrivate::paintSiblingsRecursive (this=0x83d3410, pdev=0x80e0d3c, siblings= 0xbf972234, index=22, rgn= 0xbf97239c, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4509
#39 0xb687b0b0 in QWidgetPrivate::drawWidget (this=0x83d3410, pdev=0x80e0d3c, rgn= 0xbf97239c, offset= 0xbf9723d4, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4462
---Type <return> to continue, or q <return> to quit---
#40 0xb687b554 in QWidgetPrivate::paintSiblingsRecursive (this=0x80e12c0, pdev=0x80e0d3c, siblings= 0xbf972484, index=20, rgn= 0xbf972608, offset= 0x807388c, flags=4, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4519
#41 0xb687b0b0 in QWidgetPrivate::drawWidget (this=0x80e12c0, pdev=0x80e0d3c, rgn= 0xbf972608, offset= 0x807388c, flags=5, sharedPainter=0x8210f40)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:4462
#42 0xb6a08fe0 in QWidgetBackingStore::cleanRegion (this=0x8073880, rgn= 0xbf9726d4, widget=0x80e1228, recursiveCopyToScreen=true)
    at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/painting/qbackingstore.cpp:1041
#43 0xb6a09365 in qt_syncBackingStore (widget=0x80e1228) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/painting/qbackingstore.cpp:315
#44 0xb687c9e8 in QWidget::event (this=0x80e1228, event=0x8378580) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qwidget.cpp:7132
#45 0xb6c6140a in QMainWindow::event (this=0x80e1228, event=0x8378580) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/widgets/qmainwindow.cpp:1252
#46 0xb7a45f47 in KMainWindow::event (this=0x80e1228, ev=0x8378580) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/widgets/kmainwindow.cpp:1028
#47 0xb7a7db8f in KXmlGuiWindow::event (this=0x80e1228, ev=0x8378580) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/xmlgui/kxmlguiwindow.cpp:123
#48 0xb681269f in QApplicationPrivate::notify_helper (this=0x8055fc8, receiver=0x80e1228, e=0x8378580) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qapplication.cpp:3735
#49 0xb68144f9 in QApplication::notify (this=0xbf9730ec, receiver=0x80e1228, e=0x8378580) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qapplication.cpp:3702
#50 0xb79823a4 in KApplication::notify (this=0xbf9730ec, receiver=0x80e1228, event=0x8378580) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kdeui/kernel/kapplication.cpp:311
#51 0xb730a5d1 in QCoreApplication::notifyInternal (this=0xbf9730ec, receiver=0x80e1228, event=0x8378580) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:586
#52 0xb730e80b in QCoreApplication::sendEvent (receiver=0x80e1228, event=0x8378580)
    at ../../include/QtCore/../../../../../../../src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.h:215
#53 0xb730ab68 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x804acc0) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1191
#54 0xb730addb in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1084
#55 0xb733f9cc in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../../../../../../src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.h:220
#56 0xb733e885 in postEventSourceDispatch (s=0x8057d60) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:211
#57 0xb64c3f85 in IA__g_main_context_dispatch (context=0x8057cd8) at gmain.c:2045
#58 0xb64c5835 in g_main_context_iterate (context=0x8057cd8, block=1, dispatch=1, self=0x8056300) at gmain.c:2677
#59 0xb64c5c42 in IA__g_main_context_iteration (context=0x8057cd8, may_block=1) at gmain.c:2736
#60 0xb733deca in QEventDispatcherGlib::processEvents (this=0x8055b70, flags= 0xbf972fa8) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:325
#61 0xb68caa88 in QGuiEventDispatcherGlib::processEvents (this=0x8055b70, flags= 0xbf972fdc) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#62 0xb7306be0 in QEventLoop::processEvents (this=0xbf97305c, flags= 0xbf973014) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qeventloop.cpp:146
#63 0xb7306d8b in QEventLoop::exec (this=0xbf97305c, flags= 0xbf973064) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qeventloop.cpp:197
#64 0xb730aefa in QCoreApplication::exec () at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:838
#65 0xb68123bc in QApplication::exec () at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/gui/kernel/qapplication.cpp:3267
#66 0xb7f96ea5 in kdemain (argc=2, argv=0xbf9734f4) at /usr/local/kde/home/src/kde-trunk-svn/kdebase/apps/kwrite/kwritemain.cpp:786
#67 0x080487b6 in main (argc=Cannot access memory at address 0x0
) at /usr/local/kde/home/build/kde-trunk-svn/kdebase/apps/kwrite/kwrite_dummy.cpp:3

I also should have at least one of the cores permanently saved for further digging. The file fd looked OK the one time I managed to dig it up.


More information about the Kdelibs-bugs mailing list