Bug 134292 - Printjobs in eggcups notification window not clearing out.
Summary: Printjobs in eggcups notification window not clearing out.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: desktop-printing
Version: rawhide
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Colin Walters
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 135786 FC4Target
TreeView+ depends on / blocked
 
Reported: 2004-10-01 00:34 UTC by Jef Spaleta
Modified: 2007-11-30 22:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-25 05:28:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
tcpdump on client to printerserver port 631 (5.73 KB, application/octet-stream)
2004-10-18 13:56 UTC, Jef Spaleta
no flags Details
tcpdump on client to printerserver port 631 with a small printjob sent over. (200.74 KB, application/octet-stream)
2004-10-20 01:35 UTC, Jef Spaleta
no flags Details
eggcups -d --sm-disable 1>/tmp/eggcups.log 2>&1 (5.41 KB, text/plain)
2004-10-21 00:34 UTC, Jef Spaleta
no flags Details
/etc/cups/cupsd.conf on cups server (21.10 KB, text/plain)
2004-10-21 00:35 UTC, Jef Spaleta
no flags Details
/etc/dbus-1/system.d/cups.conf on cups server (460 bytes, text/plain)
2004-10-21 00:35 UTC, Jef Spaleta
no flags Details
strace -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1 (296.55 KB, text/plain)
2004-10-22 02:19 UTC, Jef Spaleta
no flags Details
strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1 (319.56 KB, text/plain)
2004-10-23 04:06 UTC, Jef Spaleta
no flags Details
[user@box ~]$ eggcups -d --sm-disable 1>/tmp/eggcups.debuglog 2>&1 (235 bytes, text/plain)
2004-10-27 08:22 UTC, Need Real Name
no flags Details
[user@box ~]$ strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1 (124.29 KB, application/octet-stream)
2004-10-27 08:23 UTC, Need Real Name
no flags Details
strace -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1 after desktop-printing-0.17-4 installation (435.62 KB, text/plain)
2004-11-22 02:58 UTC, Jef Spaleta
no flags Details
strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1 for desktop-printing-0.17-4 (295.75 KB, text/plain)
2004-11-23 00:30 UTC, Jef Spaleta
no flags Details
strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1 for desktop-printing-0.17-5 (562.74 KB, text/plain)
2004-11-23 23:00 UTC, Jef Spaleta
no flags Details

Description Jef Spaleta 2004-10-01 00:34:41 UTC
Description of problem:
1) Printing to cups printer available on the network.

2) Printjob is sent and prints

3)the gnome notification printer icon appears

4)clicking on the applet brings up the status window.

5)Printjob physically completes on the remote printer but the status
window never updates the printjob as completed and continues to show
the status as Sending.

6)selecting the printjob and choosing to cancel document from the edit
menu of the status window doesn't clear the printjob.

Version-Release number of selected component (if applicable):
desktop-printing-0.15-1


Expected results:
When the printjob is physically completed the status show change.
and I should be able to cancel and clear all printjobs listed in the
status window.


-jef"by the way, default printer preference works equally well as the
native per application printer chooser dialog in everything i test
including this little bugaboo"spaleta

Comment 1 Colin Walters 2004-10-01 00:57:34 UTC
5) Can you surf to http://printserver:631/printers and see whether it
picked up on the print job status?

6) Yes...it currently doesn't change until it confirms from the remote
end it was actually cancelled.  In retrospect it would have been nice
to say "Cancelling..." but I already promised the nice GNOME i18n guys
I wouldn't change any more strings.

Comment 2 Colin Walters 2004-10-01 00:59:26 UTC
Oh, and:

> I should be able to cancel and clear all printjobs listed in the
> status window.

Do you have a particular reason for wanting to clear them?  We thought
about having print jobs just go away automatically after 3 days or
something.  My feeling is that most people log in and out often enough
that it should clear their print list.

Comment 3 Jef Spaleta 2004-10-01 01:25:30 UTC
comment #1

5) cant surf to the remote printer server. Should that be a
requirement to be able to print to that printer? 

comment #2

a particular reason? Lets just say there are certain sensitive filenames
that i'm not particularly interested in other people might happen to
see because its sitting in the status list. Sensitive because it might
be sensitive data because i work at a .gov.  Or it might be sensitive
because the file name is off-color or adult oriented and I dont
necessarily want other people to see the name of the file i printed
sitting in the list.

-jef


