Forum Bugs

prince command hangs (Ubuntu 10.04 64bit)

kclair
When i place an image tag in the html that I am sending through prince that has the full url with the hostname, prince enters an infinite loop. When the html source has only references to filesystem paths, everything is fine.

I had a similar problem before on a different 64bit ubuntu install, but it was a little different. Firstly, it was printing an error about not being able to resolve the hostname, and secondly it was fixed by installing the 32bit libs.

I have now tried the following packages, all with the same result:
Generic / 64-bit, dynamic prince-8.0-linux-amd64.tar.gz
Generic / 64-bit, static prince-8.0-linux-amd64-static.tar.gz
Ubuntu 10.04 / 64-bit prince_8.0-1ubuntu10.04_amd64.deb

They all install without any errors.

Whenever I try to strace the process, I always get it too late, by the time it is already in its looping state. What I see with strace is this over and over, infinitely:
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515765, 318171511}) = 0
clock_gettime(CLOCK_MONOTONIC, {515765, 318218782}) = 0
clock_gettime(CLOCK_MONOTONIC, {515765, 318277034}) = 0
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515766, 319496426}) = 0
clock_gettime(CLOCK_MONOTONIC, {515766, 319656837}) = 0
clock_gettime(CLOCK_MONOTONIC, {515766, 319846890}) = 0
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515767, 321421253}) = 0
clock_gettime(CLOCK_MONOTONIC, {515767, 321608884}) = 0
clock_gettime(CLOCK_MONOTONIC, {515767, 321795017}) = 0
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515768, 323136307}) = 0
clock_gettime(CLOCK_MONOTONIC, {515768, 323176550}) = 0
clock_gettime(CLOCK_MONOTONIC, {515768, 323231400}) = 0
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515769, 324648384}) = 0
clock_gettime(CLOCK_MONOTONIC, {515769, 324829619}) = 0
clock_gettime(CLOCK_MONOTONIC, {515769, 325012580}) = 0
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515770, 326473863}) = 0
clock_gettime(CLOCK_MONOTONIC, {515770, 326516026}) = 0
clock_gettime(CLOCK_MONOTONIC, {515770, 326572241}) = 0
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515771, 327988761}) = 0
clock_gettime(CLOCK_MONOTONIC, {515771, 328031656}) = 0
clock_gettime(CLOCK_MONOTONIC, {515771, 328083604}) = 0
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515772, 329544519}) = 0
clock_gettime(CLOCK_MONOTONIC, {515772, 329682296}) = 0
clock_gettime(CLOCK_MONOTONIC, {515772, 329727358}) = 0
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {515773, 331159813}) = 0
clock_gettime(CLOCK_MONOTONIC, {515773, 331340680}) = 0
clock_gettime(CLOCK_MONOTONIC, {515773, 331524069}) = 0
mikeday
Do you get this behaviour with every remote image, or only images from a particular host? Is it a HTTP URL or a HTTPS URL? Presumably the page renders fine in a web browser?
kclair
Ugh, nevermind! The issue turned out to be that the web server I was running was single-threaded and non-forking, so it was unable to simultaneously process the request to make the PDF and respond to Prince's request for the image! Sorry for the false bug report.