Bug 1286692 - postgresql-9.4.5-3.fc24 FTBFS: an xml test fails [NEEDINFO]
postgresql-9.4.5-3.fc24 FTBFS: an xml test fails
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: libxml2 (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
http://koji.fedoraproject.org/koji/ta...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-30 09:03 EST by Petr Pisar
Modified: 2017-08-08 08:28 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 08:28:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
praiskup: needinfo? (veillard)


Attachments (Terms of Use)
Additional xml_2.out (possible upstream fix) (28.91 KB, text/plain)
2015-12-01 03:41 EST, Pavel Raiskup
no flags Details
Maybe naive fix? (796 bytes, patch)
2015-12-01 07:34 EST, Pavel Raiskup
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Bugzilla 760739 None None None 2016-02-04 04:54 EST

  None (edit)
Description Petr Pisar 2015-11-30 09:03:20 EST
postgresql-9.4.5-3.fc24 fails to build in F24 because a test fails:

make[2]: Leaving directory '/builddir/build/BUILD/postgresql-9.4.5/contrib/dummy_seclabel'
rm -rf ./testtablespace
mkdir ./testtablespace
../../../src/test/regress/pg_regress --inputdir=. --psqldir='/usr/bin'    --psqldir=/builddir/build/BUILD/postgresql-9.4.5/contrib/pg_upgrade/tmp_check/install//usr/bin --port=57637 --dlpath=.  --psqldir=/builddir/build/BUILD/postgresql-9.4.5/contrib/pg_upgrade/tmp_check/install//usr/bin --port=57637 --schedule=./serial_schedule 
(using postmaster on /tmp/pg_upgrade_check-woxDjF, port 57637)
============== dropping database "regression"         ==============
NOTICE:  database "regression" does not exist, skipping
DROP DATABASE
============== creating database "regression"         ==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries        ==============
test tablespace               ... ok
[...]
test with                     ... ok
test xml                      ... FAILED
test stats                    ... ok
========================
 1 of 145 tests failed. 
========================
The differences that caused some tests to fail can be viewed in the
file "/builddir/build/BUILD/postgresql-9.4.5/src/test/regress/regression.diffs".  A copy of the test summary that you see
above is saved in the file "/builddir/build/BUILD/postgresql-9.4.5/src/test/regress/regression.out".
[...]
=== trying to find all regression.diffs files in build directory ===
=== make failure: ./src/test/regress/regression.diffs ===
*** /builddir/build/BUILD/postgresql-9.4.5/src/test/regress/expected/xml.out	Mon Oct  5 19:12:06 2015
--- /builddir/build/BUILD/postgresql-9.4.5/src/test/regress/results/xml.out	Sun Nov 22 04:18:07 2015
***************
*** 9,16 ****
  LINE 1: INSERT INTO xmltest VALUES (3, '<wrong');
                                         ^
  DETAIL:  line 1: Couldn't find end of Start Tag wrong line 1
- <wrong
-       ^
  SELECT * FROM xmltest;
   id |        data        
  ----+--------------------
--- 9,14 ----
***************
*** 63,70 ****
  LINE 1: SELECT xmlconcat('bad', '<syntax');
                                  ^
  DETAIL:  line 1: Couldn't find end of Start Tag syntax line 1
- <syntax
-        ^
  SELECT xmlconcat('<foo/>', NULL, '<?xml version="1.1" standalone="no"?><bar/>');
    xmlconcat   
  --------------
--- 61,66 ----
***************
*** 212,227 ****
  <invalidentity>&</invalidentity>
                  ^
  line 1: chunk is not well balanced
- <invalidentity>&</invalidentity>
-                                 ^
  SELECT xmlparse(content '<undefinedentity>&idontexist;</undefinedentity>');
  ERROR:  invalid XML content
  DETAIL:  line 1: Entity 'idontexist' not defined
  <undefinedentity>&idontexist;</undefinedentity>
                               ^
  line 1: chunk is not well balanced
- <undefinedentity>&idontexist;</undefinedentity>
-                                                ^
  SELECT xmlparse(content '<invalidns xmlns=''&lt;''/>');
           xmlparse          
  ---------------------------
--- 208,219 ----
***************
*** 240,250 ****
  <twoerrors>&idontexist;</unbalanced>
                         ^
  line 1: Opening and ending tag mismatch: twoerrors line 1 and unbalanced
- <twoerrors>&idontexist;</unbalanced>
-                                     ^
  line 1: chunk is not well balanced
- <twoerrors>&idontexist;</unbalanced>
-                                     ^
  SELECT xmlparse(content '<nosuchprefix:tag/>');
        xmlparse       
  ---------------------
--- 232,238 ----
***************
*** 268,283 ****
  <invalidentity>&</abc>
                  ^
  line 1: Opening and ending tag mismatch: invalidentity line 1 and abc
- <invalidentity>&</abc>
-                       ^
  SELECT xmlparse(document '<undefinedentity>&idontexist;</abc>');
  ERROR:  invalid XML document
  DETAIL:  line 1: Entity 'idontexist' not defined
  <undefinedentity>&idontexist;</abc>
                               ^
  line 1: Opening and ending tag mismatch: undefinedentity line 1 and abc
- <undefinedentity>&idontexist;</abc>
-                                    ^
  SELECT xmlparse(document '<invalidns xmlns=''&lt;''/>');
           xmlparse          
  ---------------------------
--- 256,267 ----
***************
*** 296,303 ****
  <twoerrors>&idontexist;</unbalanced>
                         ^
  line 1: Opening and ending tag mismatch: twoerrors line 1 and unbalanced
- <twoerrors>&idontexist;</unbalanced>
-                                     ^
  SELECT xmlparse(document '<nosuchprefix:tag/>');
        xmlparse       
  ---------------------
--- 280,285 ----
======================================================================
RPM build errors:
+ test 1 -eq 0
error: Bad exit status from /var/tmp/rpm-tmp.Ysv0Tx (%build)


Difference between working and failing build root is:

        systemtap-sdt-devel 	3.0-0.20151102git... 	> 	3.0-0.20151116git...
	glibc-devel 	2.22.90-16.fc24 	> 	2.22.90-21.fc24
	python3-devel 	3.4.3-5.fc24 	> 	3.5.0-5.fc24
	util-linux 	2.27.1-1.fc24 	> 	2.27.1-3.fc24
	systemd 	227-5.fc24 	> 	228-3.fc24
	krb5-devel 	1.14-7.fc24 	> 	1.14-8.fc24
	openssl-devel 	1:1.0.2d-2.fc24 	> 	1:1.0.2d-3.fc24
	libselinux-devel 	2.4-4.fc24 	> 	2.4-5.fc24
	libxml2-devel 	2.9.2-8.fc24 	> 	2.9.3-1.fc24
	kmod 	21-3.fc23 	> 	22-1.fc24
	cryptsetup-libs 	1.7.0-1.fc24 	> 	1.7.0-2.fc24
	libuser 	0.62-1.fc24 	> 	0.62-2.fc24
	libsmartcols 	2.27.1-1.fc24 	> 	2.27.1-3.fc24
	libuuid 	2.27.1-1.fc24 	> 	2.27.1-3.fc24
	pcre-devel 	8.38-0.1.RC1.fc24 	> 	8.38-0.2.RC1.fc24
	libselinux 	2.4-4.fc24 	> 	2.4-5.fc24
	kmod-libs 	21-3.fc23 	> 	22-1.fc24
	openssl-libs 	1:1.0.2d-2.fc24 	> 	1:1.0.2d-3.fc24
	glibc-headers 	2.22.90-16.fc24 	> 	2.22.90-21.fc24
	perl-PathTools 	3.56-346.fc23 	> 	3.60-1.fc24
	glibc-common 	2.22.90-16.fc24 	> 	2.22.90-21.fc24
	python3 	3.4.3-5.fc24 	> 	3.5.0-5.fc24
	glibc 	2.22.90-16.fc24 	> 	2.22.90-21.fc24
	python3-pyparsing 	2.0.3-2.fc23 	> 	2.0.6-1.fc24
	libfdisk 	2.27.1-1.fc24 	> 	2.27.1-3.fc24
	libcap-ng 	0.7.7-2.fc23 	> 	0.7.7-3.fc24
	python3-libs 	3.4.3-5.fc24 	> 	3.5.0-5.fc24
	libblkid 	2.27.1-1.fc24 	> 	2.27.1-3.fc24
	dbus 	1:1.10.2-1.fc24 	> 	1:1.10.4-1.fc24
	systemd-libs 	227-5.fc24 	> 	228-3.fc24
	libxml2 	2.9.2-8.fc24 	> 	2.9.3-1.fc24
	audit-libs 	2.4.4-2.fc24 	> 	2.4.4-3.fc24
	lz4 		> 	r131-1.fc23
	krb5-libs 	1.14-7.fc24 	> 	1.14-8.fc24
	libmount 	2.27.1-1.fc24 	> 	2.27.1-3.fc24
	pcre 	8.38-0.1.RC1.fc24 	> 	8.38-0.2.RC1.fc24
	nss-tools 	3.20.1-2.fc24 	> 	3.21.0-4.fc24
	device-mapper-libs 	1.02.110-2.fc24 	> 	1.02.110-4.fc24
	emacs-filesystem 	1:24.5-7.fc24 	> 	1:24.5-8.fc24
	nss 	3.20.1-2.fc24 	> 	3.21.0-4.fc24
	dbus-libs 	1:1.10.2-1.fc24 	> 	1:1.10.4-1.fc24
	nss-softokn-freebl 	3.20.1-1.fc24 	> 	3.21.0-3.fc24
	kernel-headers 	4.4.0-0.rc0.git6.1.... 	> 	4.4.0-0.rc1.git3.1....
	python-setuptools 	18.3.2-1.fc24 	> 	18.5-2.fc24
	python3-pip 	7.1.0-1.fc23 	> 	7.1.0-3.fc24
	perl-Socket 	3:2.020-1.fc23 	> 	3:2.021-1.fc24
	nspr 	4.10.10-1.fc24 	> 	4.10.10-2.fc24
	python-pip 	7.1.0-1.fc23 	> 	7.1.0-3.fc24
	nss-util 	3.20.1-1.fc24 	> 	3.21.0-2.fc24
	libsemanage 	2.4-4.fc24 	> 	2.4-5.fc24
	python3-setuptools 	18.3.2-1.fc24 	> 	18.5-2.fc24
	libpwquality 	1.3.0-2.fc24 	> 	1.3.0-3.fc24
	device-mapper 	1.02.110-2.fc24 	> 	1.02.110-4.fc24
	nss-sysinit 	3.20.1-2.fc24 	> 	3.21.0-4.fc24
	nss-softokn 	3.20.1-1.fc24 	> 	3.21.0-3.fc24
	hawkey 	0.6.2-1.fc24 	> 	0.6.2-2.fc24
	librepo 	1.7.17-1.fc24 	> 	1.7.17-2.fc24
	rpm-plugin-systemd-inhibit 	4.13.0-0.rc1.11.fc24 	> 	4.13.0-0.rc1.12.fc24
	guile 	5:2.0.11-6.fc23 	> 	5:2.0.11-7.fc24
	python3-dnf 	1.1.3-1.fc24 	> 	1.1.4-1.fc24
	libsolv 	0.6.14-2.fc24 	> 	0.6.14-4.fc24
	python3-libcomps 	0.1.7-1.fc24 	> 	0.1.7-2.fc24
	deltarpm 	3.6-11.fc24 	> 	3.6-13.fc24
	rpm-libs 	4.13.0-0.rc1.11.fc24 	> 	4.13.0-0.rc1.12.fc24
	rpm-plugin-selinux 	4.13.0-0.rc1.11.fc24 	> 	4.13.0-0.rc1.12.fc24
	python3-dnf-plugins-core 	0.1.13-1.fc24 	> 	0.1.14-1.fc24
	libcomps 	0.1.7-1.fc24 	> 	0.1.7-2.fc24
	python3-librepo 	1.7.17-1.fc24 	> 	1.7.17-2.fc24
	rpm-build 	4.13.0-0.rc1.11.fc24 	> 	4.13.0-0.rc1.12.fc24
	rpm 	4.13.0-0.rc1.11.fc24 	> 	4.13.0-0.rc1.12.fc24
	file 	5.25-1.fc24 	> 	5.25-3.fc24
	file-libs 	5.25-1.fc24 	> 	5.25-3.fc24
	gdb 	7.10.50.20151027-31.fc24 	> 	7.10.50.20151113-33.fc24
	dnf-plugins-core 	0.1.13-1.fc24 	> 	0.1.14-1.fc24
	python3-iniparse 	0.4-16.fc23 	> 	0.4-17.fc24
	python3-pygpgme 	0.3-13.fc24 	> 	0.3-14.fc24
	rpm-python3 	4.13.0-0.rc1.11.fc24 	> 	4.13.0-0.rc1.12.fc24
	python3-hawkey 	0.6.2-1.fc24 	> 	0.6.2-2.fc24
	rpm-build-libs 	4.13.0-0.rc1.11.fc24 	> 	4.13.0-0.rc1.12.fc24
	python3-six 	1.9.0-3.fc23 	> 	1.10.0-1.fc24
	dnf-conf 	1.1.3-1.fc24 	> 	1.1.4-1.fc24
	libreport-filesystem 	2.6.3-1.fc24 	> 	2.6.3-2.fc24
	libbabeltrace 	1.2.4-2.fc24 	> 	1.2.4-3.fc24
	iputils 	20150815-1.fc24 	> 	20150815-2.fc24
Comment 1 Pavel Raiskup 2015-12-01 02:40:53 EST
Looks like libxml2 changed output.  Not only FTBFS -- the postgresql-test
package is broken too.  F23 is also affected.
Comment 2 Pavel Raiskup 2015-12-01 03:41 EST
Created attachment 1100771 [details]
Additional xml_2.out (possible upstream fix)
Comment 3 Pavel Raiskup 2015-12-01 07:33:18 EST
Switching against libxml2, seems like the problem is in F22+ due to this
upstream change:

  commit ce0b0d0d81fdbb5f722a890432b52d363e4de57b
  Author:     Daniel Veillard <veillard@redhat.com>
  AuthorDate: Fri Nov 20 15:01:22 2015 +0800
  Commit:     Daniel Veillard <veillard@redhat.com>
  CommitDate: Fri Nov 20 15:01:22 2015 +0800

      Do not print error context when there is none
      
      Which now happens more frequently du to xmlHaltParser use

  diff --git a/error.c b/error.c
  index cbcf5c9..9c45040 100644
  --- a/error.c
  +++ b/error.c
  @@ -177,7 +177,9 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
       xmlChar  content[81]; /* space for 80 chars + line terminator */
       xmlChar *ctnt;
   
  -    if (input == NULL) return;
  +    if ((input == NULL) || (input->cur == NULL) ||
  +        (*input->cur == 0)) return;
  +
       cur = input->cur;
       base = input->base;
       /* skip backwards over any end-of-lines */

I'm not sure whether this is expected or not because the disabled/removed
error output seemed to be useful to me.
Comment 4 Pavel Raiskup 2015-12-01 07:34 EST
Created attachment 1100884 [details]
Maybe naive fix?
Comment 5 Tom Lane 2015-12-01 09:40:19 EST
I checked the Postgres sources, and the missing output corresponds to what should be printed by xmlParserPrintFileContext(error->ctxt->input) when a syntax error has been reported to the xmlSetStructuredErrorFunc() error handler.  I concur that this seems like a libxml2 bug rather than a desired behavior change.
Comment 6 Pavel Raiskup 2015-12-03 06:43:32 EST
Ping, Daniel?

FTR PostgreSQL upstream thread:
http://www.postgresql.org/message-id/CAFj8pRA4xJQFGNQCqMCYGx-umgMr3Stt3xFEUw7kBsOiOvGhkA@mail.gmail.com
Comment 7 Tom Lane 2015-12-05 11:05:20 EST
We're starting to get reports of this in the Postgres buildfarm:

http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jaguarundi&dt=2015-12-05%2000%3A52%3A01

http://www.postgresql.org/message-id/flat/n3u4b4$kf4$1@ger.gmane.org

Eyeing the diffs, it looks like all the missing messages are ones that should have been reported at end-of-input.  So I concur with Pavel that the *input->cur == 0 test is misguided.  Not sure if it should just be removed, or if there is some other test that should've been made instead.
Comment 8 Tom Lane 2015-12-11 10:48:40 EST
For additional fun: the bogus behavior has propagated into RHEL6 with libxml2.x86_64 0:2.7.6-20.el6_7.1.
Comment 9 Tom Lane 2015-12-14 12:02:37 EST
See also discussion at
http://www.postgresql.org/message-id/flat/CACjxUsOGS+koX-zx1sWWWJnBfPgc4+0YScERmctcjeZp8LATVQ@mail.gmail.com

which indicates that even with this issue fixed, there is a residual change in libxml2's behavior that we're probably just going to have to live with.  Still, it'd be a good thing to put back the error position reports.
Comment 11 Jan Kurik 2016-02-24 09:03:57 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 12 Fedora End Of Life 2017-07-25 15:34:50 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 13 Petr Pisar 2017-07-26 08:10:22 EDT
This is about libxml2, not postgresql.
Comment 14 Fedora End Of Life 2017-08-08 08:28:42 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.