Bug 42441 - konsole crashes on startup on BSD and Solaris
Summary: konsole crashes on startup on BSD and Solaris
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: FreeBSD Ports FreeBSD
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 48200 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-10 15:33 UTC by Michael E. Beckish
Modified: 2003-02-14 09:48 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 Michael E. Beckish 2002-05-10 15:28:32 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konsole
Version:           KDE 3.0.0 
Severity:          normal
Installed from:    FreeBSD Ports
Compiler:          Not Specified
OS:                FreeBSD
OS/Compiler notes: Not Specified

When I log into KDE I can open maybe 2 or 3 Konsoles.  After that every time I try to open a new Konsole it crashes.

Here is the backtrace:
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
0x290827fc in _thread_sys_poll () from /usr/lib/libc_r.so.4
#0  0x290827fc in _thread_sys_poll () from /usr/lib/libc_r.so.4
#1  0x29081bf8 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.4
#2  0x2908150f in _thread_kern_scheduler () from /usr/lib/libc_r.so.4
#3  0x0 in ?? ()

When I try to start Konsole from an xterm here is what I get:
aegean:~% konsole                                                     [11:27AM]
konsole_grantpty: cannot determine the name of device.
konsole: chownpty failed for device /dev/ptyp3::/dev/ttyp3.
       : This means the session can be eavesdroped.
       : Make sure konsole_grantpty is installed in
       : /usr/local/bin/ and setuid root.
kdeui (KPixmapIO): WARNING: Could not get shared memory segment.
KCrash: crashing.... crashRecursionCounter = 2
KCrash: Application Name = konsole path = <unknown> pid = 15104
aegean:~%    


If I log out of KDe then log back in I can start a few Konsoles again before it crashes.

I don't think I'm running out of memory; according to top I have 14M inactive RAM 50M free and 442M free swap.

Once they start crashing if I close the Konsoles that are running I can't even re-open them.

(Submitted via bugs.kde.org)
Comment 1 Michael E. Beckish 2002-05-10 15:50:38 UTC
One other thing:
This problem only seems to occur when I am using a transparent background
schema for Konsole.


Thanks
Mike 

---
Michael E. Beckish                       Tel: (570)803-0535 x1702
mike@sea-incorporated.com                Fax: (570)803-0536
Software Engineering Associates Inc.    http://www.sea-incorporated.com/
Comment 2 Waldo Bastian 2002-05-10 20:21:03 UTC
On Friday 10 May 2002 08:50 am Michael E. Beckish wrote:
> Package: konsole
> Version: KDE 3.0.0=20
> Severity: normal
> Installed from:    FreeBSD Ports
> Compiler:          Not Specified
> OS:                FreeBSD
> OS/Compiler notes: Not Specified

> When I log into KDE I can open maybe 2 or 3 Konsoles.  After that every
> time I try to open a new Konsole it crashes.

> kdeui (KPixmapIO): WARNING: Could not get shared memory segment.
> KCrash: crashing.... crashRecursionCounter =3D 2
> KCrash: Application Name =3D konsole path =3D <unknown> pid =3D 15104

> One other thing:
> This problem only seems to occur when I am using a transparent background
> schema for Konsole.

It seems you are running out of shared memory and I suspect this to be a=20
freebsd specific problem somehow. Can anyone reproduce this on freebsd?=20

Cheers
Waldo
--=20
bastian@kde.org  |   SuSE Labs KDE Developer  |  bastian@suse.com
Comment 3 Michael E. Beckish 2002-05-10 20:38:55 UTC
The weird thing is if it is a lack of shared memory it doesn't seem to
be affecting any other applications nor does it affect Konsole when not
using transparent backgrounds.
Plus I have hundreds of megs of free swap space.

Another note: this problem didn't appear until I upgraded to KDE3.

---
Michael E. Beckish                       Tel: (570)803-0535 x1702
mike@sea-incorporated.com                Fax: (570)803-0536
Software Engineering Associates Inc.    http://www.sea-incorporated.com/

On Fri 10 May 2002 Waldo Bastian wrote:

> On Friday 10 May 2002 08:50 am Michael E. Beckish wrote:
> > Package: konsole
> > Version: KDE 3.0.0 
> > Severity: normal
> > Installed from:    FreeBSD Ports
> > Compiler:          Not Specified
> > OS:                FreeBSD
> > OS/Compiler notes: Not Specified
> 
> > When I log into KDE I can open maybe 2 or 3 Konsoles.  After that every
> > time I try to open a new Konsole it crashes.
> 
> > kdeui (KPixmapIO): WARNING: Could not get shared memory segment.
> > KCrash: crashing.... crashRecursionCounter = 2
> > KCrash: Application Name = konsole path = <unknown> pid = 15104
> 
> > One other thing:
> > This problem only seems to occur when I am using a transparent background
> > schema for Konsole.
> 
> It seems you are running out of shared memory and I suspect this to be a 
> freebsd specific problem somehow. Can anyone reproduce this on freebsd? 
> 
> Cheers
> Waldo
> -- 
> bastian@kde.org  |   SuSE Labs KDE Developer  |  bastian@suse.com
> 
>
Comment 4 Will Andrews 2002-05-10 20:40:45 UTC
On Fri May 10 2002 at 01:21:03PM -0700 Waldo Bastian wrote:
> It seems you are running out of shared memory and I suspect this to be a 
> freebsd specific problem somehow. Can anyone reproduce this on freebsd? 

Yes.  100% reproducible here.  I originally thought his problem
was not sufficiently allocating shm segments in his kernel config
which can cause this but it looks like this might be a bug in
KDE wrt FreeBSD.  Unfortunately my code was compiled without
debugging so I can't look further [this coupled with my lack of
use of Konsole.. maybe someday I'll switch but aterm has my heart
for now :)].

regards
-- 
wca
Comment 5 Jim Durham 2002-05-10 21:04:49 UTC
Waldo Bastian wrote:

> On Friday 10 May 2002 08:50 am Michael E. Beckish wrote:
> 
>>Package: konsole
>>Version: KDE 3.0.0 
>>Severity: normal
>>Installed from:    FreeBSD Ports
>>Compiler:          Not Specified
>>OS:                FreeBSD
>>OS/Compiler notes: Not Specified
>>
> 
>>When I log into KDE I can open maybe 2 or 3 Konsoles.  After that every
>>time I try to open a new Konsole it crashes.
>>
> 
>>kdeui (KPixmapIO): WARNING: Could not get shared memory segment.
>>KCrash: crashing.... crashRecursionCounter = 2
>>KCrash: Application Name = konsole path = <unknown> pid = 15104
>>
> 
>>One other thing:
>>This problem only seems to occur when I am using a transparent background
>>schema for Konsole.
>>
> 
> It seems you are running out of shared memory and I suspect this to be a 
> freebsd specific problem somehow. Can anyone reproduce this on freebsd? 
> 
> Cheers
> Waldo
> 

I just opened 15 consoles on KDE 3.0 on FreeBSD 4.5 on my laptop. No
problem.

-Jim
Comment 6 David Huttleston Jr 2002-05-10 21:19:37 UTC
Same here no probs.  Dell Inspiron 7500 laptop 
18 konsoles w tranparent shade to black ~80%
background image is Default_Blue.jpg

"uname -mrs" gives "FreeBSD 4.5-RELEASE i386"

Install Ports:
kde-3.0_1           
kdeaddons-3.0_1     
kdeartwork-3.0      
kdebase-3.0_1       
kdegames-3.0_1      
kdegraphics-3.0_2   
kdelibs-3.0_1       
kdemultimedia-3.0_1 
kdenetwork-3.0_1    
kdepim-3.0_1        
kdesdk-3.0_1        
kdetoys-3.0_1       
kdeutils-3.0        
koffice-1.1.11     

On Fri May 10 2002 at 05:04:49PM -0400 Jim Durham wrote:
> 
> I just opened 15 consoles on KDE 3.0 on FreeBSD 4.5 on my laptop. No
> problem.

-- 
David Huttleston Jr
7941 Tree Lane Suite 200
Madison WI 53717
Comment 7 Alan Eldridge 2002-05-10 23:14:22 UTC
On Friday 10 May 2002 16:40 Will Andrews wrote:
> On Fri May 10 2002 at 01:21:03PM -0700 Waldo Bastian wrote:
> > It seems you are running out of shared memory and I suspect this to be a
> > freebsd specific problem somehow. Can anyone reproduce this on freebsd?
>
> Yes.  100% reproducible here.  I originally thought his problem
> was not sufficiently allocating shm segments in his kernel config
> which can cause this but it looks like this might be a bug in
> KDE wrt FreeBSD.  Unfortunately my code was compiled without
> debugging so I can't look further [this coupled with my lack of
> use of Konsole.. maybe someday I'll switch but aterm has my heart
> for now :)].

Will I use a konsole with transparent background and I just opened up 10 =
of=20
them w/o a  problem. I do not have any special settings in /etc/sysctl.conf=
=20
nor do I have any special settings in my kernel config file.

I also have a hue-shift blended jpeg on top of a horizontal gradient=20
background. At the moment I have kmail this composer xmms and a konq=20
window open as well.

--=20
AlanE
Comment 8 Michael E. Beckish 2002-05-13 13:54:30 UTC
Bug #15463 seems to be the same problem (transparent konsole "Could not
get shared memory segment" error) except it is on Solaris instead of
freeBSD.

Mike
Comment 9 Stephan Binner 2002-09-23 19:48:06 UTC
*** Bug 48200 has been marked as a duplicate of this bug. ***
Comment 10 thebeast 2003-01-22 00:34:08 UTC
is anyone still seing this, possibly with newer version? :)

I
Comment 11 Bart Whiteley 2003-01-28 19:32:59 UTC
I'm still seeing this with 3.1 final on sparc/solaris8.  
Any time I set the schema to be transparent, it crashes.  
 
Comment 12 Bart Whiteley 2003-01-30 01:12:03 UTC
This behavior is dependent upon how much RAM the box has.  
I have one sparc/solaris8 box with 256 MB RAM, and transparencies 
core dump every time.  I've another sparc/solaris8 box with identical  
kde 3.1 binaries, but with 512MB RAM.  transparencies work fine with 512  
MB RAM.  
Comment 13 Karl Vogel 2003-02-08 14:33:25 UTC
This is a problem in kdelibs/kdeui/kpixmap.cpp. 
 
void KPixmapIO::initXImage(int w, int h) 
{ 
    if (d->ximage && (w == d->ximage->width) && (h == d->ximage->height)) 
        return; 
 
    createXImage(w, h); 
    int size = d->ximage->bytes_per_line * d->ximage->height; 
    if (size > d->shmsize) 
        createShmSegment(size); 
    d->ximage->data = d->shminfo->shmaddr; 
    return; 
} 
 
If createShmSegment() is unable attach the shm segment, then it sets m_bShm to false. In this 
case d->shminfo->shmaddr is not valid! So there needs to be a test written for this case. 
 
 
Konsole uses KRootPixmap::updateBackground() for the transparant background. So this is 
where you are experiencing the crash. 
 
Comment 14 Lubos Lunak 2003-02-14 09:48:14 UTC
Should be fixed now.