Comment 6 for bug 936647

Revision history for this message
Ulf Rompe (rompe) wrote :

I just compiled parallel.c with debug symbols, installed it and spooled a test page. After it reached the endless loop, I attached gdb to the process and got this backtrace:

#0 0x00007f20b4d26a93 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f20b56901bd in run_loop (print_fd=0, device_fd=5, use_bc=0, update_state=1) at parallel.c:629
#2 0x00007f20b568f8bd in main (argc=6, argv=0x7fff1e9353d8) at parallel.c:261

Stepping through the program shows this loop:

run_loop (print_fd=0, device_fd=5, use_bc=0, update_state=1) at parallel.c:663
663 continue;
614 FD_ZERO(&input);
615 if (!print_bytes)
616 FD_SET(print_fd, &input);
617 if (use_bc)
619 if (!print_bytes)
620 FD_SET(CUPS_SC_FD, &input);
622 FD_ZERO(&output);
623 if (print_bytes)
626 timeout.tv_sec = 5;
627 timeout.tv_usec = 0;
629 if (select(nfds, &input, &output, NULL, &timeout) < 0)
655 if (FD_ISSET(CUPS_SC_FD, &input))
662 side_cb(print_fd, device_fd, use_bc);
side_cb (print_fd=0, device_fd=5, use_bc=0) at parallel.c:797
797 {
804 datalen = sizeof(data);
806 if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
807 return (-1);
851 }

This snippet repeats forever.