Description of problem: Printing fills /tmp with links like /tmp/4b4259ddc961b. In this particular case these are links to /etc/cups/ppd/HP-LaserJet-4250.ppd; one for every recent print job. It would be nice if cups would bother to clean after itself. AFAICT this started happening only after the recent cups update although an owner of this machine started to print on a printer different than before. Version-Release number of selected component (if applicable): cups-1.4.2-20.fc12.i686
The problem is in fact some CUPS client or other, perhaps the GTK+ print dialog, perhaps system-config-printer, perhaps something else. It would be really useful if you could pin-point exactly which application creates these files but does not delete them.
> It would be really useful if you could pin-point exactly Hm, I will try; but this may be not that obvious if you have not at least some ideas where to look. That particular machine from the original report is "remote" for me. OTOH I found somewhere else /tmp/4b3923aaed969 -> /etc/cups/ppd/lpn.ppd This is on a Fedora 11 machine with cups-1.4.2-20.fc11.x86_64 and a printing was done there which was later than a timestamp on this link. Maybe this ia actually somehow related to bug 541882? This is the same setup as the one from my comments in that bug and bug 550394.
The only things I can think of off-hand are the GTK+ print dialog, system-config-printer, possibly system-config-printer-applet, and any application that implements its own print dialog that talks directly to CUPS. Any application that uses libcups will end up creating these files when fetching a PPD for a queue. Even e.g. 'lpoptions -l' will do this -- although we can rule that one out to start with as it definitely cleans up afterwards. Yes, it's hard to track this sort of thing down.
Created attachment 382148 [details] strace with a test print from system-config-printer leaving a link in /tmp/ Well, this is not "exactly" but I managed to produce such leftover in /tmp using system-config-printer-1.1.15-6.fc11.x86_64 on Fedora 11 installation. A "printer" used here is a test one with a name of "t" and for DeviceURI using file:///var/tmp/out.ps configured as a "generic PostScript printer". After "Print Test Page" for this queue from s-c-p an alert "Submitted" shows up. Closed that leaves one only with "Cancel" option although the job was already printed. Most of the time after "Cancel" and "Quit" s-c-p exits cleanly and does 'unlink("/tmp/4b.....")' while at this as expected. Once it hanged out on me such that 'kill' was not good enough. It went away only after 'kill -9 ...'. That left me with /tmp/4b44f8df4d82f -> /etc/cups/ppd/t.ppd and the trace attached is from this event. This was from 'strace -ff ...' so children processes were recorded in separate files. I do not have a good explanation for this hang. A mechanism from the original report can be somewhat different; these "leftovers" were clearly produced by printing and not with s-c-p. OTOH there there are errors like those from bug 541882 so this may cause aborts before unlink is called. Does this help?
(In reply to comment #4) > Once it hanged out on me such that 'kill' was not good enough. It went away > only after 'kill -9 ...'. That left me with /tmp/4b44f8df4d82f -> > /etc/cups/ppd/t.ppd and the trace attached is from this event. This was from > 'strace -ff ...' so children processes were recorded in separate files. I do > not have a good explanation for this hang. Bizarrely, the strace doesn't show any SIGKILL signal being received, only a seemingly normal exit. I can see that it leaves the file there without cleaning it up, but I don't have any way of explaining that (other than that killing system-config-printer will leave temporary files around). I can't see any code path in system-config-printer that leaves temporary files around, but perhaps I'm looking in the wrong place.
> perhaps I'm looking in the wrong place. One of traces from children ends up with read(5, 0x1d4fcb4, 4096) = -1 EAGAIN (Resource temporarily unavailable) select(6, [5], NULL, [5], NULL) = ? ERESTARTNOHAND (To be restarted) --- SIGINT (Interrupt) @ 0 (0) --- but I do not see a smoking gun either. If you think that this is of interest I can attache those too. Maybe packed into a tar archive? There is still six of those. Sending job to a printer is needed for a link in question to show up. I think that I would wait for bug 541882 to be cleared to see what effects on this one will be. OTOH on a system I was experimenting with s-c-p I found another link of the same sort but this one created on "2009-12-28 14:31" (which is before the latest cups update). No guesses why this one is here. On a system printing on HP-LaserJet-4250 timestamps on lefover links are the same as on "c0*" files in /var/spool/cups/.
I have what it seems a reliable way to create lefover symlinks in /tmp using system-config-printer-1.1.15-6.fc12 and that indeed seems to related to bug 541882. I added the following section in /etc/cups/printers.conf: <Printer t> Info testing Location out here MakeModel HP LaserJet 4250 Foomatic/Postscript DeviceURI file:///var/tmp/out.ps State Idle StateTime 1262972202 Type 8400916 Filter application/vnd.cups-raw 0 - Filter application/vnd.cups-postscript 100 foomatic-rip Filter application/vnd.cups-pdf 0 foomatic-rip Filter application/vnd.apple-pdf 25 foomatic-rip Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer Attribute marker-colors none,none Attribute marker-levels 73,31 Attribute marker-names Black Cartridge HP Q5942X,Maintenance Kit HP 110V-Q5421A, 220V-Q5422A Attribute marker-types tonerCartridge,fuser Attribute marker-change-time 1262902702 </Printer> and started cups again. Now system-config-printer shows a printer "t", and one can "print" on it with expected, and correct, results. An attempt to check toner levels results in a backtrace familiar from bug 541882 and one is left with the next symlink pointing to /etc/cups/ppd/t.ppd. Traces from three processes resulting from this operation are attached. I wonder if it would be feasible to open that symlink, unlink it and use further on the resulting handle. Then on error that would disappear without any leftovers. Printing with 'lp -dt ...' or 'lpr -Pt ...' works fine but it does not create any links to /etc/cups/ppd/t.ppd. OTOH if the owner of a machine in question is using some kind of a GUI to print (I am not sure what he does) and that in turn goes into a trouble of checking toner levels behind the scene that could be a good reason why these symlinks multiply in /tmp. Just guessing here.
Created attachment 382515 [details] s-c-p attempting to check toner levels trace
Created attachment 382517 [details] trace from the first child of s-c-p above
Created attachment 382518 [details] trace from the second child of s-c-p above
An update to system-config-printer-1.1.16-6.fc12 and associated libraries (see bug 541882) unfortunately does not change anything here. I still can produce a leftover symlink in /tmp just by opening a configuration for an HP LaserJet 4250 printer; like the one from a comment #7 or a real one.
I've spotted the place that causes it. Thanks for helping out. Also affects Fedora 11.
system-config-printer-1.1.16-9.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/system-config-printer-1.1.16-9.fc11
system-config-printer-1.1.16-9.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/system-config-printer-1.1.16-9.fc12
(In reply to comment #12) > I've spotted the place that causes it. Thanks for helping out. There is a catch, though. I was able to create links in question with s-c-p but I noticed that originaly as leftovers from printing. I asked a system owner how he prints and he replied "usually I hit a <Print> button in xdvi or gv". I could not get replicate the issue with my "simulated printing". The guy is away for a while in this moment. I will see what will happen when he will be back.
system-config-printer-1.1.16-9.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0755
system-config-printer-1.1.16-9.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-0776
system-config-printer-1.1.16-11.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-0776
system-config-printer-1.1.16-11.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0755
system-config-printer-1.1.16-13.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0755
system-config-printer-1.1.16-13.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-0776
system-config-printer-1.1.16-13.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
system-config-printer-1.1.16-13.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.