Bug 162846 - Application spawns repeatedly until system runs out of resources
Summary: Application spawns repeatedly until system runs out of resources
Status: RESOLVED DUPLICATE of bug 166190
Alias: None
Product: ksnapshot
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: FreeBSD Ports FreeBSD
: NOR crash
Target Milestone: ---
Assignee: Richard Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-30 00:20 UTC by Jamie
Modified: 2009-01-10 10:45 UTC (History)
3 users (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 Jamie 2008-05-30 00:20:16 UTC
Version:            (using KDE 3.5.9)
Installed from:    FreeBSD Ports
Compiler:          gnucc 
OS:                FreeBSD

Apparently, this problem has been reported, and closed here before.  Why closed?  The consensus seems to be that this is not a bug in the ksnapshot application itself, and therefore not a bug to be reported here.  However I disagree for the following reasons:

1)  This problem does not go away with a simple reboot.  The open instances of ksnapshot get saved in your KDE session, so when you open a fresh KDE session, it tries to open all those instances of ksnapshot again.  Regardless of how the problem of 2000 instances of ksnapshot getting launched in the first place is fixed, the worst part is that it gets saved in your KDE session.  This is the problem that has to be fixed either in the application, or in the way KDE saves its sessions.  I think fixing the application itself is far more appropriate here.

2)  While the application itself may not be responsible for launching itself over and over again, it needs to be hardened a bit so that it can not be so easily sent into such a state.

3)  Eventually, this will become a DOS attack.  I shudder to think that you can crash a system when not even logged on as root simply by leaning on the print screen button for a few seconds.  That has got to be the easiest way to crash a FreeBSD machine short of ctrl-alt-delete.

4)  This is a cross platform bug.  I'm not the only one.

5)  It took me 2+ hours of sshing from another machine invoking a killall every 30 seconds until it got done spawning.


There are several EASY ways to fix this.  The most obvious is to limit the number of instances it can launch at once.

The other is to make it so that ksnapshot does not get saved to your KDE session.  Can anyone think of a good reason why it should?  Who wants a screen shot every startup, automatically?


Please don't just close this bug.  It IS a bug, and it NEEDS to be fixed.
Comment 1 FiNeX 2008-05-30 13:18:40 UTC
How can I reproduce this bug?
Comment 2 Jamie 2008-05-30 19:48:14 UTC
I'm not sure how it happened to me in the first place, but I think it had something to do with my KVM switch using the print screen button to switch PCs.  Somehow, the machine received several hundred buffered printscreen commands, I think.  Other people have reported having this problem just from using shift and control at the same time.

I guess you could just launch KDE and hold down print screen for a minute.  Once you have launched several hundred instances of ksnapshot, it becomes hard to kill them all and get out of KDE without it saving those instances of ksnapshot to your session profile.

Next time you open KDE, it will try to launch those instances again.

Hope that helps.


Jamie 

-----Original Message-----
From: owner@bugs.kde.org [mailto:owner@bugs.kde.org] On Behalf Of FiNeX
Sent: Friday, May 30, 2008 7:19 AM
To: Campbell Jamie
Subject: [Bug 162846] Application spawns repeatedly until system runs out of resources

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
         
http://bugs.kde.org/show_bug.cgi?id=162846         
finex finex org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |finex finex org



------- Additional Comments From finex finex org  2008-05-30 13:18 -------
How can I reproduce this bug?


Comment 3 Jamie 2008-06-09 21:56:17 UTC
I have had the unfortunate opportunity to reproduce this bug.  On my system, it happens whenever I press PrintScreen twice in quick succession.  This is a common KVM hotkey.  So, earlier today, I pressed PrintScreen twice instead of scroll lock, forgetting that I had changed my KVM hotkey to Scroll Lock, and ksnapshot spawned hundreds of instances.  I had to ssh in from another machine again and run killall over and over again.  

So, to reproduce this, try hitting print screen twice, in quick succession.

Thanks,


Jamie
Comment 4 Brad Hards 2008-10-24 11:02:12 UTC

*** This bug has been marked as a duplicate of bug 166190 ***
Comment 5 Dorian Raymer 2009-01-10 00:35:05 UTC
This happened to me while running Kubuntu in a VirtualBox Machine on Mac OSX 10.5.

I was able to avoid a crash by moving the ksnapshot bin file, causing whatever was spawning it to fail:
# mv /usr/bin/ksnapshot ~/STOPksnapshot


If you can kill from the terminal every 30secs...you might want to do this instead;)

Hope this helps.

-Dorian
Comment 6 FiNeX 2009-01-10 10:45:27 UTC
@Dorian, you should write your comment #5 on the bug #166190. This bug has been marked as dup of it.