GNOME Bugzilla – Bug 730545
xsltproc - Tries to seek on fifo XML file.
Last modified: 2021-07-05 11:01:17 UTC
If you use a fifo or bash process substitution directive (anonymous fifo), then xsltproc fails due to an invalid seek on a the fifo. Quite simple to reproduce, but you need to make the XSL complicated enough that would cause a seek. I am trying to use xsltproc to process a response from a soap service in the following way. It seems natural to do it this way and doesn't require any temporary files. strace -o xsltproc.strace xsltproc - <(soap_service "myquery") <<HERE <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet ... </xsl:stylesheet> HERE strace: stat("/dev/fd/62", {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 stat("/dev/fd/62", {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 stat("/dev/fd/62", {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 open("/dev/fd/62", O_RDONLY) = 3 fstat(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff4b960d000 read(3, "<?xml version=\"1.0\" encoding=\"UT"..., 16384) = 390 read(3, "", 12288) = 0 lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) lseek(3, 18446744073709547520, SEEK_SET) = -1 ESPIPE (Illegal seek) read(3, "", 4096) = 0 write(2, "/dev/fd/62:1: ", 14) = 14 write(2, "parser ", 7) = 7 write(2, "error : ", 8) = 8 write(2, "Document is empty\n", 18) = 18 write(2, "\n", 1) = 1 write(2, "^\n", 2) = 2 write(2, "/dev/fd/62:1: ", 14) = 14 write(2, "parser ", 7) = 7 write(2, "error : ", 8) = 8 write(2, "Start tag expected, '<' not foun"..., 34) = 34 write(2, "\n", 1) = 1 write(2, "^\n", 2) = 2 close(3) = 0 munmap(0x7ff4b960d000, 4096) = 0 write(2, "cannot parse /dev/fd/62\n", 24) = 24 xsltproc --version yields: Using libxml 20706, libxslt 10117 and libexslt 813 xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813 libxslt 10117 was compiled against libxml 20626 libexslt 813 was compiled against libxml 20626
Your command tries to pass both the stylesheet and the input document through stdin. This simply cannot work. You can either pass the stylesheet via stdin: xsltproc - doc.xml <<HERE <xsl:stylesheet ... </xsl:stylesheet> HERE Or the document: xsltproc stylesheet.xsl - <<HERE <doc ... </doc> HERE But not both.
Err, no, no it doesn't. Look more closely. It is using standard input for the stylesheet only. The xml document is provided via a bash process absorption fifo.
Err, no, no it doesn't. Look more closely. It is using standard input for the stylesheet only. The xml document is provided via a bash process substitution or fifo.
Ignore comment 2. Swype user error.
You're right, reopening.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxslt/-/issues/ Thank you for your understanding and your help.