Comment 4 Colin Walters 2004-10-06 21:35:10 UTC
5) You need to be able to reach the printer via IPP, which goes over
HTTP.  Can you do: telnet server 631 ?


Comment 5 Colin Walters 2004-10-06 21:57:35 UTC
If that doesn't work, some tcpdump output would be useful.

tcpdump -s 0 -w ~/tcpdump.log 'host myprintserver and port 631'

Comment 6 Jef Spaleta 2004-10-18 13:52:02 UTC
Re: comment #4
telnet server 631  doesn't connect.
attached is the tcpdump.log on http and telnet attempts to 631

I'll repeat all this again when i'm physically at the boxes to make
sure it is still printing.  


Comment 7 Jef Spaleta 2004-10-18 13:56:03 UTC
Created attachment 105377 [details]
tcpdump on client to printerserver port 631

Comment 8 Colin Walters 2004-10-18 18:34:24 UTC
From the tcpdump output, it looks like you were using Firefox to browse to the
port.  Can you capture the output of printing something (small :)) and let
eggcups appear, and wait a few seconds?  Then I should be able to see what IPP
requests eggcups is doing.

Alternatively, you could: strace -s 200 -p $(pidof eggcups) >/tmp/eggcups.log 2>&1

Comment 9 Jef Spaleta 2004-10-20 01:33:40 UTC
Re: comment #8

I did a new tcpdump active while i sent a 1 page document to the cups
server from gedit. waiting a few seconds after the print job was done
for eggcups to update...nothing. Then tried to browse to the 631 port
on the cups server and got a forbidden. The print job goes through
just fine, but eggcups status isnt updating, still shows "Sending"

New attachment in a minute....

-jef

Comment 10 Jef Spaleta 2004-10-20 01:35:26 UTC
Created attachment 105484 [details]
tcpdump on client to printerserver port 631   with a small printjob sent over.

Comment 11 Colin Walters 2004-10-20 20:11:44 UTC
Hmm.  Do you have control over the CUPS server?  If so can you attach
its configuration?

It looks to me like eggcups is requesting status about the print job,
but isn't getting anything back.  Then something (I guess it must be
eggcups) tries to request status on /, which is forbidden.  I'm not
sure why that would happen.

How did you set up this printer?  Is it picked up automatically via
local network CUPS broadcast?  Or did you add it with
system-config-printers as a local printer?  Something else?

Comment 12 Jef Spaleta 2004-10-20 20:33:08 UTC
"Do you have control over the CUPS server?"
Its an fc2 fully updated desktop under my complete control and subject
to my every whim. Well at least while my wife isn't actively using it.
As far as configurations go, the system hasnt been tweak far from the
defaults for an fc2 workstation install.

"If so can you attach its configuration?"
Which configuration files do you want exactly from the server? I
configured the printer via the system-config-printer dialog on the
cups server. 




"Then something (I guess it must be eggcups) tries to request status
on /, which is forbidden"
That was probably me being stupid and trying to surf via a webbrowser
to http://server:631/ again after the print job finished and before i
shutdown the tcpdump log.

"How did you set up this printer?"
system-config-printer on the server, setup as a local parallel port
printer.

"Is it picked up automatically via local network CUPS broadcast?"
yes, on the client machine its being picked up as a Browsed que, when
I examine the printer listings in s-c-printer.


Comment 13 Colin Walters 2004-10-20 21:48:14 UTC
I just want the cups.conf.  That should list the access control on the server.

Have you ever used system-config-printer on your client system?

Also, can you run gnome-session-properties and remove eggcups from your session,
and then from a terminal, run:

eggcups -d --sm-disable 1>/tmp/eggcups.log 2>&1

And just print something, then attach eggcups.log here.

Comment 14 Jef Spaleta 2004-10-21 00:33:44 UTC
Uhm cups.conf? as in /etc/dbus-1/system.d/cups.conf?
i would have thought you would want /etc/cups/cupsd.conf 
I'll attach both just to save time.

along with the eggcups.log

-jef

Comment 15 Jef Spaleta 2004-10-21 00:34:24 UTC
Created attachment 105566 [details]
 eggcups -d --sm-disable 1>/tmp/eggcups.log 2>&1

Comment 16 Jef Spaleta 2004-10-21 00:35:04 UTC
Created attachment 105567 [details]
/etc/cups/cupsd.conf  on cups server

Comment 17 Jef Spaleta 2004-10-21 00:35:40 UTC
Created attachment 105568 [details]
/etc/dbus-1/system.d/cups.conf on cups server

Comment 18 Colin Walters 2004-10-21 17:36:24 UTC
[0x8813dd8] [ec_job_model_job_sent_remote] ec-job-model.c:585 (20:32:24): no job
for local 3 remote 27

Now we're getting closer.  This means that eggcups couldn't find the job on the
remote server.  The typical reason for this is a permissions problem, but your
remote cupsd.conf looks OK (Although I'm not sure why you have "Deny from All"
and "Allow from All" in the config for Canon).

One more thing: can you do:

strace -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1

and then print something and attach the eggcups.strace here.

Hopefully we'll get to the bottom of this :)

Comment 19 Jef Spaleta 2004-10-22 02:19:25 UTC
Created attachment 105628 [details]
strace -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1

Comment 20 Colin Walters 2004-10-22 17:24:02 UTC
Ok, here are the relevant messages:

read(19,
"l\4\1\0\220\0\0\0r\0\0\0\2\0\0\0\1o\0\0\32\0\0\0/com/redhat/PrinterSpooler\0\2s\0\0\0\31\0\0\0com.redhat.PrinterSpooler\0\3s\17\0\0\0JobQueuedRemote\0\10s\0\0\6\0\0\0ssuuss\0\7s\0\0\0\5\0\0\0:1.93\0\0\0\0\0\0\0s\0\0\0*\0\0\0ipp://karen.localdomain:631/printers/Canon\0s\r\0\0\0successful-ok\0u\0\4\0\0\0u\0\0\0\34\0\0\0s\0\0\0\10\0\0\0jspaleta\0s\0\0\5\0\0\0Canon\0",
2048) = 258
read(19, 0x8f58738, 2048)               = -1 EAGAIN (Resource temporarily
unavailable)
clone(child_stack=0xf68fb4c8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED,
parent_tidptr=0xf68fbbf8, {entry_number:6, base_addr:0xf68fbbb0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,
useable:1}, child_tidptr=0xf68fbbf8) = 27800

From here we can see that we're getting the JobQueuedRemote dbus signal from the
 cups server, and we create a thread to retrieve the job data from the server. 
But it doesn't look like the calls from the other thread are in the strace. 
Could you try rerunning with:

strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1

The -fF tells strace to follow threads.

Comment 21 Jef Spaleta 2004-10-23 04:06:37 UTC
Created attachment 105685 [details]
strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1

Comment 22 Need Real Name 2004-10-25 08:52:03 UTC
I also have the problem of finished print jobs remaining in the "print status"
window.
Both jobs are shown as "sending". Both have finished printing, one of them 2
days 19 hours ago.

Comment 23 Colin Walters 2004-10-25 18:53:16 UTC
Jef: I am baffled, honestly.  I don't understand why a POST to / is happening;
it should be to /printers/Canon.  I can see from your earlier debug output that
the correct printer URI is being retrieved.

redhat.uk: can you attach the same debug info that Jef did?  Remove
eggcups from your session as in comment 13, then get the output of:
eggcups -d --sm-disable 1>/tmp/eggcups.debuglog 2>&1
# Do a print job, wait till you see eggcups flash, then Ctrl-C it
strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1
# Do another print job, wait till you see eggcups flash, then Ctrl-C it

Comment 24 Colin Walters 2004-10-25 21:05:18 UTC
Ok, actually - it looks to me like a POST to / is normal; my mistake.

If you guys change your CUPS configuration like so:

<Location />
Order Deny,Allow
Allow From All
</Location>

does it work as expected?

Comment 25 Need Real Name 2004-10-27 08:16:44 UTC
I tried comment #24, then ran a service cups restart.
Same problem.

The Status is still shown as "Sending".

I'll follow the request from comment #23.

Comment 26 Need Real Name 2004-10-27 08:22:46 UTC
Created attachment 105828 [details]
[user@box ~]$ eggcups -d --sm-disable 1>/tmp/eggcups.debuglog 2>&1

Comment 27 Need Real Name 2004-10-27 08:23:06 UTC
Created attachment 105829 [details]
[user@box ~]$ strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1

Comment 28 Colin Walters 2004-10-29 04:04:04 UTC
redhat.uk: Did you remove the existing eggcups from your session?
The debug log shows you already had one running.

Jef: Can you also confirm that allowing POST to / for all clients doesn't help
you either?

Comment 29 Jef Spaleta 2004-10-29 04:25:41 UTC
<Location />
Order Deny,Allow
Allow From All
</Location>

