[Bug 512220] Re: cupsd crash Closing on unknown HTTP state 0
Hi ! I enabled a greater debug level. It seems that cups try to write to a client while the connection is already closed. Here the log before the crash : Returning IPP successful-ok for Get-Job-Attributes (ipp://fichdc:631/printers/AL-C3800_cdi) from 172.16.1.23 cupsdProcessIPPRequest: ippLength(response)=352 cupsdAddSelect(fd=24, read_cb=0x7f8860956d60, write_cb=0x7f8860956720, data=0x7f8861d6c8f0) select_timeout(0): 26 seconds to write dirty config/state files cupsdReadClient(con=0x7f8861d6c8f0(24)) con-http.error=0 con-http.used=0, con-http.state=7 con-data_encoding=HTTP_ENCODE_LENGTH, con-data_remaining=352, con-file=-1 cupsdReadClient: 24 Closing on EOF cupsdCloseClient: 24 cupsdSetBusyState: newbusy=Dirty files, busy=Active clients and dirty files cupsdRemoveSelect(fd=24) cupsdWriteClient(con=0x7f8861d6c8f0(1642895136)) response=(nil)(-1), file=-1 pipe_pid=0 state=0 cupsdWriteClient: 1587435144 Closing on unknown HTTP state 1641466080 First cups open the client for reading on file descriptor 24 : cupsdAddSelect(fd=24 ... select_timeout(0): 26 seconds... Then Cups read from client (why ?) on fd=24 : cupsdReadClient(con=0x7f8861d6c8f0(24) cupsdReadClient: 24 Closing on EOF Finally cups close the connection : cupsdCloseClient: 24 cupsdSetBusyState: newbusy=Dirty files, busy=Active clients and dirty files cupsdRemoveSelect(fd=24) But just after cups try to write again on the same connection con=0x7f8861d6c8f0 where all the structure is nil ! cupsdWriteClient(con=0x7f8861d6c8f0(1642895136)) response=(nil)(-1), file=-1 pipe_pid=0 state=0 cupsdWriteClient: 1587435144 Closing on unknown HTTP state 1641466080 Everything in less than 1 second. Difficult to understand for me what cups trying to do... Baptiste. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/512220 Title: cupsd crash Closing on unknown HTTP state 0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/512220/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 512220] Re: cupsd crash Closing on unknown HTTP state 0
Here the full log concerning the connection con=0x7f8861d6c8f0 that made the crash. Baptiste. ** Attachment added: cups_write_bug.txt https://bugs.launchpad.net/ubuntu/+source/cups/+bug/512220/+attachment/4124153/+files/cups_write_bug.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/512220 Title: cupsd crash Closing on unknown HTTP state 0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/512220/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 512220] Re: cupsd crash Closing on unknown HTTP state 0
I think that I understand more precisely the bug. I will comment the above log where the client make two request : - It request the printer attributes and next - the job attributes The first request works, the second crash. ### The first request ### 1) The client query the printer attributes (... read request data from client ... and next ) cupsdReadClient: 24 2.0 Get-Printer-Attributes 1 cupsdProcessIPPRequest(0x7f8861d6c8f0[24]): operation_id = 000b Get-Printer-Attributes ipp://fichdc:631/printers/AL-C3800_cdi get_printer_attrs(0x7f8861d6c8f0[24], ipp://fichdc:631/printers/AL-C3800_cdi) ... 2) CUPS query the printer attributes and write it in a struct copy_attrs(to=0x7f886185bbe0, from=0x7f8861ee47e0, ra=0x7f8861d4b0d0, group=0, quickcopy=0) copy_attribute(0x7f886185bbe0, 0x7f8861973c60[marker-colors,4,42]) copy_attribute(0x7f886185bbe0, 0x7f8861973cf0[marker-levels,4,21]) ... copy_attribute(0x7f886185bbe0, 0x7f8862000780[operations-supported,4,23]) Returning IPP successful-ok for Get-Printer-Attributes (ipp://fichdc:631/printers/AL-C3800_cdi) from 172.16.1.23 3) Cups write the attributes to the client cupsdProcessIPPRequest: ippLength(response)=2153 cupsdAddSelect(fd=24, read_cb=0x7f8860956d60, write_cb=0x7f8860956720, data=0x7f8861d6c8f0) select_timeout(0): 26 seconds to write dirty config/state files cupsdWriteClient(con=0x7f8861d6c8f0(24)) response=0x7f886185bbe0(0), file=-1 pipe_pid=0 state=7 ... cupsdWriteClient(con=0x7f8861d6c8f0(24)) response=0x7f886185bbe0(2), file=-1 pipe_pid=0 state=7 ### The second request ### 1) The client query the job attribute (... read request data from client ... and next ) cupsdReadClient: 24 2.0 Get-Job-Attributes 1 cupsdProcessIPPRequest(0x7f8861d6c8f0[24]): operation_id = 0009 Get-Job-Attributes ipp://fichdc:631/printers/AL-C3800_cdi get_job_attrs(0x7f8861d6c8f0[24], ipp://fichdc:631/printers/AL-C3800_cdi) 2) CUPS query the job attributes and write it in a struct copy_attrs(to=0x7f8861d5a390, from=0x7f8861d49af0, ra=0x7f8861d4b0d0, group=2, quickcopy=0) copy_attribute(0x7f8861d5a390, 0x7f8861d49d70[job-originating-user-name,2,42]) copy_attribute(0x7f8861d5a390, 0x7f8861d5f260[job-media-sheets-completed,2,21]) Returning IPP successful-ok for Get-Job-Attributes (ipp://fichdc:631/printers/AL-C3800_cdi) from 172.16.1.23 3) BUT instead of WRITE the result to the client CUPS do a READ : cupsdProcessIPPRequest: ippLength(response)=352 cupsdAddSelect(fd=24, read_cb=0x7f8860956d60, write_cb=0x7f8860956720, data=0x7f8861d6c8f0) select_timeout(0): 26 seconds to write dirty config/state files cupsdReadClient(con=0x7f8861d6c8f0(24)) con-http.error=0 con-http.used=0, con-http.state=7, con-data_encoding=HTTP_ENCODE_LENGTH, con-data_remaining=352, con-file=-1 cupsdReadClient: 24 Closing on EOF cupsdCloseClient: 24 We see that in the cupsdReadClient call the con-data_remaining=352 correspond to the size of the attributes retourned by the Get-Job- Attributes process. Strange no ? Baptiste. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/512220 Title: cupsd crash Closing on unknown HTTP state 0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/512220/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 512220] Re: cupsd crash Closing on unknown HTTP state 0
Hi, @Johannes and Daniel Maybe we can search what we have in common ? 1) Are your printers shared upon multiple printer servers ? (windows 2003, debian linux in my case) 2) Do you use a special authentification system ? (samba4 winbind in my case) I attach the log of two recent bugs if it can help. ** Attachment added: cup_bug.tar.gz https://bugs.launchpad.net/ubuntu/+source/cups/+bug/512220/+attachment/4076884/+files/cup_bug.tar.gz -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/512220 Title: cupsd crash Closing on unknown HTTP state 0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/512220/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 512220] Re: cupsd crash Closing on unknown HTTP state 0
@johannes: Why do you thinks about a logrotate problem ? In my case, the last crash happened 2 hours after to log have been rotated. The last job : AL-M7000_prof user1 247 [24/Mar/2014:09:10:07 +0100] 1 1 - 172.16.1.15 TF etude - - AL-M7000_prof user1 248 [24/Mar/2014:09:10:26 +0100] 1 1 - 172.16.1.15 TF etude 1 - - AL-M7000_prof user1 248 [24/Mar/2014:09:10:34 +0100] total 1 - 172.16.1.15 TF etude 1 - - AL-M7000_prof user1 249 [24/Mar/2014:09:10:43 +0100] 1 1 - 172.16.1.15 TF etude 2 - - AL-M7000_prof user1249 [24/Mar/2014:09:11:19 +0100] total 3 - 172.16.1.15 TF etude 2 - - AL-M7000_prof user1250 [24/Mar/2014:09:11:28 +0100] 1 1 - 172.16.1.15 TF etude 3 - - AL-M7000_prof user1250 [24/Mar/2014:09:11:36 +0100] total 1 - 172.16.1.15 TF etude 3 - - AL-M7000_prof user1251 [24/Mar/2014:09:11:45 +0100] 1 1 - 172.16.1.15 verif - - AL-M7000_prof user1251 [24/Mar/2014:09:12:13 +0100] total 3 - 172.16.1.15 verif - - The last log file : I [24/Mar/2014:07:35:01 +0100] Listening to 0.0.0.0:631 (IPv4) I [24/Mar/2014:07:35:01 +0100] Listening to [v1.::]:631 (IPv6) .. D [24/Mar/2014:09:12:21 +0100] cupsdReadClient: 19 WAITING Closing on EOF D [24/Mar/2014:09:12:21 +0100] cupsdCloseClient: 19 D [24/Mar/2014:09:12:21 +0100] cupsdSetBusyState: newbusy=Active clients, busy=Active clients D [24/Mar/2014:09:12:21 +0100] cupsdReadClient: 18 Closing on EOF D [24/Mar/2014:09:12:21 +0100] cupsdCloseClient: 18 D [24/Mar/2014:09:12:21 +0100] cupsdSetBusyState: newbusy=Active clients, busy=Active clients D [24/Mar/2014:09:12:21 +0100] cupsdWriteClient: -282160320 Closing on unknown HTTP state 0 D [24/Mar/2014:09:12:21 +0100] cupsdCloseClient: -343906872 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/512220 Title: cupsd crash Closing on unknown HTTP state 0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/512220/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 512220] Re: cupsd crash Closing on unknown HTTP state 0
Hi, Same problem on Debian Wheezy with cups 1.5.3. So it is not a ubuntu specific issue. There is no need to access cups by http to reproduce the problem. For me sending a job can produce the crash. Thanks. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/512220 Title: cupsd crash Closing on unknown HTTP state 0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/512220/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs