[cups] cupsd 2.0.3 SIGSEGV on Solaris SPARC 64bit

Matthias Apitz guru at unixarea.de
Fri Jan 22 00:54:14 PST 2016


Hello,

We have ported our large system for library automatization from Solaris
32bit to 64bit (using the gcc flag -m64). It took us nearly half a year
to get all issue fixed which have been mostly caused by bad C-code assuming that
a pointer and an integer are of the same size of 4 bytes, which is true on
32bit, but not true anymore on 64bit where a pointer has 8 byte. Saying
bad code, means that, for example, one says:

   char *p = f();

without declaring the function f() before as returning a pointer; if you miss
this declaration out the compiler must think that f() returns only a 4 byte integer
and the char *p gets filled wrong (which depends a bit of the compiler).

I say this, because I now have exactly such crashes with cupsd, see
below a concrete situation where the browser is contacting port 631.

Has someone here from the list the cupsd compiled for 64 bit?


In error_log it says:
 
D [22/Jan/2016:09:08:43 -0100] [Client 1] Accepted from localhost:46529 (IPv4)
D [22/Jan/2016:09:08:43 -0100] [Client 1] Waiting for request.
D [22/Jan/2016:09:08:43 -0100] [Client 1] GET / HTTP/1.1
D [22/Jan/2016:09:08:43 -0100] cupsdSetBusyState: newbusy="Active clients", busy
="Not busy"
D [22/Jan/2016:09:08:43 -0100] [Client 1] Read: status=200
D [22/Jan/2016:09:08:43 -0100] [Client 1] No authentication data provided.
D [22/Jan/2016:09:08:43 -0100] [Client 1] Processing GET /
D [22/Jan/2016:09:08:43 -0100] [Client 1] filename="/usr/local/sisis-pap/cups2/s
hare/doc/cups/index.html", type=text/html

and truss shows this:

pollsys(0x100193620, 3, 0x00000000, 0x00000000) (sleeping...)
pollsys(0x100193620, 3, 0x00000000, 0x00000000)	= 1
time()						= 1453450271
accept(7, 0x100197FB8, 0xFFFFFFFF7FFFF638, SOV_DEFAULT) = 11
setsockopt(11, tcp, TCP_NODELAY, 0xFFFFFFFF7FFFF63C, 4, SOV_DEFAULT) = 0
fcntl(11, F_SETFD, 0x00000001)			= 0
write(5, 0x100179E58, 79)			= 79
   D   [ 2 2 / J a n / 2 0 1 6 : 0 9 : 1 1 : 1 1   - 0 1 0 0 ]   [
   C l i e n t   1 ]   A c c e p t e d   f r o m   l o c a l h o s
   t : 4 6 7 1 9   ( I P v 4 )\n
getsockname(11, 0xFFFFFFFF7FFFF808, 0xFFFFFFFF7FFFF804, SOV_DEFAULT) = 0
write(5, 0x100179E58, 63)			= 63
   D   [ 2 2 / J a n / 2 0 1 6 : 0 9 : 1 1 : 1 1   - 0 1 0 0 ]   [
   C l i e n t   1 ]   W a i t i n g   f o r   r e q u e s t .\n
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
pollsys(0x100193620, 4, 0xFFFFFFFF7FFFF900, 0x00000000) = 1
time()						= 1453450271
pollsys(0xFFFFFFFF7FFF1DE8, 1, 0xFFFFFFFF7FFF1D20, 0x00000000) = 1
pollsys(0xFFFFFFFF7FFF1D38, 1, 0xFFFFFFFF7FFF1C70, 0x00000000) = 1
recv(11, " G E T   /   H T T P / 1".., 2048, 0)	= 416
time()						= 1453450271
write(5, 0x100179E58, 57)			= 57
   D   [ 2 2 / J a n / 2 0 1 6 : 0 9 : 1 1 : 1 1   - 0 1 0 0 ]   [
   C l i e n t   1 ]   G E T   /   H T T P / 1 . 1\n
write(5, 0x100179E58, 92)			= 92
   D   [ 2 2 / J a n / 2 0 1 6 : 0 9 : 1 1 : 1 1   - 0 1 0 0 ]   c
   u p s d S e t B u s y S t a t e :   n e w b u s y = " A c t i v
   e   c l i e n t s " ,   b u s y = " N o t   b u s y "\n
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
time()						= 1453450271
write(5, 0x100179E58, 59)			= 59
   D   [ 2 2 / J a n / 2 0 1 6 : 0 9 : 1 1 : 1 1   - 0 1 0 0 ]   [
   C l i e n t   1 ]   R e a d :   s t a t u s = 2 0 0\n
write(5, 0x100179E58, 75)			= 75
   D   [ 2 2 / J a n / 2 0 1 6 : 0 9 : 1 1 : 1 1   - 0 1 0 0 ]   [
   C l i e n t   1 ]   N o   a u t h e n t i c a t i o n   d a t a
     p r o v i d e d .\n
write(5, 0x100179E58, 59)			= 59
   D   [ 2 2 / J a n / 2 0 1 6 : 0 9 : 1 1 : 1 1   - 0 1 0 0 ]   [
   C l i e n t   1 ]   P r o c e s s i n g   G E T   /\n
lstat("/usr/local/sisis-pap/cups2/share/doc/cups/en_US/", 0xFFFFFFFF7FFF3088) Err#2 ENOENT
lstat("/usr/local/sisis-pap/cups2/share/doc/cups/en/", 0xFFFFFFFF7FFF3088) Err#2 ENOENT
lstat("/usr/local/sisis-pap/cups2/share/doc/cups/", 0xFFFFFFFF7FFF3088) = 0
lstat("/usr/local/sisis-pap/cups2/share/doc/cups/index.html", 0xFFFFFFFF7FFF3088) = 0
open("/usr/local/sisis-pap/cups2/share/doc/cups/index.html", O_RDONLY|O_LARGEFILE) = 12
brk(0x10019C790)				= 0
brk(0x1001A0790)				= 0
fcntl(12, F_GETFD, 0xFFFFFFFFFFFFFFFF)		= 0
fcntl(12, F_SETFD, 0x00000001)			= 0
read(12, " < ! D O C T Y P E   H T".., 4096)	= 2361
read(12, 0x10019B418, 4096)			= 0
lseek(12, 0, SEEK_SET)				= 0
read(12, " < ! D O C T Y P E   H T".., 4096)	= 2361
read(12, 0x10019B418, 4096)			= 0
lseek(12, 0, SEEK_SET)				= 0
read(12, " < ! D O C T Y P E   H T".., 4096)	= 2361
read(12, 0x10019B418, 4096)			= 0
close(12)					= 0
write(5, 0x100179E58, 122)			= 122
   D   [ 2 2 / J a n / 2 0 1 6 : 0 9 : 1 1 : 1 1   - 0 1 0 0 ]   [
   C l i e n t   1 ]   f i l e n a m e = " / u s r / l o c a l / s
   i s i s - p a p / c u p s 2 / s h a r e / d o c / c u p s / i n
   d e x . h t m l " ,   t y p e = t e x t / h t m l\n
    Incurred fault #6, FLTBOUNDS  %pc = 0xFFFFFFFF7D33C7F0
      siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
    Received signal #11, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
-- 
Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/  ☎ +49-176-38902045
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5



More information about the cups mailing list