Issue Details (XML | Word | Printable)

Key: CORE-5068
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Carlos H. Cantu
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

gbak with invalid parameter crashes FB

Created: 05/Jan/16 11:49 PM   Updated: 08/Jan/16 06:49 PM
Component/s: Engine, GBAK
Affects Version/s: 2.5.5
Fix Version/s: 2.5.6

QA Status: Done successfully
Test Details:
Confirmed crash on, but only when use 'gbak' utility (with services call).
As of fbsvcmgr, it works correct and reports error: Unknown switch "res_user_all_space".
Output when use gbak is:
   gbak:unknown switch "USER_ALL_SPACE"
   gbak: ERROR:Unable to complete network request to host "localhost".
   gbak: ERROR: Error reading data from the connection.
   gbak:Exiting before completion due to errors

Checked on WI-V2.5.6.26962 - works OK.
No test needed for 3.0 thus only stub code present here in 'firebird_version': '3.0' section.

 Description  « Hide
Typo in gbak's command line parameter causes Firebird process to crash, ie:

gbak -c -v -se service_mgr -user_all_space d:\backup.gbk d:\bd.fdb
gbak:unknown switch "USER_ALL_SPACE"
gbak: ERROR:connection lost to database
gbak:Exiting before completion due to errors

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Claudio Valderrama C. added a comment - 06/Jan/16 12:33 AM
Can't reproduce:

gbak -c -v -se service_mgr -user_all_space d:\backup.gbk d:\bd.fdb
gbak: ERROR:Cannot attach to services manager
gbak: ERROR: user name and password are required while attaching to the services manager
gbak:Exiting before completion due to errors

gbak -c -v -se service_mgr -user_all_space d:\backup.gbk d:\bd.fdb -user sysdba -pass masterkey
gbak:unknown switch "USER_ALL_SPACE"
     gbak -b <db set> <backup set> [backup options] [general options]

isql based.fdb -z -user sysdba -pass masterkey
ISQL Version: WI-V2.5.5.26942 Firebird 2.5
Server version:
WI-V2.5.5.26942 Firebird 2.5
WI-V2.5.5.26942 Firebird 2.5/XNet (ATENEA)/P12
WI-V2.5.5.26942 Firebird 2.5/XNet (ATENEA)/P12
Database: based.fdb, User: sysdba

Vlad Khorsun added a comment - 06/Jan/16 07:42 AM
The bug was introduced in build 26948 by my commit

Revision: 62434
Author: hvlad
Date: 27 October 2015 г. 13:20:18
Backport feature CORE-1999 : TimeStamp in the every line output gbak.exe utility

It was sad typo when backporting

Vlad Khorsun added a comment - 06/Jan/16 07:45 AM
Bug happens only when backup\restore is made using services and when wrong switch is passed.