on the server and a cups service restart later....
my eggcups printjob on the client desktop shows status complete
a few seconds after the job is actually done. 

Now...give me my history flush.. or I'll tell slashdot that you
allowed this status bug to exist. 

-jef

Comment 30 Colin Walters 2004-10-29 04:32:48 UTC
Tim - The default CUPS configuration denys POST to /, which prevents eggcups
from getting status updates on jobs.

Do you know what the security implications of allowing this would be?  Would
anyone on the network be able to e.g. cancel jobs?



Comment 31 Need Real Name 2004-10-29 08:21:16 UTC
> Did you remove the existing eggcups from your session?
Yes. I ran eggcups -d --sm-disable 1>/tmp/eggcups.log 2>&1

I just tried it again. The log says the same.

Comment 32 Tim Waugh 2004-10-29 08:38:04 UTC
Concerning 'Location /' permissions: the documentation suggests that
this location is for 'get' operations and so shouldn't be too harmful
to open up.  I don't think it would allow anyone external to cancel jobs.

However, I'm not sure that allowing everyone on the network to view
your currently printing jobs is entirely desirable either.  But I
suppose that's what eggcups needs?

Comment 33 Need Real Name 2004-10-29 08:43:23 UTC
Can't eggcups be fixed instead? Rather than letting anyone look at
print jobs on my computer? Just asking.

Comment 34 Colin Walters 2004-10-29 15:49:33 UTC
Tim: Yes, eggcups needs to be able to retrieve the job status.  What you really
want of course is only for users who submitted a job to be able to retrieve its
status.  The only way I can think of to implement this sanely is Kerberos. 
Which we don't have yet :/

We should at least relnote this, that the default cups configuration doesn't
allow print job monitoring to work.

Although - I wonder if it would work if I hacked eggcups to use the printer URI
for POST instead of /.  Let me try that.



Comment 35 Colin Walters 2004-10-29 16:18:57 UTC
Well, there is a /jobs namespace that cups provides.  If I change eggcups to use
that, then I get prompted for a password with the office CUPS setup.  This may
just be a misconfiguration of our office CUPS server though.

Tim: Any opinion?

Comment 37 Colin Walters 2004-11-01 21:25:25 UTC
Ok, it is going to be hard to change it to use the printer URI.  I'll see if I
can do it though.

Comment 38 Colin Walters 2004-11-02 20:27:29 UTC
Ok, I took a stab at this.  Can you guys try:

Binary:
http://people.redhat.com/walters/desktop-printing-0.17-4.i386.rpm
Source:
http://eople.redhat.com/walters/desktop-printing-0.17-4.src.rpm

Be sure to revert your CUPS configuration to the default.

Comment 39 Need Real Name 2004-11-15 16:05:08 UTC
I'm afraid I can't test the rpm right now, python is behaving weirdly.
Will test when I can.

Comment 40 Colin Walters 2004-11-16 18:56:08 UTC
Jef - do you think you could try the RPM?  It's also in rawhide.

Comment 41 Jef Spaleta 2004-11-21 17:48:55 UTC
sorry i was a way at a conference for a week. I should be able to test
this sometime today while the other machine isn't in use. 

Just to be clear, you want me to install the desktop-printing package
on one of my fc3 or fc2 client computer while talking to a stock cups
server running on fc2?

-jef

Comment 42 Jef Spaleta 2004-11-22 02:51:31 UTC
Well your not going to like the results
I reverted the fc2 cups server back to the default cupsd.conf
restarted the cups service
and i installed the  desktop-printing-0.17-4.i386.rpm on the fc3
client and then logged into the fc3 desktop
sent a printjob via gedit to the remote printer
document print status is still stuck at Sending...even though the
printjob has completed... no obvious change from the user perspective.

I'll do it again and produce an strace to attach.


-jef

Comment 43 Jef Spaleta 2004-11-22 02:58:40 UTC
Created attachment 107157 [details]
strace -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1  after  desktop-printing-0.17-4 installation

Comment 44 Colin Walters 2004-11-22 18:12:51 UTC
Hm, can you redo that with -fF too?

Comment 45 Jef Spaleta 2004-11-23 00:30:43 UTC
Created attachment 107268 [details]
strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1 for desktop-printing-0.17-4

Comment 46 Colin Walters 2004-11-23 19:23:27 UTC
Man, I suck.  I added the patch to the package, but forgot to actually apply it.
Can you try this?

http://people.redhat.com/walters/desktop-printing-0.17-5.i386.rpm

Comment 47 Jef Spaleta 2004-11-23 22:59:25 UTC
:->
desktop-printing-0.17-5.i386.rpm seems to have worked the gui dialog
changed from status printing to status completed. I'll attached the
strace log for completeness for you to inspect.

-jef"now... back to my real complaint...being able to flush the list
of completed printjobs from the dialog"spaleta
 



Comment 48 Jef Spaleta 2004-11-23 23:00:49 UTC
Created attachment 107353 [details]
 strace -fF -s300 eggcups --sm-disable 1>/tmp/eggcups.strace 2>&1 for desktop-printing-0.17-5

Comment 49 Jef Spaleta 2004-11-24 22:35:51 UTC
Colin,
I'm getting ready to move my fc2 machine running the remote cups
server over to fc3, unless you need me to do more specifically about
this issue. If this isn't resolved to your satifaction I can do more
testing 
against the same fc2 machine to avoid complicating the testing scenario.
So just let me know if I need to do anything else.

-jef

Comment 50 Colin Walters 2004-11-25 05:28:47 UTC
Ok, let's go ahead and close this bug; please open separate ones about
other issues such as cancellation not working (I think you mentioned
that).

Comment 51 Matthew Saltzman 2004-12-03 20:33:38 UTC
I just tried desktop-printing-0.17-5.i386.rpm from Rawhide and it did
not fix the problem for me.  The job completed 10 minutes ago, but is
still listed in the printer applet as "Unknown" document (it did have
a file name), "?" size, and "Sending" status.  The applet flashed
briefly when it appeared, but stopped after a second or so (after
spooling completed?).

The target printer was an HP network printer's IPP interface, not
another Linux/CUPS box.

FWIW, I like the old apparent behavior where the applet disappeared if
there was nothing in the queue.  Also, I tend to stay logged in for
long periods of time on machines under my physical control.  It would
be nice not to have to look at this artifact.

Comment 52 Matthew Saltzman 2004-12-04 00:36:45 UTC
I tried printing to an FC2 CUPS system, and I see the correct behavior
now.  The icon greys out and the submitted job shows with the correct
information: filename, printer-queue, size, age, and status (Completed). 

My remarks in Comment #51 still apply for a non-FC IPP queue.  Haven't
tried other types of queues yet.

Comment 53 Colin Walters 2004-12-06 17:55:02 UTC
Matthew: can you open a new bug, and attach the strace data like in
Comment 20 to it?  A new bug would be nice because I think the main
issue in this bug has been fixed (eggcups not working with the default
CUPS config), and I'd like to track your issue separately.

Comment 54 Matthew Saltzman 2004-12-06 19:18:22 UTC
OK See 142015.

Comment 55 Gregory Harris 2004-12-15 14:46:08 UTC
The print jobs also do not clear out of the eggcups notification
window for me.  After applying the rawhide rpm listed above, the
status says "printing", then it changes to unknown.  This is also on
fedora core 3.  I notice in my logs that FC3 is attempting to access
the status every few minutes and I see the lines:

D [15/Dec/2004:08:43:13 -0600] ReadClient() 30 POST /printers/q626
HTTP/1.1
E [15/Dec/2004:08:43:13 -0600] get_job_attrs: job #15214 doesn't exist!
D [15/Dec/2004:08:43:13 -0600] Sending error: client-error-not-found
D [15/Dec/2004:08:43:13 -0600] ProcessIPPRequest: 30 status_code=406

In the log.

Comment 56 Gregory Harris 2004-12-15 14:53:28 UTC
Ah wait, think I may have solved my own problem.  I think this depends
on the "Preserve Job History" option being set in the cupsd.conf file.
 Flipping that on makes the printer grey out after the job has been
completed.

Okay, now the real kicker is to be able to clear the list so the jobs
don't rack up.  We at the University of Kansas, Department of
Mathematics have confidential government projects being printed and
require this feature.  Most of our faculty members involved in these
projects stay logged in for months at a time.  Our userbase is
approximately 200 people.

Comment 57 Colin Walters 2004-12-16 19:45:37 UTC
Ok, in desktop-printing-0.18-1, I just added a new menu item
"Edit->Clear Completed Documents".  This should address the other
complaint in this bug about sensitive documents.  There is another bug
if that you never log out, the list just accumulates; I plan to
address that by automatically clearing completed documents after 1 day.



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