You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ipptool (really ipptool-static) on Linux (CentOS6 x86_64, manually compiled ipptool) to check printer queue (Canon iR3225) like this:
DEVICE_URI="ipp://printerhostname/ipp"
IPPTOOL="ipptool"
IPPTOOL_GET_QUEUED_JOB_COUNT='
{
NAME "Get queued job count using Get-Printer-Attributes"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
STATUS successful-ok
DISPLAY queued-job-count
But despite using "-T 10" ipptool process hanged for 18 hours in http_read function. Even restarting a printer did not help as ipptool does not use TCP SO_KEEPALIVE.
Please enable SO_KEEPALIVE for ipptool connections by default or at least add an option to enable it.
Here's a backtrace from hanging process:
#0 0x00007f0236302b12 in __libc_recv (fd=, buf=0x7f02387601e1, n=8, flags=)
at ../sysdeps/unix/sysv/linux/x86_64/recv.c:30
#1 0x00007f023674ea6f in recv (http=0x7f023875bab0, buffer=0x7f02387601e1 "\003", length=8)
at /usr/include/bits/socket2.h:45
#2 http_read (http=0x7f023875bab0, buffer=0x7f02387601e1 "\003", length=8) at http.c:4079 #3 0x00007f023674f571 in httpRead2 (http=0x7f023875bab0, buffer=0x7f02387601e1 "\003", length=)
at http.c:2129
#4 0x00007f023675891f in ipp_read_http (http=0x7f023875bab0, buffer=, length=8) at ipp.c:6834 #5 0x00007f02367592bd in ippReadIO (src=0x7f023875bab0, cb=0x7f02367588b0 <ipp_read_http>, blocking=1,
parent=<value optimized out>, ipp=0x7f023875ef60) at ipp.c:2999
#6 0x00007f023675f73b in cupsGetResponse (http=0x7f023875bab0, resource=) at request.c:402 #7 0x00007f0236744753 in do_tests (outfile=, vars=0x7fff05dbf320,
testfile=0x7fff05dc2d1d "/dev/stdin") at ipptool.c:2577
#8 0x00007f02367494f4 in main (argc=6, argv=0x7fff05dc0ab8) at ipptool.c:670
I'm attaching a compressed core file (from CentOS 6.6 x86_64 with all updates until today) - it may help with debugging this.
The text was updated successfully, but these errors were encountered:
Version: 2.0.0
CUPS.org User: tometzky
I'm using ipptool (really ipptool-static) on Linux (CentOS6 x86_64, manually compiled ipptool) to check printer queue (Canon iR3225) like this:
DEVICE_URI="ipp://printerhostname/ipp"
IPPTOOL="ipptool"
IPPTOOL_GET_QUEUED_JOB_COUNT='
{
NAME "Get queued job count using Get-Printer-Attributes"
OPERATION Get-Printer-Attributes
}
'
$IPPTOOL -c -T 10 "$DEVICE_URI" /dev/stdin <<< "$IPPTOOL_GET_QUEUED_JOB_COUNT"
queued-job-count
0
But despite using "-T 10" ipptool process hanged for 18 hours in http_read function. Even restarting a printer did not help as ipptool does not use TCP SO_KEEPALIVE.
Please enable SO_KEEPALIVE for ipptool connections by default or at least add an option to enable it.
Here's a backtrace from hanging process:
#0 0x00007f0236302b12 in __libc_recv (fd=, buf=0x7f02387601e1, n=8, flags=)
#1 0x00007f023674ea6f in recv (http=0x7f023875bab0, buffer=0x7f02387601e1 "\003", length=8)
#2 http_read (http=0x7f023875bab0, buffer=0x7f02387601e1 "\003", length=8) at http.c:4079
#3 0x00007f023674f571 in httpRead2 (http=0x7f023875bab0, buffer=0x7f02387601e1 "\003", length=)
#4 0x00007f023675891f in ipp_read_http (http=0x7f023875bab0, buffer=, length=8) at ipp.c:6834
#5 0x00007f02367592bd in ippReadIO (src=0x7f023875bab0, cb=0x7f02367588b0 <ipp_read_http>, blocking=1,
#6 0x00007f023675f73b in cupsGetResponse (http=0x7f023875bab0, resource=) at request.c:402
#7 0x00007f0236744753 in do_tests (outfile=, vars=0x7fff05dbf320,
#8 0x00007f02367494f4 in main (argc=6, argv=0x7fff05dc0ab8) at ipptool.c:670
I'm attaching a compressed core file (from CentOS 6.6 x86_64 with all updates until today) - it may help with debugging this.
The text was updated successfully, but these errors were encountered: