Bug 10863 - desktop-print-management-applet gets restarted in an infinite loop
: desktop-print-management-applet gets restarted in an infinite loop
Status: CLOSED TRACKEDINBUGSTER
Product: gnome
printing
: dev_121
: i86pc/amd64 OpenSolaris
: P1 critical
: ---
Assigned To: Ghee Teo
: QA alias for GNOME > Printing
:
: BugsterCR=6875773
:
:
:
  Show dependency treegraph
 
Reported: 2009-08-23 16:25 UTC by Sebastien Roy
Modified: 2009-10-10 18:35 UTC (History)
11 users (show)

See Also:


Attachments
dtrace script to show processes being executed (4.92 KB, application/octet-stream)
2009-08-23 16:25 UTC, Sebastien Roy
no flags Details
p0 patch to fix the problem (486 bytes, patch)
2009-08-28 16:58 UTC, Ghee Teo
no flags Details | Diff
put the attached to /usr/bin (2.20 KB, application/octet-stream)
2009-09-04 16:52 UTC, Ghee Teo
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Sebastien Roy 2009-08-23 16:25:25 UTC
Created an attachment (id=2483) [details]
dtrace script to show processes being executed

After an image-update to OpenSolaris build 121, my Gnome notification area in
the panel starts twitching.  It looks like something in the notification area
is coming and going faster than the eye can keep up with.  Sure enough, the
following processes are being executed in an infinite loop:

38917 148592 148591 /usr/bin/svcprop -C -p general/active
cups/scheduler:default
38917 101707      1 /usr/perl5/bin/perl
/usr/bin/desktop-print-management-applet
38917 148594 101707 sh -c /usr/bin/svcprop -C -p general/active
cups/scheduler:default 2>/dev/null
38917 148595 148594 /usr/bin/svcprop -C -p general/active
cups/scheduler:default
38917 148596 101707 /bin/sh /usr/lib/lp/bin/desktop-print-management-applet
38917 148596 101707 /usr/lib/ospm/ospm-applet

I used the attached "execsnoop" dtrace script (obtained from Darren Kenny) for
this.
Comment 1 Sebastien Roy 2009-08-23 22:57:10 UTC
If I enable CUPS, the system is equally hobbled, as the infinite exec loop
turns into:

38917   2642   1558 sh -c /usr/bin/svcprop -C -p general/active
cups/scheduler:default 2>/dev/null
38917   2639   1558 /usr/bin/sh
/usr/lib/cups/bin/desktop-print-management-applet
38917   2639   1558 /usr/bin/sh
/usr/lib/cups/bin/desktop-print-management-applet
38917   1558   1243 /usr/perl5/bin/perl
/usr/bin/desktop-print-management-applet
38917   2642   1558 /usr/bin/svcprop -C -p general/active
cups/scheduler:default
38917   2643   1558 /usr/bin/sh
/usr/lib/cups/bin/desktop-print-management-applet

... and on and on.
Comment 2 Sebastien Roy 2009-08-23 23:08:37 UTC
Starting the applet by hand revealed that it was trying to execute
/usr/lib/system-config-printer/system-config-printer-applet in a tight loop
even though that file doesn't exist.  Installing SUNWcups-manager fixed the
problem.

I'm not sure if a missing package dependency exists, but even if there isn't,
the print management applet should not go into a death spiral like this when it
can't find executables on the system.  This resulted in my laptop
overheating...
Comment 3 Ghee Teo 2009-08-25 10:23:03 UTC
Alas. This is a bug assuming all the printing commands both CUPS and LP are on
the system. Unfortunately, SUNWcups-manager are not install by default on
OpenSolaris. The /usr/bin/desktop-print-management-applet script which runs the
command depending on print system should also check for the presence of the
command before excve it.
Comment 4 Ghee Teo 2009-08-28 13:53:19 UTC
Can use this to workaround the problem for now.

mv /usr/bin/desktop-print-management-applet
/usr/bin/desktop-print-management-applet.orig
ln -s /usr/sbin/print-service /usr/bin/desktop-print-management-applet
Comment 5 Ghee Teo 2009-08-28 13:56:25 UTC
The problem doesn't seem to have caused by not having undefined SMF manifest.
It seems like /usr/bin/desktop-print-management-applet just does not exit when
user logout and keep spawning. In fact when the user is login, it doesn't spawn
and work correctly. Need to figure why it does not exit in the first place.
Comment 6 Ghee Teo 2009-08-28 16:58:40 UTC
Created an attachment (id=2541) [details]
p0 patch to fix the problem

su 
cd /usr/bin
gpatch -p0 < applet.patch

This should fix the problem.
Comment 7 Ghee Teo 2009-08-28 17:01:49 UTC
I am tracking this bug in bugster which is where the consolidation uses. It is
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6875773
Comment 8 Ghee Teo 2009-08-31 10:04:32 UTC
*** Bug 11035 has been marked as a duplicate of this bug. ***
Comment 9 Willie Walker 2009-09-03 13:44:11 UTC
*** Bug 10889 has been marked as a duplicate of this bug. ***
Comment 10 Ghee Teo 2009-09-04 16:52:16 UTC
Created an attachment (id=2581) [details]
put the attached to /usr/bin

the attached is the fixed /usr/bin/desktop-print-management-applet.