CUPS 1.4 current SVN SIGSEGVs on Samba job submit #2600

Closed
michaelrsweet opened this Issue Nov 15, 2007 · 3 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Nov 15, 2007

Version: 1.3.4
CUPS.org User: cheyney

CUPS 1.4 current back through CUPS 1.3.4 crashes with a SIGSEGV
when it attempts to process a job submitted by Samba.

This bug report provides supplemental information to STR #2599
since the problem is reproducible in cups-1.4svn-r7061. The
other details are not provided here since they have already
been added to the other bug report.

Here's the stack trace for the segfault:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208658160 (LWP 20187)]
0x0045e153 in strlen () from /lib/libc.so.6
(gdb) where
#0 0x0045e153 in strlen () from /lib/libc.so.6
#1 0x0042e1e9 in vfprintf () from /lib/libc.so.6
#2 0x0044eb44 in vsnprintf () from /lib/libc.so.6
#3 0xb7fc1500 in cupsdLogMessage (level=9,
message=0xb7fd9dd4 "add_job(%p[%d], %p(%s), %p(%s/%s))") at log.c:268
#4 0xb7fa6f8e in add_job (con=0xb9b2db30, printer=0xb9b201c8, filetype=0x0)
at ipp.c:1275
#5 0xb7faea02 in create_job (con=0xb9b2db30, uri=0xb9b31670) at ipp.c:4912
#6 0xb7fa5b64 in cupsdProcessIPPRequest (con=0xb9b2db30) at ipp.c:497
#7 0xb7f90a87 in cupsdReadClient (con=0xb9b2db30) at client.c:2108
#8 0xb7fa4068 in main (argc=1, argv=0xbfac0544) at main.c:936

By #ifdef-ing out line 1275 of scheduler/ipp.c, CUPS works
without a segfault and prints normally:

--- ipp.c.orig 2007-11-15 20:34:33.000000000 +0000
+++ ipp.c 2007-11-15 20:30:43.000000000 +0000
@@ -1271,9 +1271,11 @@
int i; /* Looping var /
int lowerpagerange; /
Page range bound */

+#ifdef THISCRASHES
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
con, con->http.fd, printer, printer->name,
filetype, filetype->super, filetype->type);
+#endif

Since this problem was first discovered in CUPS 1.3.4 on Fedora 8,
the problem regresses back to that version at the least.

Please let me know when you can incorporate a fix for this into
the SVN mainline as well as a patch for earlier versions.

Thanks,

chris

Collaborator

michaelrsweet commented Nov 30, 2007

CUPS.org User: mike

Since the bug happens in 1.3.4, that's the version this bug should be against.

Dropping priority since it only happens at debug2 (which isn't recommended for production usage anyways...)

Collaborator

michaelrsweet commented Nov 30, 2007

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Nov 30, 2007

"str2600.patch":

Index: ipp.c

--- ipp.c (revision 7086)
+++ ipp.c (working copy)
@@ -1274,7 +1274,8 @@

cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
con, con->http.fd, printer, printer->name,

  •     filetype, filetype->super, filetype->type);
    
  •     filetype, filetype ? filetype->super : "none",
    
  •     filetype ? filetype->type : "none");
    

    /*

    • Check remote printing to non-shared printer...

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment