I got ##Failure Location unknown## : Error Test name: FirebirdTest::testIntegerDatabase An uncaught exception of type com.sun.star.sdbc.SQLException - firebird_sdbc error: *unsupported on-disk structure for file /private/var/folders/+o/+oY8OrlkHRyUosC PilWtLE+++TI/-Tmp-/lu35xfyn.tmp/firebird.fdb; found 2944.512, support 11.2 caused by 'isc_attach_database' Failures !!! Run: 2 Failure total: 1 Failures: 0 Errors: 1 Error: a unit test failed, please do one of: export DEBUGCPPUNIT=TRUE # for exception catching export CPPUNITTRACE="gdb --args" # for interactive debugging on linux ... when I tried to build LibreOffice 9e118293188607ac883ed65754aaccc9ef2c6abb 4.3.0.0alpha+ master. It looks like that current firebird is unable to correctly handle I/O on Big Endian architectures. I'm forced to make --disable-firebird-sdbc builds until it is fixed.
hmm, firebird saves using the native platform endianness and alignment as far as I can see so its a platform-dependent file format. Which rather sucks for something to haul around in the embedded database case where the db can be opened on any arbitrary system. The exact failure in this case is big-endian ppc is unable to open the little-endian sample database. One solution might be to not store the .fbd in the odb but instead always "backup" to the odb and "restore" from the odb which would use the platform-neutral .fbk archival format IIRC
(In reply to comment #1) > One solution might be to not store the .fbd in the odb but instead always > "backup" to the odb and "restore" from the odb which would use the > platform-neutral .fbk archival format IIRC Yes, that's the plan (discussed on IRC but otherwise undocumented). The backup API is unfortunately somewhat unintuitive, but there shouldn't be any huge issues replacing the storage format -- however I have no idea what sort of impact this will have on saving/opening times.
Created attachment 91663 [details] doesn't work yet A prototype of backing up the db instead of saving it in native format. Catch is it appears that one has to actually login to the services api with a username/password which means firebird wants to look up those in /usr/local/firebird/security2.fdb, sigh... So presumably we would have to bundle a security2.fdb and somehow tell firebird to use that to auth against unless there is some other way to workaround that problem of isc_service_attach. Hopefully get to debug firebird a bit more to see what options are available here.
(In reply to comment #3) > Created attachment 91663 [details] [review] > doesn't work yet > > A prototype of backing up the db instead of saving it in native format. > > Catch is it appears that one has to actually login to the services api with > a username/password which means firebird wants to look up those in > /usr/local/firebird/security2.fdb, sigh... So presumably we would have to > bundle a security2.fdb and somehow tell firebird to use that to auth against > unless there is some other way to workaround that problem of > isc_service_attach. > > Hopefully get to debug firebird a bit more to see what options are available > here. Ahh sorry, looks like we're duplicating work here, I've also got a (non-working) alternative patch in gerrit ;) ( https://gerrit.libreoffice.org/#/c/7299/ ) However it doesn't actually work, as I can't convince the backup service to work. Based on the docs, as we're using embedded mode, we specifically *shouldn't* pass a username/password in the spb (i.e. the same as when connecting to the db -- no username/pass for embedded mode), and I'm not getting any authentication errors with my version suggesting that's not where the problem lies (but I'll try and experiment anyway just in case). But I have no idea where the problem could be, as the only error output given by the backup service is: gbak:Exiting before completion due to errors As far as I can tell we're not missing any libraries or other firebird files that might be needed, but I suspect that it might be necessary to debug firebird itself to figure out what's happening.
I have asked on Firebird devel and no password / access to security2.fdb is required for embedded mode Please add a backtrace with the error if possible
Adding self to CC if not already on
I will retest and add patches in gerrit 1. First i will remove rebuildIndexes() it will not be necesarry when we keep fbk format in odb file 2. I will retest isc_action_svc_backup , it is not necessary to have a password database with firebird embedded and i will add the secondary patch
Created attachment 114274 [details] no need for rebuild indexes
added also to gerrit https://gerrit.libreoffice.org/14968
First atttempt for secondary patch https://gist.github.com/mariuz/60d4d1edfe83c0670648 , i will investigate the error bellow unknown:0:FirebirdTest::testIntegerDatabase An uncaught exception of type com.sun.star.uno.RuntimeException - unexpected UNO exception caught: firebird_sdbc error: *invalid database handle (no active connection) caused by 'isc_detach_database' ##Failure Location unknown## : Error Test name: FirebirdTest::testIntegerDatabase An uncaught exception of type com.sun.star.uno.RuntimeException - unexpected UNO exception caught: firebird_sdbc error: *invalid database handle (no active connection) caused by 'isc_detach_database' Failures !!! Run: 2 Failure total: 1 Failures: 0 Errors: 1 Error: a unit test failed, please do one of: export DEBUGCPPUNIT=TRUE # for exception catching export CPPUNITTRACE="gdb --args" # for interactive debugging on Linux export VALGRIND=memcheck # for memory checking and retry using: make CppunitTest_dbaccess_firebird_test
Comment on attachment 91663 [details] doesn't work yet Mark patches obsolete, as work is ongoing on gerrit now.
Popa Adrian Marius committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f961fef03906fc059a4a0c008799f68fc22727c1 WIP tdf#72987 Use firebird backup format for .odb no need for rebuild indexes It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c88fd50c4e8815546e9830a41bf08edf9f165923 Revert "WIP tdf#72987 Use firebird backup format for .odb no need for rebuild indexes" It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
fixed by the switch to Firebird "fbk" (backup) format
Looks like the problem is back (or was never fully fixed), see https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice/merge_requests/3#note_42132
(In reply to Olivier Tilloy from comment #15) > Looks like the problem is back (or was never fully fixed), see > https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice/ > merge_requests/3#note_42132 @Lionel Elie Mamane, @Popa Adrian Marius, @Tamas Bunth, Do you reproduce the problem described above ?
You have to understand how the problem was fixed. The problem was fixed by saving (within the odb zip structure) firebird data in an endianess-independent format, called the "backup" format, in a file with extension ".fbk". From the build log linked in comment 15, it seems the test is being run on a file that has an "fdb" data file, that is the "native", endianess-dependent Firebird format. Any "old" file that was created by a LibreOffice version that saved firebird data in the fdb format (all these versions have Firebird as _experimental_ _only_ feature) need to be first opened in a newer LibreOffice version running on the _same_ endianess, save the file again (which will save as fbk), and the resulting file will be endianess-independent. Now, the error comes from an odb file that is in the LibreOffice source tree, for automated QA tests. The question is, what is that test supposed to test? Case 1: it is supposed to test a normal firebird file as created by the current version, to make sure it works correctly. Then the two ODB files dbaccess/qa/unit/data/firebird_integer_x64le{,_ods12}.odb need to be converted to fbk format, they are in fdb format. Just open them and save them again. Case 2: it is supposed to test backwards compatibility, that is the fact that newer LibreOffice can still open old-style fdb-data files. Then, this test should only be run on little endian architectures, or a new test file for big endian architecture needs to be created. As both tests are actually useful, we can actually duplicate the test and do both :) Andrzej, Tamas, any thoughts on the above?
ah, I see. Working on that...
see --- snip --- remote: New Changes: remote: https://gerrit.libreoffice.org/60916 tdf#72987 run firebird test for little endian only for now remote: https://gerrit.libreoffice.org/60917 tdf#72987 split firebird test into a regression test and a "new" test --- snip ---
Rene Engelhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f104b3cafee63b47a735cfdce0f05dab2eedbb91 tdf#72987 run firebird test for little endian only for now It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Rene Engelhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=36befb3aca96907a14e71e82497dbb8f03ead5ab tdf#72987 split firebird test into a regression test and a "new" test It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Rene Engelhard committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d5d09bb733842252b3e2d6e7480b211e67136a75&h=libreoffice-6-1 tdf#72987 split firebird test into a regression test and a "new" test It will be available in 6.1.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.