On 3/5/26 13:16, Tomasz Dubiel wrote:
> Do you agree with Vlad's answer?
>
https://github.com/FirebirdSQL/firebird/issues/8927
> Do you consider it normal that gbak knows no limits and when provided
> irrational parameter values (on purpose or by mistake) it can blow up
> the server?
Well, from a formal perspective, it's not a bug: it is documented
behaviour. From a usability perspective, having some upper limit
(hardcoded, or maybe derived from e.g. (CPU count + 1) of the machine
running gbak) would be desirable.
I agree with Vlad that using MaxParallelWorkers to configure gbak when
run from the Services Manager would overload the meaning, but more
importantly, it would be inconsistent if the standalone binary doesn't
read it. But if standalone gbak would also read it, you would get the
problem that the -PARALLEL switch then wouldn't have the desired effect
(running the restore in parallel) if the binary is placed outside the
Firebird directory: without access to firebird.conf, the default of
MaxParallelWorkers is 1 (i.e. no parallelism), or you'd need to have
multiple defaults, which could be confusing (overloading the meaning).
And although it is a footgun, it is not a security issue: restoring a
database requires administrator privileges or at least additional system
privileges like - IIRC - CREATE_DATABASE and USE_GBAK_UTILITY. Besides,
even a "normal" user would be able to blow up your server in a similar
way by creating a lot of connections (say 16384 ;-)) and maybe selecting
a few blobs with casts to a different subtype or character set, or doing
something else that consumes some additional memory.
Mark