[firebird-support] Re: After downgrading database FB3 to FB2.5 - no permission for read/select access to DATABASE
Ho promises but... try (on copy of the database): attach as SYSDBA and run UPDATE RDB$DATABASE SET RDB$SECURITY_CLASS = NULL Regards, Vlad
[firebird-support] Re: going blob (0:25677) is not owned by relation (id = 548), ignored
---In firebird-support@yahoogroups.com, wrote : > One of our customer's firebird.log contains a bunch of this message. > What > is this means? > > > FABIANLIBRASRVThu Oct 17 12:42:18 2019 > going blob (0:25677) is not owned by relation (id = 548), > ignored Very interesting. ID's of temporary blobs are stored within relation records. It should not happens. I don't know how it happens. The messages is written during garbage collection.Old version of Firebird could bugcheck in this case. In any case - this blobs are not accessible. It is very interesting - how it happens. It is first time I see this messages in firebird.log, btw Regards, Vlad
[firebird-support] Re: Firebird 3 Services Manager and Security Per database
> I'm missing something here or it just works thay way ? Read doc\README.services_extension chapter (5): Services API extension - using services with non-default security database. Regards, Vlad
[firebird-support] Re: Does gbak use WireCompression?
---In firebird-support@yahoogroups.com, wrote : > I often perform restores on remote servers via WAN. Since this sometimes > takes a long time, I wonder if gbak > takes into account the parameter > WireCompression. What needs to be set as where? gbak is usual client application, it needs no special actions to use WireCompression. Just put zlib1.dll near the fbclient.dll and set WireCompression = true at client side (using firebird.conf or DPB). Make sure zlib1.dll is present at server side also. But much more efficient way to do restore via slow network is remote backup\restore (see CORE-2666). Read doc\README.services_extension chapter (4) for details. Regards, Vlad
[firebird-support] Re: Array datatype?
Use CASE: azeit = azeit + CASE EXTRACT(WEEKDAY FROM :akttag) WHEN 0 THEN F0 WHEN 1 THEN F1 ... WHEN 6 THEN F6 END; Regards, Vlad PS procedure contains logical errors, hope it is just a quick sample ---In firebird-support@yahoogroups.com, wrote : In my case, I would like to do this: create procedure P_ARBZEIT( beginn date, ende date, f1 float, f2 float, f3 float, f4 float, f5 float, f6 float, f0 float) returns ( azeit double precision) as declare variable wt integer; declare variable akttag date; begin azeit = 0; akttag = beginn; while (akttag = ende or beginn > ende) do begin wt = extract(weekday from :akttag); azeit = azeit + cast('f'||wt as char(2)); akttag = akttag + 1; end suspend; end f1 = Monday, f2 = Tuesday.. f0 = Sunday. I get the day from date with weekday and I would add the value from the day to the azeit. Take the value from the variable f0 when it is Sunday.
[firebird-support] Re: Random operating system directive MapViewOfFile failed messages
---In firebird-support@yahoogroups.com, wrote : > We started seeing this error from client applications two days ago. They > appear randomly during the day. > > "operating system directive MapViewOfFile failed" This is a one part of the error message, there should be Windows error code also. Do you know which ISC API call returns such error ? Regards, Vlad
[firebird-support] Re: Page cache size in Firebird 3.0.4
---In firebird-support@yahoogroups.com, wrote : > > Database properties > > ODS Version 12 > Page size 16384 > Pages 437728 > Size on disk 6.68GB > Page buffers 10240 > Read only false > ... > On Windows Task Manager, Firebird Server took 236MB RAM, max. > > If not mistaken, Page Cache Size should be > Page Size x DefaultDbCachePages = 16384 x 65536 = ~ 1GB > > Why Firebird server only took 236 MB RAM ? Is this normal or something missed > here ? Yes, you missed > Page buffers 10240 Regards, Vlad
[firebird-support] Re: Problem with restoring database
Looks like http://tracker.firebirdsql.org/browse/CORE-5228 http://tracker.firebirdsql.org/browse/CORE-5228 Regards, Vlad
Re: [firebird-support] Drop table safe when other users are active?
> If DDL statements on an active database may result in corruption, then > the Firebird engine should reject such requests or fix bugs in that area. Sure. Please, provide a test case and bug will be fixed. Regards, Vlad PS I rememer that old IB docs mentions restrictions on DDL on database in use but i can't find it right now. In any case, there should be no chance for the corruptions, of course.
[firebird-support] Re: Drop table safe when other users are active?
> A few years ago we suffered Firebird corruption and got it fixed with > the help of IB Surgeon. I was told at the time that dropping tables > while other users were connected was the probable cause, and that this > was a bug in FIrebird that had been around for a long time. I think this > would be for Firebird 2.5. What bug ? Is it registered at the tracker ? Do you have a test case ? > Now I'm wondering if this is a bug that is known to have been fixed > since then? In other words: Is it now (version 3.0.4) safe to drop > tables when the database is in use by multiple users? I physically can't answer if some unknown bug is fixed or not. There was a lot of changes and refactorings during FB3 release circle. It is impossible to make any kind of correct answer on such a question, sorry. Regards, Vlad
Re: [firebird-support] Re: Engine12 32 64 bit question
> > If the app is 32 bit and tries to load dll with no path - it wiil not > > try 64-bit system folder (c:\Program Files\) > > The Windows 32 bit subsystem will redirect requests for C:\Program > Files\ to C:\Program Files (x86)\, so that is not necessarily true. Mark, read carefully: > If the app is 32 bit and tries to load dll with ***no path*** Regards, Vlad
[firebird-support] Re: Engine12 32 64 bit question
---In firebird-support@yahoogroups.com, wrote : > I copied fbclient.dll to exe folder and get same result: > "Error loading plugin Engine12 > Module c:\Program Files\Firebird\Firebird_3_0\plugins/Engine12 exists but > can not be loaded > unknown win32 error 193" > It means your app loaded fbclient.dll from "c:\Program Files\Firebird\Firebird_3_0\" not from app folder. > I'm using Delphi and IBDAC components from Devart to access Firebird. I have no idea how\where IBDAC looks for fbclient.dll > I'm sure this is not an embedded server connection. Here you wrong. See below ... > The program is 32 bit as I mentioned and the Firebird server is 64 bit. If the app is 32 bit and tries to load dll with no path - it wiil not try 64-bit system folder (c:\Program Files\) > I can specify location of fbclient as one of the connection properties. And you specify... what ? > All connections are local. ...stop using "local" connection string and read the docs about embedded and connection strings. > The server is running on my development machine. > > I wonder if there is other way to specify the database address for this > connection to force some other plugin to get loaded? See above ;) Regards, Vlad PS https://www.firebirdsql.org/en/documentation/ https://www.firebirdsql.org/en/documentation/ https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-engine.html https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-engine.html https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-compat-winlocal.html https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-compat-winlocal.html https://firebirdsql.org/en/news/new-article-connection-strings-in-firebird-3/ https://www.google.com/url?client=internal-uds-cse&cx=010633460585558258518:jpoa5mcegvg&q=https://www.ibphoenix.com/files/ConnectionStrings_Fb3.pdf&sa=U&ved=2ahUKEwiKi5OPh6fiAhVS-yoKHezDAfQQFjACegQIDxAB&usg=AOvVaw1DquWWXNyoKEyozPcOQ6UZ
Re: [firebird-support] Engine12 32 64 bit question
> ---In firebird-support@yahoogroups.com, wrote : > > 18.05.2019 9:32, Mark Rotteveel mark@... mailto:mark@... [firebird-support] > wrote: >> It sounds like your code is attempting to use Firebird Embedded instead >> of Firebird Server. +1 > Even if not, default configuration put Engine12 to the first place > so it is tried before network connection. Really ? You should re-read default firebird.conf. And take it from Firebird installation, not elsewhere ;) > He should stop use fbclient in Firebird directory and install it into system > directory > using instclient. Both ways works but first one is preferred usually. Regards, Vlad
Re: [firebird-support] How to trigger automatic sweep?
>> Why it was shut down ? > > > Don't know. I not shutdown anything. If you run CS and disconnected - both connections will be shutdown (yours one and sweep) as they both handled by the same worker process. Are you run CS and disconnect immediately after triggering auto-sweep ? >> What is in firebird.log ? Are you sure there was no errors before the >> sweep ? > > The above things and like the next: > > SRV Wed May 01 19:51:35 2019 > Database: EMPLOYEE > Index 1 is corrupt (record 29189 have missing entries) in table > SALARY_HISTORY (136) It is not good and it shouldn't happen. The good thing is that It is easy to fix - just rebuild index. Also, it could be false alarm - run manual sweep and validate database again to check it. > I updating the SALARY table. > > The firebird.log not exists before the above messages. Because you never validate database before, isn't it ? >>> So, I wanted to see this! Automatic sweep destroy the database. And easy >>> to reproduce. Too easy! :-( >> >> Why do you think database is "destroyed" ? Too strong statement without >> answes on my questions above. > > Sorry Vlad I don't know the good term. The "something went wrong in the > database" is better? Are your db really *destroyed* ? Is there a smoking hole in the HDD ? Can you connect ? Can you read the data ? (I know - you can ;) Yes, it seems somewhat corrupted but we not know if it was not corrupted before the sweep run. Don't get me wrong - i need to know all such details. > Can I create a backtrace or whatever? If it is really reproduced (starting with clean database) - create ticket and i'll fix it. Regards, Vlad
Re: [firebird-support] How to trigger automatic sweep?
> After this step firebird.log contains: > > SRV Wed May 01 14:54:40 2019 > Sweep is started by SWEEPER > Database "EMPLOYEE" > OIT 156, OAT 20157, OST 20157, Next 20157 > > SRV Wed May 01 14:54:41 2019 > Shutting down the server with 1 active connection(s) to 1 database(s), > 0 active service(s) Why it was shut down ? > SRV Wed May 01 14:54:41 2019 > Error during sweep: > connection shutdown It is OK, sweep was detected database shutdown and stop itself correctly. > and result of "gfix -validate -full -no_update EMPLOYEE": > > Summary of validation errors > Number of index page errors : 1 What is in firebird.log ? Are you sure there was no errors before the sweep ? > So, I wanted to see this! Automatic sweep destroy the database. And easy > to reproduce. Too easy! :-( Why do you think database is "destroyed" ? Too strong statement without answes on my questions above. Regards, Vlad
[firebird-support] Re: Is this a normal behaviour for GTT?
> I've created and issue in Firebird's bug tracker. Now we arewaiting for a > response from the devs. Thank you, I answered there. Regards, Vlad
[firebird-support] Re: Is this a normal behaviour for GTT?
---In firebird-support@yahoogroups.com, wrote : > What happens with the records in GTT if transactions do commit retaining? > Are the records deleted or they are stiil present until the transaction > finished with commit/rollback ? Looks like you found bug in GTT's implementation: data of GTT ON COMMIT DELETE table instance is not released and is not visible after COMMIT RETAINING. Could you register it at tracker, plese ? Regards, Vlad
[firebird-support] Re: Is this a normal behaviour for GTT?
---In firebird-support@yahoogroups.com, wrote : > We are using SuperServer on Windows. Tested with 2.5.2 / 2.5.7 / 2.5.8 > > So I have some questions: > Is it normal to have only one file for a GTT for all > connections/transactions? Yes. > Is normal to keep old data in the file when the GTT is declared with ON > COMMIT DELETE ROWS and the transaction that inserted the data is committed > and closed? Pages in this file are reused - in the same way as in regular database file > Is it normal for the file to persist even if there are no active > transactions at all? Only connections. Yes > What we can do to avoid the huge disk usage by the temporary files in a > situation where we always have active connections to the database? Look where you insert a lot of data into GTT's. Note, GTT ON COMMIT PRESERVE ROWS keeps all data until disconnect. If you DELETE it - it is not deleted physically until GC (same as in permament tables). Regards, Vlad
Re: [firebird-support] Firebird3 files - Updated
Hi Karol, set FIREBIRD_LOCK env variable at system level and reboot. Be careful as wrong usage could damage database. Regards, Vlad
[firebird-support] Re: Question about delay in fetch operation
From the video you made: a) when you fetch 4791 records there are more then 1M record reads at 3 tables (HD_STATUS, etc) (0:58 at video) b) when you fetch 4790 records there are just 21K record reads at same 3 tables (HD_STATUS, etc) (1:32 at video) I.e. there is a lot of records in one of that 3 tables which have no corresponding records at other tables to join. No wonder it need more time to read >1M records than 21K records Regards, Vlad
Re: [firebird-support] Re: Server crash when no more space for the database
07.11.2018 14:16, hvlad@... mailto:hvlad@... [firebird-support] wrote: >> The last lines i see inyour message is: >After that several bugchecks wer reported. You should have whole message in >your mail box. >> (Message over 64 KB, truncated) >AFAIU it is limitation of web-interface. And I use web-interface for this group, surprise ? Regards, Vlad
Re: [firebird-support] Re: Server crash when no more space for the database
2018. 11. 07. 8:51 keltezéssel, hvlad@... mailto:hvlad@... [firebird-support] írta: >> There should be no crash. Errors - yes, crash - no. >> Attached log is truncated and i see no message about crash there. > The firebird.log not exists when started the OLTP. My second message > contains the whole firebird.log which available after fbserver.exe > terminated. The last lines i see inyour message is: --- PC (Server) Tue Nov 06 14:10:32 2018 Error extending file "R:\FB_OLTP\OLTP25.FDB" by (Message over 64 KB, truncated) --- Regards, Vlad
[firebird-support] Re: Server crash when no more space for the database
> While I executed some OLTP with 2.5(.9.27119 SS Win64) and no more space > for the database the server crashed. See the attachment. Is it a known > limitation (not fixed in 2.5 because it's too old) or a bug? There should be no crash. Errors - yes, crash - no. Attached log is truncated and i see no message about crash there. Regards, Vlad
[firebird-support] Re: Firebird 3 and DST on Windowsw Server 2012
While there was few reports about it - I can't reproduce it. Is DST\TZ set correctly at server host ? Regards, Vlad
Re: Fwd: [firebird-support] Re: Firebird 3.0.4 unicode_ci_ai index problems
> Many of those collation problems seem to relate to unicode_ci and > unicode_ci_ai, > and this relates to the usage of ICU functions. > > FB seems to set collation strength properly only where it relates to unique > index. > Otherwise the strength is left default, i.e. equivalent of collate unicode, > for unicode_ci and unicode_ci_ai. > This is my guess after tested and observed many cases. > > If a sorting was ordered by a single column with collate UNICODE, > the result could be shared with collate UNICODE_CI or UNICODE_CI_AI. > But when it comes to ordering by multiple columns, it should be a different > story. > > Is there anyone who can check the relating source code? > ICU's collation strength must be set as follows to make sort key according to > the field's collate property: > default(unicode), primary(unicode_ci_ai) or secondary(unicode_ci) Feel free to discuss it at fb-devel mailing list (https://sourceforge.net/projects/firebird/lists/firebird-devel) Regards, Vlad
Re: [firebird-support] Re: Firebird 3.0.4 unicode_ci_ai index problems
---In firebird-support@yahoogroups.com, wrote : > I found that if I add the a extra field in the index like the pk and make > the index unique it works fine. Ok. > Is expected to work fine even with the bug that you refer ? Not sure what is "fine" here. In any case - test it and if you'll found a problem, report it Regards, Vlad PS your messages is duplicated in this list, fix it please
[firebird-support] Re: Firebird 3.0.4 unicode_ci_ai index problems
The problem is that multy-level collations can't be used for full match in indices. If you need details, search fb-devel for thread "UNICODE case/accent insensitive bugs" started at 10 Jun 2009. See also CORE-2457 As a workaround, you might try to use two single-segment indices instead of one multy-segment. Regards, Vlad
[firebird-support] Re: Problems with database shadows
Hi, Martin > I’m trying to create a shadow file. But it doesn’t work. > > I have executed this command: > create shadow 1 '/srv/firebird/master.shd'; > > The file is created in file system. But the file size is zero. Shadow is created and all pages from main database file is written to it. But shadow file contents is not flushed by the Firebird and file system cached file metadata (such as file size). It will be update a bit later, at last when file is closed. > There is no entry in the table RDB$FILES. In "Autocommit DDL = ON" mode isql run DDL statements in separate transaction and commits it automatically. But it doesn't commit "main" transaction where you run SELECT statement. This transaction started before you created shadow and can't see changes in RDB$FILES. Commit and run SELECT again. Hope it helps, Vlad
RE: [firebird-support] Re: Transaction access mode (read only vs. read write) from context?
Hi András, > Is it possible to backport this items to 2.5.9? >> Firebird3 supports following transaction-related items in 'SYSTEM' >> namespace: >> "TRANSACTION_ID", "ISOLATION_LEVEL", "LOCK_TIMEOUT", "READ_ONLY" Should be no problem (if release policy allows), so - welcome to the tracker ;) Regards, Vlad
[firebird-support] Re: Transaction access mode (read only vs. read write) from context?
> According to the documentation > (https://firebirdsql.org/refdocs/langrefupd20-get-context.html) I can retrive > the transaction’s isolation level: > select rdb$get_context('SYSTEM', > 'ISOLATION_LEVEL') from rdb$database > > But I need to know the access mode too. Is this possible somehow to know it > via contexts? Firebird3 supports following transaction-related items in 'SYSTEM' namespace: "TRANSACTION_ID", "ISOLATION_LEVEL", "LOCK_TIMEOUT", "READ_ONLY" Regards, Vlad
[firebird-support] Re: Identify wirecompression
> how to identify that connection use WireCompression effectively? See http://tracker.firebirdsql.org/browse/CORE-5536 http://tracker.firebirdsql.org/browse/CORE-5536 and http://tracker.firebirdsql.org/browse/CORE-5601 http://tracker.firebirdsql.org/browse/CORE-5601 Hope it helps, Vlad
[firebird-support] Re: [fbserver 2.5.8] crash after recreation of Foreign Keys
Firebird creates index FK_AUTCOM_FCPMTER for relation AUTCOM_AUTRE_COMMENTAIRE. Engine found error isc_foreign_key_target_doesnt_exist and build error message with indexed fields values. There are four fields in the index. When engine evaluated value of 3rd one, its crashed. Below is what was evaluated just before the crash: "AUTCOM_FCPM_CODE_FK_PK" = 9219, "AUTCOM_CDF_TER_CODE_FK_PK" = 'DE1', "AUTCOM_NATURE_CIPEMG_FK_PK" Please, try current snapshot build of 2.5.9. If problem persist register it at the tracker. To fix it i need more info. Copy of database and script to reproduce would be ideal. Regards, Vlad
Re: [firebird-support] gsec in Firebird 3.0
>One question related to changing SYSDBA password for the first time > without using gsec. >I noticed that, as you have no other database than security3.fdb, you > must connect to it, >but for doing so you can't use remote connections ( not even localhost ) Correct >and, as you access directly to the database file, you must run isql-fb as > root. Why do you think so ? You should be member of "firebird" group, created by installer. No need to be a root. Never. Regards, Vlad
[firebird-support] Re: DROP table statement hangs Firebird Server process with 100% CPU usage
Could you send messages by last validation from firebird.log to me ? Or, if you can - find just 3 record level errors and show it here. I suppose most of 11236 db page errors is about orphan pages (absolutely harmless, btw) Regards, Vlad
[firebird-support] Re: DROP table statement hangs Firebird Server process with 100% CPU usage
Thanks, table looks good. Could you also validate database (gfix -v -full) and show results here ? Regards, Vlad
[firebird-support] Re: DROP table statement hangs Firebird Server process with 100% CPU usage
Please, run gstat -r -t CONTEXTS and show its output here. Regards, Vlad
[firebird-support] Re: DROP table statement hangs Firebird Server process with 100% CPU usage
Could you attach gdb to the Firebird process and take stack backtrace of all threads ? Regards, Vlad
[firebird-support] Re: in new API
---In firebird-support@yahoogroups.com, wrote : >>> and connection (= current_connection)? >> Almost the same way as with ISC API: use ITransaction::getInfo() and >> IAttachment::getInfo() >I search since but can not find any info on items: byteptr. >in dot net sources, i found a constant isc_info_next_transaction: = 107 >but does not exist in firebird.pas. I assumed you already know how to get this info using ISC API, seems i was wrong. Anyway, below is what you are looking for: isc_info_attachment_id = 22 isc_info_tra_id = 4 All constants can be found at \include\ibase.h Regards, Vlad PS Feel free to ask more, if needed
[firebird-support] Re: in new API
> in the new API, how to find the transaction id (= current_transaction) > and connection (= current_connection)? Almost the same way as with ISC API: use ITransaction::getInfo() and IAttachment::getInfo() Regards, Vlad http://tetrasys.fi
[firebird-support] Re: Getting Group By subtracting total for every record in the group
Vishal, does you read documentation ? https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-dml-windowfuncs.html https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-dml-windowfuncs.html See chapter "Ordering" Regards, Vlad
[firebird-support] Re: How to clear all TABLE and FIELD descriptions in FB3?
https://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-ddl-comment.html https://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-ddl-comment.html Regards, Vlad
[firebird-support] Re: isc_detach_database() after fb_cancel_abort
fb_cancel_abort closed client side of connection but does nothing with client resources. isc_detach_database should be called to free client resources. It should nullify db handle and return isc_network_error (in most cases), error should be ignored. Regards, Vlad
Re: [firebird-support] Database file modified shortly after NBACKUP -L
> > I had the flush params commented out = set to defaults. > > Now trying with: > > MaxUnflushedWrites = 1000 > > MaxUnflushedWriteTime = 300 > > > > I assume that should imply that a delay of 300 seconds (5 min) after > > NBACKUP -L should be sufficient. Will try with ten minutes. > > > > Didn't work. I still got a modified file error on copy. > > Now trying with these settings > MaxUnflushedWrites = 100 > MaxUnflushedWriteTime = 60 > > And also 100 select transactions in an isql script between lock and > copy. If this works as expected, I would assume that each transaction > results in at least one disk write (header page?), which should force a > flush. But perhaps the MaxUnflushesWrites param doesn't mean number of > write operations to any page, but rather number of pages that have been > written to? In that case I'm not sure my dummy SQL will have any effect. MaxUnflushesWrites is not about every single page write. It is sooner about "write process" as a whole. Every write (not read-only) transaction finishes with such "write process": when all pages modified by this (and probably some others) transaction is writen to disk. > I'm reluctant to use a script/mode/setting that essentially ignores the > flush and copies anyway. I assume this would imply a risk of a corrupt > copy. If not, please explain why. There is no writes to the souce file contents and copy can't be corrupted. In any case - you asks for opinions and mine is above. This is just an opinion. Decision is up to you ;) Regards, Vlad
[firebird-support] Re: FB3 : MapViewOfFile failed
---In firebird-support@yahoogroups.com, wrote : Hi Vlad, In firebird.log the message is : SRV-BM Thu Apr 05 14:30:51 2018 Operating system call MapViewOfFile failed. Error code 8 SRV-BM Thu Apr 05 14:30:51 2018 LockManager::LockManager() operating system directive MapViewOfFile failed Espace insuffisant pour traiter cette commande. Espace insuffisant pour traiter cette commande = Not enough storage is available to process this command The error is clear - this is not enough some system resources. Ansewrs on questions below could help to understand - which and why: - what Firebird architecture and bitness do you use ? - how much Virtual Memory is allocated to the Firebird process ? - show all changed settings in firebird.conf, please. Regards, Vlad
[firebird-support] Re: FB3 : MapViewOfFile failed
Exact error message is required. And check firebird.log also Regards, Vlad
Re: [firebird-support] Re: Database file modified shortly after NBACKUP -L
> Thanks! As a workaround, I attempted gfix -write sync, but alas, it will > work only if no other attachments. We start the copy at midnight, when > it's likely there won't be other connections, but can't be guaranteed. > > For now, I've added, between lock and copy, a dummy isql script that > does a select and commits, and then a 1 hour delay before starting copy. > But I fear this won't guarantee that the flush happens before copy starts. > While waiting for a fix(?) I'd appreaciate other suggestions how to > force that flush to happen sooner. How often Firebird flushes database is ruled by two configuration parameters: MaxUnflushedWrites and MaxUnflushedWriteTime. Also, note - for database with ForcedWrites = ON there is no explicit flush at all. I've made a quick look at FastCopy source code and found that if "Nonstop" checkbox is checked - it will ignore changed timestamp of source file (while still should react on real copy errors). Or, you may want to disable updating of "modify file" timestamp at OS level - this is often used at Windows servers to reduce IO load. Hope it helps, Vlad
Re: [firebird-support] Re: Database file modified shortly after NBACKUP -L
> After testing a bit more, I notice that the locked database file has its > timestamp updated when firebird.exe does a "FlushBuffersFile" operation, > which can occur several minutes after the NBACKUP -L operation. > > Isn't that a bug? Everything should be flushed to file immediately when > (before?) the database file is locked, shouldn't it? Very interesting, thanks for investigation. When engine flushes page cache, it call FlushFileBuffers (on WIndows) for database file(s), shadow file(s) (if present) and physical backup difference (delta) file (if database is in stalled or merge mode). Note, database files is flushed despite of backup state. It was considered as no-op if there was no writes to the database file. And, of course, in stalled mode there is no writes to the database file. You may ensure it using same ProcMon tool. But ! FlushFileBuffers could write file metadata also, and it seems we deal with exactly this case (and yes - it is not exactly no-op, as we see now). Now we should decide what to do with it. Regards, Vlad
[firebird-support] Re: Database file modified shortly after NBACKUP -L
---In firebird-support@yahoogroups.com, wrote : ... > > It seems like the original database file is touched about a half to one > minute after being locked with NBACKUP -L. > > Why is the locked database file touched? > > I'm not sure if it's actually modified, but the timestamp is certainly > updated. Firebird itself doesn't update file timestamp directly. But filesystem often does it in lazy\background mode (for performance reason). You may know for sure using ProcessMonitor tool, if you wish Regards, Vlad
[firebird-support] Re: nbackup - Problem on "attach database"
---In firebird-support@yahoogroups.com, wrote : > When I try to make a backup with nbackup on our customer’s system (Windows Server 2016 – Firebird 3.0.3) we get the following message, while we are connected to the database with the “IBExpert” at the same time. When we are not connected, the backup will run. What kind of connection is used in IBE ? I guess, it is embedded connection (local, default) - correct ? Regards, Vlad
[firebird-support] Re: FB3.0.2 : Lost one record (update on power off ?)
> We have a strange thing on a firebird 3.0.2 database > One only Machine on Windows (Microsoft Windows Embedded Standard) > We lost a record in a database > Circumstances : > > Power off of the computer in activity > After restart our program doesn't work ( Qt Program ) Is ForcedWrites ON or OFF ? > No problem on validation Does you run full validation ? Could you show gfix command line ? Do you have copy of "broken" database ? > Backup and restore ok without problem > and we find that a main record in a table is not exist anymore I guess there is no FK constraints to that "main table" ? Regards, Vlad
Re: AW: [firebird-support] Re: Trace not working
> Well, I started the trace and the system prompted the message about trace > start its ID. But there was no output. > Now I realized, that there is a difference between the alias and the absolute > database path in config. > > I used the alias name in config and the absolute path in my application. > When I switched the application to the alias > name I was able to get the correct trace outputs. Is there a documentation > about that? I couldn’t find anything about it. Trace, of course, doesn't try to expand value set at the "database" section using the aliases.conf\databases.conf. Documentation at the beginning of the default fbtrace.conf say: # Pattern is either database name without path or "SIMILAR TO"-based regular # expression which is matched against fully qualified database path name. Hope it is clear now :) Regards, Vlad
[firebird-support] Re: Trace not working
Hi Martin, > the trace works now. Good to know ;) > It just took a long time to start. Hmm... what do you mean ? There should be almost instant message about trace started with trace ID, but then messages will appear only when some events happens in database. Regards, Vlad
Re: AW: [firebird-support] Re: Trace not working
---In firebird-support@yahoogroups.com, wrote : > after correcting the config, I’m still unable to get a trace. Do you have > any further hints? Without config and error message i can do notning Regards, Vlad
[firebird-support] Re: Trace not working
Hi, Martin > I’m trying to trace a firebird database. I have following trace config: > > database = sd40.fdb > { > enabled = true > log_connections = true > log_transactions = true > log_statements = true > log_statement_prepare = true > time_threshold = 0 > max_sql_length = 65536 > } > > I start the trace: > fbtracemgr -se localhost/3050:service_mgr -user sysdba -password masterkey > -start -name "My Trace" -config sd40.trace.conf > > When I execute a query in Flamerobin I get this message (and no trace > output): > Trace session ID 1 started > Error creating trace session for database "syndesk40.fdb": > error while parsing trace configuration > line 6: element "log_statements" is unknown > > Can someone show me the mistake? Just read error message ;) There is no "log_statements" parameter in trace configuration. Look for all known parameters at fbtrace.conf supplied with Firebird. Regards, Vlad
Re: AW: [firebird-support] Re: 335544382. Can't allocate difference page
> ---In firebird-support@yahoogroups.com, wrote : > > Hi again, > > > I had the error now again: 335544382. Can't allocate difference page > > I think that happened when I tried to execute > ALTER DATABASE END BACKUP > > I also found the following in syslog: > > Feb 19 04:24:13 kernel:traps: firebird[16552] trap invalid opcode > ip:7fabfa1bec19 sp:7fabd19c6950 error:0 in > libpthread-2.23.so[7fabfa1b2000+17000] > Feb 19 04:24:13 systemd-coredump[16555]: Cannot store coredump of 5837 > (firebird): No space left on device > Feb 19 04:24:13 systemd-coredump[16555]: Process 5837 (firebird) of user 450 > dumped core. > > Feb 27 09:03:34 kernel:traps: firebird[5995] trap invalid opcode > ip:7f94c16c8c19 sp:7f94af7fb4a0 error:0 in > libpthread-2.23.so[7f94c16bc000+17000] > Feb 27 09:03:35 systemd-coredump[7883]: Cannot store coredump of 5846 > (firebird): No space left on device > Feb 27 09:03:35 systemd-coredump[7883]: Process 5846 (firebird) of user 450 > dumped core. > > Sadly I do not have a coredump (as that part of the harddrive is not mounted > writeable). Hmm... "No space left on device" error points into another direction... > But also notice, that the firebird database partition still has >400GB free > space. Does you defined explicit difference file name in that database ? > Also I found a "335544363. no transaction for request" error, but I have no > timestamp and cannot correlate it with the crash. > However I got the impression that this happened really short after the crash > (and we are using a connection pool). > > This is currently firebird 3.0.2. > Does the information above help in any way? Almost no, sorry. Crash dump could help. firebird.log contents also could help. And output of gstat -h Regards, Vlad
Re: [firebird-support] Trying to figure out if CORE-5615 is on fb 3.0.3
Karol, > It was included in > https://github.com/FirebirdSQL/firebird/commit/9c66f3c8d018e9256042f7ad210562c93426a55c https://github.com/FirebirdSQL/firebird/commit/9c66f3c8d018e9256042f7ad210562c93426a55c You show commit at master branch, commit at B3_0_Release is there: https://github.com/FirebirdSQL/firebird/commit/533b78ac10ee4305522299181c44aa401fad7df4 https://github.com/FirebirdSQL/firebird/commit/533b78ac10ee4305522299181c44aa401fad7df4 But you absolutely correct in that > but you have not confirmed if this commit fix your problem on the tracker. is a reason why bug not marked as fixed and not included into Release Notes. Rudi, fix for CORE-5615 included into 3.0.3 Regards, Vlad
Re: [firebird-support] Firebird 3 advanced plan output > how to use this with the API?
Hi, Martijn > How to get it, without using isql. Pass isc_info_sql_explain_plan (value 26) into isc_dsql_info() instead of isc_info_sql_get_plan (value 22) Regards, Vlad
[firebird-support] Re: No permission to remote access to database
---In firebird-support@yahoogroups.com, wrote : > How to add permission to login into security3.fdb? Remote login into security database was intentionally forbidden many years ago by security reasons. Embedded connection still possible. Regards, Vlad
Re: [firebird-support] Re: server 2.5.8 deadlocked
---In firebird-support@yahoogroups.com, wrote : On 13/02/18 17:55, Dmitry Yemanov dimitr@... mailto:dimitr@... [firebird-support] wrote: > 13.02.2018 05:07, Hamish Moffatt wrote: > >> I attached gdb and dumped the state of all threads, which shows every >> one of them is waiting on a mutex or futex, ie it's dead locked. I've >> attached the trace. > You need to download the debug symbols (Firebird-debuginfo-* package) > and copy them into your FB installation directory. Then take the > backtrace again. > > It locked again. 2.5.8 super server on 32-bit linux. Super Server, really ? Why ? Well, it is not bad just strange choce. But why, why, why 32 bit ??? In any case, please, zip backtrace and send it to me (fbvlad at yahoo com) Regards, Vlad
[firebird-support] Re: 335544382. Can't allocate difference page
> ---In firebird-support@yahoogroups.com, wrote : > > > I am using firebird 3.0.2 and I access it using java (jaybird). > The system is running on linux 4.12. > > I am trying to execute the following statement: > ALTER DATABASE END BACKUP; > > Then I get the following error: > GDS Exception. 335544382. Can't allocate difference page > > > Can someone tell me what is going on? In short: write to the difference file was not successfull. Common reason could be out of disk space or some other error at filesystem\disk level. Of course, there is always exists possiblilty of some kind of bug at the engine itself... but i never saw such errors before. > I am sure there was no power outage and the system did not reboot. > There are no indications about hard drive errors in the logs. > > What could I do to find the source of this problem? Is it reproducible ? What is the current state of the database (gstat -h) ? Any messages at firebird.log around that time ? Regards, Vlad
Re: [firebird-support] Re: FB3 Embedded on Android
---In firebird-support@yahoogroups.com, wrote : > > setting the FIREBIRD_LOCK to app/cache solve the problem. Noted, thanks > Now I have get privilege error but this time is a FB error. > > FB is working now. > > SQL Message : -607 > This operation is not defined for system tables. > > Engine Code: 335544351 > Engine Message : > unsuccessful metadata update > CREATE TABLE TMP_INSERT_TEST failed > There is no privilege for this operation Embedded engine doesn't verify user password but it still requires correct user name and checks all SQL operations against it. I guess, you provide no user name and engine uses OS user name. Obviously, it have no SQL privileges. So, provide correct user name when attaching to database (password could be omitted in embedded case). Regards, Vlad
[firebird-support] Re: FB3 Embedded on Android
---In firebird-support@yahoogroups.com, wrote : > > Hi, > I'm trying to put the embedded version running on android, > but FB is allwys trying to connect to localhost. > > > The FB files are located on the app files folder > > files/firebird/libfbclient.so > files/firebird/firebird.msg > files/firebird/plugins/ libEngine12.so > files/firebird/intl/fbintl. conf > files/firebird/intl/libfbintl. so /*The icu files are not in the distributed tar */ This is wrong structure, where do you get it ? For correct structure look at android build here https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.arm.tar.gz https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.arm.tar.gz It contains subfolders : /bin with executables (you don't need it for embedded), /lib with libfbclient.so (you don't have it and this is the reason for errors you see) > When I try to create a local database, trough IBPP, I'm getting the follow > error: > > Error message: > SQL Message : -902 > can't format message 13:98 -- message file /data/data/com.fb.test/files/ > firebird.msg not found > /* FB is trying to pick the firebird.msg form files and not from > files/firebird, where the libfbclient.so is located ??!!?!?!?*/ Because firebird.msg is looked at one folder above libfbclient.so. If you put libfbclient.so into /lib (files/firebird/lib in your case) it will start to work as it should. > Engine Code: 335544721 > Engine Message : > Unable to complete network request to host "localhost". > Failed to establish a connection. Because libfbclient.so is in wrong place, it can't find and load plugin libEngine12.so, therefore it tries to use next provider from default list - Loopback. Loopback provider add "localhost:" to the connection string and thus the error above. > What is wrong about my embedded structure, Hope it is clear now > and what are the rules to use the embedded connection ? Nothing special, i'd say ;) Regards, Vlad
Re: [firebird-support] Re: FB3 Embedded on Android
---In firebird-support@yahoogroups.com, wrote : > > setting the FIREBIRD_LOCK to app/cache solve the problem. Good > Now I have get privilege error but this time is a FB error. > > FB is working now. > > SQL Message : -607 > This operation is not defined for system tables. > > Engine Code: 335544351 > Engine Message : > unsuccessful metadata update > CREATE TABLE TMP_INSERT_TEST failed > There is no privilege for this operation Embedded engine doesn't verify user password but still requires correct user name and checks all SQL operations against it. I guess, you provide no user name and engine uses OS user name. Obviously, it have no SQL privileges. So, provide correct user name when attaching to database (password could be omitted in embedded case). Regards, Vlad
Re: [firebird-support] Re: FB3 Embedded on Android
---In firebird-support@yahoogroups.com, wrote : > Yes, putting firebird.conf and firebird.msg one folder above gives some > progress.. Good to know. Looks like wrong build configuration, will investigate it ... > Can not access lock files directory /data/local/tmp/firebird/ Usually, firebird creates this folder by itself > It seems that the user can't access to data/local/tmp > I can only access to /data/local/tmp as root Seems you found a root of the problem. As a quick workaround you may set FIREBIRD_LOCK environment variable to the some accessible folder. The variable should be set before your app start or even by your app but before first call of Firebird API. Hope it helps, Vlad
Re: [firebird-support] Firebird 3 - Auto Garbage collection with Sweep interval = 0
Hi, Helen Good description, as always ;) Let me add some details > A GC run updates the record statistics but it does not remove the > stubs of deleted records. GC doesn't update record statistics (not sure i understand you correctly here) and it removes delete stubs - when OST become greater than deleting transaction number. Delete stub is usual record version, after all. Hope it helps, Vlad
Re: [firebird-support] Re: FB3 Embedded on Android
> ---In firebird-support@yahoogroups.com, wrote : > > Same error. > > I'm more inclined to something related with relative paths or similar. > > If you notice the fbclient is trying to read firebird.msg from the wrong > folder. Yes, it is strange. What if put modified firebird.conf (and firebird.msg) one folder above ? Regards, Vlad https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail #DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2
[firebird-support] Re: FB3 Embedded on Android
Add firebird.conf file and change #Providers = Remote,Engine12,Loopback by Providers = Engine12 Idea is to see what error is returned by Engine12 provider (if any). Probably something wrong with privileges at file system level. Regards, Vlad
[firebird-support] Re: Query crash in Firebird 3.0.3
> Is it as expected ? No, please register it at tracker. Regards, Vlad
RE: [firebird-support] info
> If I try the select, I don’t have any record where realindex is null Check RDB$INDEX_INACTIVE for non-zero\not-null values Regards, Vlad
Re: [firebird-support] Re: Deadlock error from firebird during midnight
---In firebird-support@yahoogroups.com, wrote : On Thu, Dec 14, 2017 at 4:31 PM, hvlad@... mailto:hvlad@... [firebird-support] mailto:firebird-support@yahoogroups.com> wrote: >>> 1. The PID remains same: 4212, before and after the exception is caught. >> >> I.e. there was no crash of Firebird, very good. >But still Firebird that just dropping connection instead of returning a >proper error is >not very good. Again wild guess with no proof. If there is a bug at Firebird side - give it to mee and i'll fix it. But stop speculate and confuse people. Vlad > Hi Vlad, > > I am sorry, if I have caused any discomfort. > Please realise my condition, a deployed application running fine since 2009 > is coming to a grinding halt. Rajiv, It was not about you - it was about DS who often make badly thought public statements. I fully understand you and wish to help you to find a real root of the issue and finally fix it. Could you make simplest application to reproduce the problem ? I would run it at my machine and trace Firebird side of communications. Regards, Vlad
Re: [firebird-support] Re: Deadlock error from firebird during midnight
>>> 1. The PID remains same: 4212, before and after the exception is caught. >> >> I.e. there was no crash of Firebird, very good. >But still Firebird that just dropping connection instead of returning a >proper error is >not very good. Again wild guess with no proof. If there is a bug at Firebird side - give it to mee and i'll fix it. But stop speculate and confuse people. Vlad
Re: [firebird-support] Re: Deadlock error from firebird during midnight
>---In firebird-support@yahoogroups.com, wrote : >> On Thu, Dec 14, 2017 at 3:34 AM, hvlad@... mailto:hvlad@... >> [firebird-support] > mailto:firebird-support@yahoogroups.com> wrote: Looks like there was no crash of Firebird or WER doesn't catch it. You may easy check if Firebird really crashed: just look at its PID before and after run test application (and got exception). > 1. The PID remains same: 4212, before and after the exception is caught. I.e. there was no crash of Firebird, very good. > 2. After the exception is caught, connection to the database is lost. > Subsequently, any action on > my .NET application throws unhandled exception- "Object reference not set to > an instance of object". > Connection is possible only after re-start of my .NET application. Looks like .net provider issue. Could you provide sample app and db and ask at .net provider list ? Regards, Vlad
Re: [firebird-support] Re: Deadlock error from firebird during midnight
Looks like there was no crash of Firebird or WER doesn't catch it. You may easy check if Firebird really crashed: just look at its PID before and after run test application (and got exception). Regards, Vlad
Re: [firebird-support] Re: Deadlock error from firebird during midnight
> 1. In the firebird.config file set: > BugcheckAbort = 1 Ok. Hope you restarted Firebird service after config editing. > 2. Created registry entry: > HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error > Reporting\LocalDumps > > Name = DumpType > Type: REG_SZ > Data = 2 Ok. What about DumpFolder ? > 3. Started my .NET front end application. When the exception "Error Reading > Data from Connection" was caught (Message Box displayed) : > (a) Right-click an empty area of the task bar, and then click Task Manager. > Click the Processes tab. (In some > versions of Windows, it may be necessary to click 'More details' to expand > the Task Manager view to display the tabs.) > (b) Right-click the name of the process (in my case the Firebird service and > my .Net front end application) that you want, and then click Create Dump > File. > If you are prompted for an administrator password or confirmation, type your > password or click Continue. > (c) Message box displays dump file path for the process is created. Wrong. It creates process dump not related to the crash. If there really was a crash, you should look for crashdump at DumpFolder. Regards, Vlad
Re: [firebird-support] Re: Deadlock error from firebird during midnight
---In firebird-support@yahoogroups.com, wrote : > 2. Fresh DMP files at: How do you produce Firebird dump ? It shows healthy process with one idle attachment to the HMS.FDB waiting for user actions. Regards, Vlad
[firebird-support] Re: Deadlock error from firebird during midnight
> 1. I have obfuscated data in my database and again created the DMP files > after the crash. The pack at the URL below contains > the DMP files (of the Firebird server and my .NET front end application) and > the database file: Dump file you created is useless without debug info generated for the exactly same build of binaries in dump. Snapshot build you used not available anymore (there is newer snapshot build inplace). So, share snapshot build that you used, or provide new crash dump using latest stable release (3.0.2 in your case). Regards, Vlad
RE: [firebird-support] Re: Slow execution of Stored Procedure after 20 min. inactivity
> ---In firebird-support@yahoogroups.com, wrote : > > With “idle” I mean no connections at all. > I already found out the problem is related to a custom UDF dll, but it’s > unclear to me why this only happens after 20 minutes. > I added some logging to the UDF so I could see when the UDF was loaded and > unloaded and the memory usage at those moments. > The UDF is properly loaded and unloaded without any difference in memory > usage after the UDF has been used. I.e. sometimes load of UDF took 18 sec ? Really ? Wow ;) Regards, Vlad
[firebird-support] Re: Slow execution of Stored Procedure after 20 min. inactivity
> ---In firebird-support@yahoogroups.com, wrote : > > Hello, > > After spending more than a week trying to resolve the following issue we hope > someone has an answer on this. > > We have a database with about 230 tables and 200 stored procedures which is > being used by our customers. > Each customer have a dedicated installation with it's own database varying in > size from 50MB up to 2GB. > At the moment they use Firebird 2.5.1.26351 Super-Classic Win32 on different > platforms (Win 7 Pro, Win 10 Pro, Windows server 2012 R2). > > The issue occurs when we execute a complex (recursive) stored procedure after > the database engine has been idle for about 20 minutes. Define "idle": no active connections ? no connections at all ? What about other activities on this host ? > Executing the stored procedure after those 20 minutes can take around 18-20 > seconds to complete, while it normally takes around 0,1 seconds. > Even after restarting the Firebird service executing the stored procedure > immediately never takes longer then 3-4 seconds (unless the 20 minutes are > passed). Looks like database file is removed from system cache after 20 min, probably due to load by another processes. You may use Sysinternals RamMap utility to check this guess. > Things we tried: > > * Restarting the Firebird service. > Even if we restart the Firebird service between those 20 minutes, once the > 20 minute mark is reached it simply takes around 20 seconds again. > * Installed firebird and the database on an SSD (Samsung Evo 500GB) under > Windows 10 Pro (Fall Creators update) with default configuration. > - No difference. > * Turned off inactivity settings in Windows for the HDD, so Windows doesn't > turn off the HDD. > - No difference. > * Upgraded Firebird to version 2.5.7.27050. > - No difference. > * Upgraded Firebird to version 3.0.2 using the migration guide > (backup/restore, etc.). > - No difference. > > When we insert a record into a random table within the same connection and > transaction before executing the stored procedure, > after those 20 minutes the insert is fast and executing the stored procedure > takes around 20 seconds again. > > >This is the trace of what happens when we execute the stored procedure after >20 minutes (watch the prepare of statement 70). ... Trace show that prepare call takes 18 sec, execute is fast. Prepare could be slow if - there is one or more huge tables affected by the query - optimizer should estimate cardinality of tables and it should read all Pointer Pages of the given table(s) - there is a lot of different privieges granted to the objects affected by the query (stored procedure itself, all tables\views\SP's it uses and all objects of whole call tree) - even if there is not much provileges but execution tree is big - engine should load all corresponding metadata objects and it could take time Regards, Vlad
[firebird-support] Re: lock denied...
---In firebird-support@yahoogroups.com, wrote : > last weekend we switched from FB 2.5.x to FB V3.0.3.32796 > > We have couple databases, the biggest has around 12 GB. > About 100-200 clients are connecting to this DB via PHP approximately twice > per minute to see some data. > Some services on server are writing data into this DB. > We are using FB in SuperClassic mode, because some services are written in C > and compiled via gpre/gcc. Hmm... i see no relation between such services and requirement to use SuperClassic. Сould you try Super mode ? SuperClassic in FB3 is legacy and not recommended mode. > In firebird log I can see messages like this: > > z3 Sun Dec 3 01:43:15 2017 > Database: /opt/firebird/security3.fdb > page 0, page type 1 lock denied (216) ... > Could you please explain me, what do this messages mean? It looks like bug due to race condition when lock manager initialized shared memory while another instance (attachment) is deinitialized it (it is simplified and far from exact description). It could be something else - i need to reproduce the issue to make correct conclusion. > How can I avoid them? Try to lower load on lock manager. Switch to Super, or try to increase linger on security3.fdb (it is 60 sec by default). > What shall I look at? If there was coredump produced by crash, you may provide us with backtraces of all stacks. Regards, Vlad
[firebird-support] Re: FBExport tools
---In firebird-support@yahoogroups.com, wrote : > please inform me how can I use this "FBExport" tool... http://fbexport.sourceforge.net/manual.html http://fbexport.sourceforge.net/manual.html Regards, Vlad
[firebird-support] Re: compiling c udf
> So how to compile in windows? Use compiler ! Sorry, can't resist ;) Make sure you link with fbclient_ms.lib (and, probably you need ib_util_ms.lib also) Regards, Vlad
[firebird-support] Re: compiling c udf
---In firebird-support@yahoogroups.com, wrote : > > I have tried this in both firebird 2.5.5 and Firebird 3.0 > > I have a set of c libraries loosely based on FreeUDFLib.c > > I attempt to compile them and I get: > > Error c:\udf\date_functions.c 108 undefined reference to _isc_decode_date@8 > Error c:\udf\date_functions.c 510 undefined reference to _isc_encode_date@8 > > Does anyone have a clue? Looks like you use C++ (instead of plain C) prototype for the isc_encode_date. Regards, Vlad
[firebird-support] Re: Attempt to set in database number of buffers which is out of acceptable range ...
> Is there any way to "force" the restore anyways and then set the DB cache > pages to a reasonable number on the Win32 server? firebird>gbak -? gbak:Usage: ... gbak:restore options are: -BU(FFERS)override page buffers default Regards, Vlad
[firebird-support] Re: Firebird 3 crashes, unable to capture crash dumps ( terminated abnormally (4294967295) )
Rudi, try to set BugcheckAbort = 1 at firebird.conf Regards, Vlad
[firebird-support] Re: FB 3.0 Replacing ICU libraries
---In firebird-support@yahoogroups.com, wrote : > I need unicode collation for Swedish and therefore I have to replace the ICU > libraries. > > First I have downloaded the snapshot for FB 3.0.3 for Windows > (Firebird-3.0.3.32802-0_x64). > Then I went to http://site.icu-project.org/download and downloaded > icu4c-52_1-Win64-msvc10.zip from > where I got the icu*52.dll's and extracted them to the FB3 folder, replacing > the existing ones. > No changes done in intl\fbintl.conf or anything else. > > I would appreciate if anyone could just answer if this is the correct way to > do this. Seems, yes, but better ask in fb-devel and i hope Adriano will explain things Regards, Vlad
[firebird-support] Re: Security per database - migrating from FB 2.5
Marcin, you have to make embedded connection to the zt1 and create at least one user there (probably you need sysdba, probably no): isql zt1 create user sysdba password 'pwd'; Regards, Vlad
[firebird-support] Re:
---In firebird-support@yahoogroups.com, wrote : > I have this table: > > CREATE TABLE TRAZABILIDAD_ERRORES ( > CODIGO_ERROR SMALLINT, > DESCRIPCION_ERROR VARCHAR(400), > TIPO_ERROR SMALLINT > ); > > When I try to add a PK: > ALTER TABLE TRAZABILIDAD_ERRORES > ADD CONSTRAINT PK_TRAZABILIDAD_ERRORES > PRIMARY KEY (CODIGO_ERROR); > > I get: > unsuccessful metadata update. > ALTER TABLE TRAZABILIDAD_ERRORES failed. > unknown ISC error 336068731. This is: Column: @1 not defined as NOT NULL - cannot be used in PRIMARY KEY constraint definition Looks like you have wrong Firebird client\message file > It´s "fixable"? Sure. PK columns must be defined as NOT NULL Regards, Vlad
RE: [firebird-support] Re: Firebird 3 crashes ( terminated abnormally (4294967295) )
---In firebird-support@yahoogroups.com, wrote : >>How much virtual memory Firebird process is used before the crash ? >>Any messages in the firebird.log near the crash time ? > > Vlad, not much memory, about 400k out of 12gb. 400KB ? Or 400MB ? 400KB is too small to be true ;) > There’s no other messages in the log before, just the crash msg “terminated > abnormally (4294967295)” > Currently I’m tracing every database being accessed, logging every query > trying to find any suspects, but still no luck. > The crashes still looks to be very random. > I’m inclined to use a debug version and generate a crash dump as someone > suggested. There is no "debug version". There is "debug information" - set of .pdb files used by debugger to analyze crash dump. You don't need it unless you are going to analyze by yourself. > Would that be helpful? And, are there any tutorials on how to set this up? Yes, crash dump usually allows us to know exact reason of crash. 1. Disable Guardian. It is important ! Make sure it is not running. 2. Collecting User-Mode Dumps: https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181.aspx > We have seem a lot of improvement in performance with firebird 3, and I’d > really like to avoid having to rollback to 2.5 Glad you like Firebird 3 :) Regards, Vlad
[firebird-support] Re: Firebird 3 crashes ( terminated abnormally (4294967295) )
Rudi, How much virtual memory Firebird process is used before the crash ? Any messages in the firebird.log near the crash time ? Regards, Vlad
Re: [firebird-support] Re: Detecting disk operations
> 3. Page is read/write from temp object bigger then memory buffer e.g big > global temporary table, others? >> GTT's data go thru the common page cache as all other database operations. What happen when GTT will be bigger then whole mem cache? It will go to disk? If yes, how to catch such situation? Temporary files, used for GTT, is created with FILE_ATTRIBUTE_TEMPORARY attribute (on Windows), thus OS could cache its contents more aggressively than for non-temp files. Firebird doesn't control when OS decides to write data to disk. Also, Firebird doesn't flush temp files buffers to disk on commit and ignores database FW setting for these files. Is there some other situation where some “buffer” go to disk? Firebird uses temporary files for sorting and for the part of undo-log. Amount of temporary data maintained in memory (before is will go to the disk file) is controlled by the TempCacheLimit setting. Also, note, that OS could additionally cache temporary files data in memory. When OS physically writes this data to disk is out of Firebird control. P.S. Should i create ticket with feature request about collection of this stats? Yes, please. Regards, Vlad
[firebird-support] Re: Firebird 3 encryption size issue
> I have a problem about the database encryption in Firebird 3. I hope you can > give me some solution or an email address where i can get advice. > I would > like create an encryption DLL but my algorithm create bigger encrypted data > size than the source data. > As I see its not possible now and in the pdf below contains that: "Encrypted > size == initial size". > Could you inform me if its issue under development or when will be released > the solution to my problem? I doubt it requirement could be removed. Firebird performs disk IO using pages of fixed size and any encryption should preserve data size else it will not fit into data page. Regards, Vlad
[firebird-support] Re: Detecting disk operations
> Is there a way to detect throught mon$ tables or trace or other way disk > operations caused by query? Engine collects some performance stats counters internally. Trace, monitoring, ISC API - all query engine's performance data. Therefore there is no "special hidden ways" to ask engine for something that is not collected by the engine itself. Trace is the most precious way to know given query execution statistics. > I see only page_reads and page_writes, page_marks, page_fetches but how to > distinguish which one: > 1. Page is read because missed in cache Page read is always happens when page buffer is missed. Page fetch is always happens when page buffer is accessed by the engine. > 2. Page is read/write beacause of big sort operation Sort IO is directed into separate temporary files and it is nor cached by the engine, nor paged. Unfortunately, engine doesn't collect Sort statistics. You could try to use OS utlities to look at performance stats at the file level, btw > 3. Page is read/write from temp object bigger then memory buffer e.g big > global temporary table, others? GTT's data go thru the common page cache as all other database operations. Hope it helps, Vlad
[firebird-support] Re: connecting to firebird server
---In firebird-support@yahoogroups.com, wrote : Hi All I have FB3 installed on a server. My DelphiXE6 application can access the database via TIBDatabase etc no problem but I cannot connect with the server to back up the database. What client library is used by app ? What connection string ? What is error message or code ? So I installed Flamerobin on the workstation to check and it cannot connect to the firebird server (fails after about 10 seconds with a isc_service_attach failed. Same questions: What client library is used by Flamerobin on the workstation ? What connection string is used there ? What is error message or code ? Regards, Vlad
[firebird-support] Re: UDF and server crashes on linux
---In firebird-support@yahoogroups.com, wrote : Tested on FB 2.5.7 and 3.02 ubuntu_x64 14.04 (two different machines); On windows fbx64 works ok. udf return integer by value. scenario: more than 2 connections to db sql : select count(*) from table where validfield(field) = 1 on each connection table with > 2 milions record udf written in object pascal ( no memory leaks and other problems) other implementation this udf in C++ works fine on linux and windows... stacktrace: [Thread 0x7fa737789700 (LWP 28692) exited] [New Thread 0x7fa737789700 (LWP 28693)] [New Thread 0x7fa736dd7700 (LWP 28694)] [New Thread 0x7fa73603f700 (LWP 28698)] An unhandled exception occurred at $7FA736178E2C: EStackOverflow: Stack overflow This is object pascal exception, not Firebird's one. Start isql, connect in embedded (aka local) mode, attach gdb to the process and run query with problem UDF. It should help you to find a real reason of the issue. Regards, Vlad
Re: [firebird-support] Re: FB3 - Limbo and consistency check
---In firebird-support@yahoogroups.com, wrote : > Do you have reproducible example ? Could you send it to me (or regiser at > tracker), please ? http://tracker.firebirdsql.org/browse/CORE-3679 http://tracker.firebirdsql.org/browse/CORE-3679 That ticket have no information which could be useful for any conclusion. Also, there was distributed transactions used, while in current case - there is not. Regards, Vlad
[firebird-support] Re: Error writing data to the connection OR Error reading data from the connection
---In firebird-support@yahoogroups.com, wrote : Hello FireBird Support! Some customers are having troubles which causes %subject% error messages. I think it can be a problem with UDF, but I cannot prove if it is right. Firebird.log file shows only lines with 10054 and nothing else. How can I find out the reason why a user is kicked off from connection? Apart of network issues - check if server process was crashed\restarted It should be logged at Events Log Regards, Vlad
[firebird-support] Re: FB3 - Limbo and consistency check
Hi Gabor Do you have reproducible example ? Could you send it to me (or regiser at tracker), please ? Regards, Vlad
[firebird-support] Re: FirebirdSQL 3 VMWare Windows
Please, read carefully: https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/qsg3.html https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/qsg3.html https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/qsg3-config.html#qsg3-config-gsec especially this chapter: https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/qsg3-config.html#qsg3-config-gsec https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/qsg3-config.html Regards, Vlad
Re: [firebird-support] Immediate Detection of Disconnected Clients on Classic
---In firebird-support@yahoogroups.com, wrote : On 24.04.2017 o 10:41, atunccekic@... mailto:atunccekic@... [firebird-support] wrote: > We have some desktop applications which are connecting to firebird, started > crashing for a while. > These applications are mostly on our wireless link connected building so I'm > suspicious about the network. > Then I created a new test project. When I run the application, connect to > the database, disconnect the client network just for a second and reconnect > the network again, the database connection is broken and the application > can't continue. > Then I saw a new feature on firebird 2.5 like this: > Immediate Detection of Disconnected Clients on Classic Vladyslav Khorsun > The Classic server now detects immediately when a Classic process has been > broken by a client disconnection. Its response is to terminate any pending > activity, roll back the active transaction and close the network connection. > Tracker reference CORE-818. > Can this be the reason that a short interruption on the network causing the > problems on the application? > Can this feaure be disabled so that I can see if this is the problem or not? Hi, My answer is based more on the way the networs work than the actual knowledge of FB internals. If you work on a wired network and the network interface is set up to auto detect the link availability (in most cases it is), pulling the network plug out and connecting it back causes the network interface to reset (all sockets are closed, the interface is set up from zero). However, if the network is disrupted somewhere in between the end points (your server and client) but both of them have the physical link up, both the server and the client keep the sockets open (eventually re-transmitting TCP packets after some timeouts), because they simply can't know why there's no traffic on the link - failure or just nothing to say ;). When the network gets operatinal again, it's possible that the database connection actually is still valid and the app keeps working like nothing happened. In case of wireless, every disconnection is like pulling the plug - the interface resets and all sockets are closed. That might explain why your crashes occur mostly on clients connected via wifi. Very good and correct explanation I don't actually think Firebird can detect client disconnection "immediately" when there is no data exchange between the server and the client (it would require some kind of heartbeat increasing traffic and would be based on timeouts, which are tricky), otherwise byzantine network partitions wouldn't be so nasty. Firebird can do it even if there is no data exchange because it always listens all known client socket. When OS closed socket it is detected by Firebird listener. Regards, Vlad
[firebird-support] Re: Firebird 2.5 - Alter table - drop default - bug or feature
---In firebird-support@yahoogroups.com, wrote : Hi everyone, I encountered strange behavior droping a column definition with default value. The environment is Ubuntu 16.04 LTS 64 bits, Firebird version LI-V2.5.6.27020 (Firebird 2.5 SuperClassic) I'll try to explain with an example. The statement sequence is: 1. Create the table CREATE TABLE "SCHEMA_AUTHOR" ("ID" integer NOT NULL PRIMARY KEY, "NAME" varchar(255) NOT NULL, "HEIGHT" integer CHECK ("HEIGHT" >= 0)) 2. Popultate with some data INSERT INTO SCHEMA_AUTHOR (ID, NAME, HEIGHT) VALUES ('1', 'Anonimus1', NULL); 3. Alter the table ALTER TABLE "SCHEMA_AUTHOR" ADD "SURNAME" varchar(15) DEFAULT 'surname default' NOT NULL After step 3, I have a record with a new column with 'surname default' value into SURNAME field. 4. Drop default definition ALTER TABLE "SCHEMA_AUTHOR" ALTER COLUMN "SURNAME" DROP DEFAULT After step 4, the SURNAME field value is setting to empty string ('') Is that the correct behavior ? It should be fixed in FB3, AFAIU Regards, Vlad