Issue Details (XML | Word | Printable)

Key: CORE-2371
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Blocker Blocker
Assignee: Alexander Peshkov
Reporter: Andrea Magni
Votes: 0
Watchers: 0
Operations

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

fbmgr segfaults while trying to shut Firebird server on Linux CentOS 5

Created: 13/Mar/09 05:42 AM   Updated: 13/Mar/09 03:14 PM
Component/s: Scripts
Affects Version/s: 2.0.4
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Linux CentOS 5.2 (Final)
Firebird 2.0 LI-V2.0.4.13130 (Superserver)

Planning Status: Unspecified


 Description  « Hide
I am trying to stop firebird server by executing this commandline:

/opt/firebird/bin/fbmgr -shut

I get this error:

Invalid clumplet buffer structure: buffer end before end of clumplet - no length component
Segmentation fault

Searching the web I found a suggestion to directly use fbmgr.bin and I tried:
/opt/firebird/bin/fbmgr.bin -shut

But I get the same error.


 All   Comments   Work Log   Change History   Version Control   FishEye      Sort Order: Ascending order - Click to sort in descending order
Andrea Magni added a comment - 13/Mar/09 05:49 AM
Specified I am using SuperServer architecture

Alexander Peshkov added a comment - 13/Mar/09 07:07 AM
Magni, I can reproduce 'Invalid clumplet buffer structure', but can't reproduce AV due to it. But even in case of 'Invalid clumplet buffer structure' error this is not a too big problem - fbmgr can't shutdown server without sysdba password provided to it, explicitly or via environment. Have a look:

fbs bin # ./fbmgr.bin -start -forever
server has been successfully started
fbs bin # ./fbmgr.bin -shut
Invalid clumplet buffer structure: buffer end before end of clumplet - no length component
can not attach to server
fbs bin # ./fbmgr.bin -shut -user sysdba -pas masterke
server shutdown completed
fbs bin # ./fbmgr.bin -start -forever
server has been successfully started
fbs bin # export ISC_USER=sysdba
fbs bin # export ISC_PASSWORD=masterke
fbs bin # ./fbmgr.bin -shut
server shutdown completed
fbs bin #

And there is a much simpler way to stop superserver since version 2.0 - just kill it. You might kill older versions too, but this was not safe. Since 2.0 firebird processes signals 2 & 15 and shutdowns smartly. fbmgr is needed in versions 2.0 and 2.1 just to daemonize the process on startup. In 2.5 it's not needed any more (fbguard can be started directly and becomes daemon) and therefore deprecated. Utility will not be present since version 3.0.

I'm going to close this ticket in a few days, cause see no big reasons fixing this utility.

Andrea Magni added a comment - 13/Mar/09 11:33 AM
Thank you very much. I solved my problem by killing the fbserver where I was used to run fbmgr -shut. So far I have no other issues so it's ok for me to close the ticket.

Best regards,
Andrea

Alexander Peshkov added a comment - 13/Mar/09 02:18 PM
Utility fbmgr is deprecated since 2.5. Use of it to stop server is not recommended since 2.0, therefore no fix needed.

BTW, killing fbserver is more secure - you need not expose sysdba's password in scripts.