Closed Nils-TUD closed 2 years ago
Hi @Nils-TUD ,
what crypto library do you use with CUPS? The implementation of _httpTLSStop depends on used crypto library.
Additionally it would be great if you installed debuginfo packages for glibc and cups related packages (names depends on your distro) and provided the backtrace with debuginfo installed.
In case you need to print urgently, switching to plain ipp should work.
Thank you in advance!
Hi @zdohnal,
I've now rebuilt CUPS with debug infos and obtained symbols for the glibc via debuginfod. Now the backtrace is a bit more helpful:
(gdb) bt full
#0 0x00007f43b61fdc60 in main_arena () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00007f43b62aa15a in _httpTLSStop (http=0x563bac628800) at /usr/src/debug/cups-2.4.2/cups/tls-openssl.c:1152
context = 0x563bac6c5200
#2 0x00007f43b628ee59 in httpReconnect2 (http=http@entry=0x563bac628800, msec=msec@entry=30000, cancel=cancel@entry=0x0) at http.c:2357
addr = <optimized out>
#3 0x00007f43b62a6718 in cupsSendRequest (http=http@entry=0x563bac628800, request=request@entry=0x563bac705b60,
resource=resource@entry=0x7ffca4a16f50 "/ipp/print", length=length@entry=346) at request.c:635
status = 32764
got_status = <optimized out>
state = <optimized out>
expect = <optimized out>
date = "\377\377\377\377\377\377\377\377\240\327b\254;V\000\000\027\000\000\000\000\000\000\000V\243'\266C\177\000\000\377\377\377\377\377\377\377\377\304䠤\374\177\000\000`[p\254;V\000\000Ǣ'\266C\177", '\000' <repeats 11 times>, "\265x1i\245Gr\377\377\377\377\000\000\000\000\200\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000\000\265x1i\245Gr\360_o\254;V\000\000\200\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000\000\265x1i\245Gr\360_o\254;V\000\000\200\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000\377\377\377\377\000\000\000\000\360_o\254;V\000\000Po\241\244\374\177\000\000`[p\254;V\000\000\363\310\t"...
digest = <optimized out>
#4 0x00007f43b62a6acc in cupsDoIORequest (http=http@entry=0x563bac628800, request=request@entry=0x563bac705b60,
resource=resource@entry=0x7ffca4a16f50 "/ipp/print", infile=infile@entry=-1, outfile=outfile@entry=-1) at request.c:203
response = <optimized out>
length = 346
status = <optimized out>
fileinfo = {st_dev = 94814295197696, st_ino = 139928795656856, st_nlink = 94814295197696, st_mode = 3056122961, st_uid = 32579,
st_gid = 2762040900, __pad0 = 32764, st_rdev = 94814295197696, st_size = 140723070494224, st_blksize = 139928795665793, st_blocks = 4294967296,
st_atim = {tv_sec = 858993459201, tv_nsec = 3275364211029339904}, st_mtim = {tv_sec = 2305957858374477132, tv_nsec = 8028075770728756274},
st_ctim = {tv_sec = 482922278766, tv_nsec = 0}, __glibc_reserved = {0, 0, 0}}
bytes = <optimized out>
buffer = '\000' <repeats 9544 times>...
#5 0x00007f43b62a6e65 in cupsDoRequest (http=http@entry=0x563bac628800, request=request@entry=0x563bac705b60,
resource=resource@entry=0x7ffca4a16f50 "/ipp/print") at request.c:293
No locals.
#6 0x0000563babe2b70a in main (argc=6, argv=0x7ffca4a1bca8) at ipp.c:2067
i = <optimized out>
send_options = <optimized out>
num_options = 0
options = 0x0
device_uri = <optimized out>
scheme = "ipp", '\000' <repeats 251 times>
hostname = "EPSON482791.local", '\000' <repeats 1006 times>
resource = "/ipp/print", '\000' <repeats 1013 times>
addrname = "[v1.fe80::e2bb:9eff:fe48:2791+enp0s31f6]", '\000' <repeats 215 times>
optptr = <optimized out>
name = <optimized out>
value = <optimized out>
sep = <optimized out>
password_tries = 0
addrlist = <optimized out>
snmp_enabled = <optimized out>
snmp_fd = <optimized out>
start_count = 406
page_count = 0
have_supplies = 1
num_files = 0
files = 0x0
compatfile = 0x0
compatsize = 0
port = 631
uri = "ipp://EPSON482791.local:631/ipp/print", '\000' <repeats 986 times>
--Type <RET> for more, q to quit, c to continue without paging--
print_job_name = '\000' <repeats 1023 times>
http_status = <optimized out>
ipp_status = <optimized out>
http = <optimized out>
request = 0x563bac705b60
response = <optimized out>
supported = 0x563bac6f7d50
start_time = <optimized out>
contimeout = <optimized out>
delay = 1
prev_delay = 0
compression = 0x0
waitjob = <optimized out>
waitjob_tries = 0
waitprinter = <optimized out>
monitor = {uri = 0x7ffca4a17350 "ipp://EPSON482791.local:631/ipp/print", hostname = 0x7ffca4a16b50 "EPSON482791.local",
user = 0x7ffca4a1c870 "hrniels", resource = 0x7ffca4a16f50 "/ipp/print", port = 631, version = 20, job_id = 1, job_reasons = 0, create_job = 1,
get_job_attrs = 1, job_name = 0x7ffca4a1c878 "Home - CUPS 2.4.2", encryption = HTTP_ENCRYPTION_IF_REQUESTED, job_state = IPP_JSTATE_PROCESSING,
printer_state = IPP_PSTATE_PROCESSING, retryable = 1}
job_id_attr = <optimized out>
job_id = <optimized out>
job_sheets = <optimized out>
job_state = <optimized out>
compression_sup = <optimized out>
copies_sup = 0x563bac6f6270
cups_version = 0x0
encryption_sup = <optimized out>
format_sup = <optimized out>
job_auth = <optimized out>
media_col_sup = 0x563bac6f7da0
operations_sup = <optimized out>
doc_handling_sup = 0x0
printer_state = <optimized out>
printer_accepting = <optimized out>
print_color_mode_sup = 0x563bac6f7470
create_job = 1
get_job_attrs = 1
send_document = <optimized out>
validate_job = <optimized out>
validate_retried = <optimized out>
copies = <optimized out>
copies_remaining = 0
content_type = <optimized out>
final_content_type = <optimized out>
document_format = <optimized out>
fd = <optimized out>
bytes = 0
buffer = "\377\377\377\200\377\377\377\200\377\377\377\200\377\377\377\200\377\377\377\200\377\377\377\200\377\377\377\200\377\377\377\320\377\377\377\375\376\376\376\001\375\375\375\373\373\373\377\372\372\372\003\370\370\370\365\365\365\361\361\361\355\355\355\377\351\351\351\002\344\344\344\337\337\337\334\334\334\377\326\326\326\000\323\323\323\337\377\377\377\374xxx\200\377\377\377\362\377\377\377\033d\316\000\000\000dsnd\000\000\017\240\001\000ǀ\377\377\377\330\377\377\377\001\320\320\320\325\325\325\377\332\332\332\002\335\335\335\343\343\343\346\346\346\377\353\353\353\003\360\360\360\362\362\362\365\365\365\370\370\370\377\373\373\373\001\374\374\374\375\375\375\377\376\376\376\200\377\377\377\200\377\377\377\200\377\377\377\200\377\377\377\200\377\377\377\200\377\377\377"...
action = {__sigaction_handler = {sa_handler = 0x563babe2f6f0 <sigterm_handler>, sa_sigaction = 0x563babe2f6f0 <sigterm_handler>}, sa_mask = {
__val = {16384, 0 <repeats 15 times>}}, sa_flags = 0, sa_restorer = 0x0}
version = 20
ppd = 0x0
pc = 0x0
input = {fds_bits = {0 <repeats 16 times>}}
That also answers your other question: I'm using openssl, apparently :)
@Nils-TUD It looks like a stale "tls" pointer - the OpenSSL code isn't clearing it like the GNU TLS code.
Try the following fix:
[master c0c403744] Fix OpenSSL crash bug - "tls" pointer wasn't cleared after freeing it (Issue #409)
Yes, that fixes the problem for me. Thanks!
Since I upgraded to CUPS 2.4.2, the IPP backend crashes every time after the print is complete. Therefore, I need to manually cancel the job and resume the printer afterwards. I just downgraded to 2.4.1 again and there it still works.
That's the output from
coredumpctl gdb
:uname -a
: