Bug 113010

Summary: Unable to add printers via HTTP interface
Product: [Retired] Red Hat Raw Hide Reporter: Felipe Alfaro Solana <felipe_alfaro>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED CANTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: robert2, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-18 19:29:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
access_log from cups after trying to add a printer via HTTP interface
none
error_log from cups after trying to add a printer via HTTP interface
none
strace of the cupsd process before trying to add a new printer via HTTP interface
none
/etc/pam.d/system-auth
none
config-printer request in cups-1.1.19-8
none
config-printer request in cups-1.1.20-2 none

Description Felipe Alfaro Solana 2004-01-07 11:03:58 UTC
Description of problem: 
----------------------- 
When invoking the add a printer functionality using cups HTTP 
interface, the cups server crashes. 
 
Version-Release number of selected component (if applicable): 
cups-1.1.20-1 
 
How reproducible: 
----------------- 
Always 
 
Steps to Reproduce: 
------------------- 
1. Make sure the cups server has been started by running "service 
cups start" 
2. Open up a Web browser window locally. 
3. Navigate to URL http://localhost:631 
4. From the CUPS main web page, click on the "Do Administration 
Tasks" link 
5. To access the previous link, you'll need to authenticate as root. 
6. From the "Admin on localhost" page, click on the "Add Printer" 
link beneath the "Printers" section. 
7. You'll see an error page with the following text: 
 
An error occurred while loading 
http://localhost:631/admin/?op=add-printer: 
 
Connection to localhost is broken 
 
8. The cups server has crashed. 
   
Actual results: 
--------------- 
I'm unable to add printers to CUPS using the HTTP web interface. 
 
Expected results: 
----------------- 
CUPS shouldn't crash when trying to add a printer using the HTTP 
interface. 
 
Additional info: 
---------------- 
Before trying to reproduce the crash, I modified 
"/etc/cups/cupsd.conf" and set the "LogLevel" parameter to "debug2". 
Attached to this bug report there are two files: 
 - access_log 
 - error_log 
Both files do contain the logs of a cleanly installed cups server 
when performing the steps mentioned above.

Comment 1 Felipe Alfaro Solana 2004-01-07 11:05:04 UTC
Created attachment 96798 [details]
access_log from cups after trying to add a printer via HTTP interface

Comment 2 Felipe Alfaro Solana 2004-01-07 11:05:42 UTC
Created attachment 96799 [details]
error_log from cups after trying to add a printer via HTTP interface

Comment 3 Tim Waugh 2004-01-07 12:58:49 UTC
I can't seem to reproduce this here. :-/

Please try running 'strace -fp 734' (or whatever PID cupsd has)
shortly before clicking 'Add printer', and attach the output here.

Comment 4 Felipe Alfaro Solana 2004-01-07 15:35:52 UTC
Created attachment 96805 [details]
strace of the cupsd process before trying to add a new printer via HTTP interface

rawhide up2date machine
kernel 2.6.0-rc2
zebra is running
IPv6 support is enabled and working fine
cupsd pristine configuration with two printers added via system-config-printer
tool

Comment 5 Tim Waugh 2004-01-07 17:53:03 UTC
What's in your /etc/pam.d/system-auth file?

Comment 6 Felipe Alfaro Solana 2004-01-07 19:38:43 UTC
Created attachment 96810 [details]
/etc/pam.d/system-auth

Yeah! I forgot to mention I was using Kerberos V authentication.

Comment 7 Tim Waugh 2004-01-08 12:12:35 UTC
Is it possible for you to recompile the CUPS packages from the
1.1.20-1 src.rpm file?  I'd like you to make a change to the spec
file: remove the line that says '%patch16 -p1 -b .pie'.  That way
we'll be able to look at what cupsd is up to in the debugger.

Comment 8 Felipe Alfaro Solana 2004-01-10 00:11:11 UTC
OK, Now, I've got cups-1.1.20-2 installed with no program 
independent code support (i.e. no -fPIE gcc flag during build). 
 
What do you want me to do next? 

Comment 9 Felipe Alfaro Solana 2004-01-10 00:16:51 UTC
Curiously, after removing PIE support, cupsd doesn't crash anymore 
when trying to add a printer via the Web interface but instead turns 
itself into a CPU hog, wasting tons of CPU cycles with no apparent 
effect. 
 
Once cupsd goes wild, the HTTP interface stops responding and the 
cupsd daemon stops serving requests. 
 
Aditionally, an "strace" of the cupsd process shows nothing at all. 

Comment 10 Robert van den Aker 2004-02-04 23:35:51 UTC
I believe my problem is somewhat similar; therefore I add it to this
bug. I get random delays, error messages, and mangled requests when I
do a POST to a password protected Location (/admin) in cups-1.1.20-2
(rebuilt on RH 7.2/Alpha). It might have something to do with
cups/auth.c, which was added in CUPS 1.1.20, since I didn´t have any
problems with cups-1.1.19-8. Also, the problems go away if I comment
out the AuthType and AuthClass lines for the /admin Location.
I´ll attach "before" and "after" log snippets for a config-printer
request in cups-1.1.19-8 and cups-1.1.20-2. cupsd.conf was not changed
before, during or after the upgrade. You´ll note that config-printer
works flawlessly in 1.1.19-8, but produces errors, long delays (for
the ´gimp-print´ printer, a short delay for the ´hpijs´ printer), and
mangled requests (random ppd noise) in 1.1.20-2.

Comment 11 Robert van den Aker 2004-02-04 23:39:30 UTC
Created attachment 97479 [details]
config-printer request in cups-1.1.19-8

Comment 12 Robert van den Aker 2004-02-04 23:40:43 UTC
Created attachment 97480 [details]
config-printer request in cups-1.1.20-2

Comment 13 Tim Waugh 2004-02-05 09:16:52 UTC
Robert: if you do not have krb5 enabled in your /etc/pam.d/system-auth
file, please file a separate bug report.

Comment 14 Robert van den Aker 2004-02-05 11:43:47 UTC
I do not have krb5 enabled and have opened a new bug, #114999.

Comment 15 Tim Waugh 2004-02-05 11:46:23 UTC
Thanks.

*This* bug is in libkrb5 I think.

Comment 16 Nalin Dahyabhai 2004-02-06 22:00:00 UTC
I can't reproduce this here (krb5 1.3.1-7, pam_krb5 2.0.4-1/2.0.5-1,
cups 1.1.20-2, kernel-smp 2.6.1-1.65).

Comment 17 Tim Waugh 2004-02-07 11:30:15 UTC
Nalin: you added the pam_krb5.so lines to system-auth?

I was able to produce a busy-loop (corrupted linked list had a cycle)
inside libkrb5 using that set-up.

Comment 18 Nalin Dahyabhai 2004-02-09 18:26:17 UTC
Yes, I even set up a test realm so that I could have a principal named
"root", and the administration tool asked for printer information at
the point where cupsd should have crashed.  Is there a version skew
somewhere between my test system and the original bug reporter's (or
yours)?

Comment 19 Bill Nottingham 2006-08-08 01:44:57 UTC
'Red Hat Raw Hide' refers to the development tree for Red Hat Linux.
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Red Hat apologizes that these issues were not resolved in a more
timely manner. However, we do want to make sure that important 
don't slip through the cracks. If these issues are still present
in a current release, such as Fedora Core 5, please move these
bugs to that product and version. Note that any remaining Red Hat
Raw Hide bugs will be closed as 'CANTFIX' on September 30, 2006.
Thanks again for your help.


Comment 20 Bill Nottingham 2006-10-18 19:29:57 UTC
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.