Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebird 2.5.1 OSX Lion hangs on attaching to second database [CORE3682] #4031

Closed
firebird-automations opened this issue Dec 1, 2011 · 17 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: John Roberts (johnr)

I attach to 2 separate databases on the same machine in quick succession via localhost. Firebird always opens the first database with no problems but often hangs opening the second database. The only way out is to kill and restart fbserver as subsequent attempts to reattach to the first database fail. Once it works correctly It then continues through the session to attach without error to both databases repeatedly whenever my program is re-started. On shutting down and later reboot firebird often hangs again. Debugging shows my program stops on calling isc_attach_databaseType. System and firebird logs show nothing that I can see as relevant.

I have tried all 32/64 versions of Firebird for OSX except the lipo version and they all exhibit the same problem in Lion.
I have also had similar hang on detaching from a single database on two occasions.

I have tried a trace/audit but get the message that there are no plugins loaded.

Commits: a38f89c

@firebird-automations
Copy link
Collaborator Author

Commented by: berny (bernysx11_gmail.com)

We have exactly the same problem. Our application open sequentially two databases and 80% of attempts on reboot of the hardware is crashing on open the second Database. So, when I restart the firebird after this affect, firebird is working fine until the next reboot....

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

What server are you using - classic, superclassic or super?

@firebird-automations
Copy link
Collaborator Author

Commented by: John Roberts (johnr)

I have tried all 32/64 versions of Firebird for OSX including the lipo version. If my memory is correct this excepts classic. I have used a standard install using the standard packages. I now am using a debug SS version.

@firebird-automations
Copy link
Collaborator Author

Commented by: berny (bernysx11_gmail.com)

I can confirm John Roberts comment. I also tried wiht every version of firebird (2.5.1 for OS X) under Lion...most of the time the same issue

@firebird-automations
Copy link
Collaborator Author

Commented by: John Roberts (johnr)

The debug Firebird SS supplied to me hasn't hung since installed. I have been re-booting several times a day to test.

@firebird-automations
Copy link
Collaborator Author

Modified by: @paulbeach

assignee: Alexander Peshkov [ alexpeshkoff ] => Paul Beach [ pbeach ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @paulbeach

A problem that seems to be caused by an issue in the installer preupgrade-script. In the interim, if anybody else has this issue
1. Stop the firebird server
2. Run this script

#⁠!/bin/sh
echo "Clean User"
dscl localhost -delete /Local/Default/Users/firebird
echo "Clean Group"
dscl localhost -delete /Local/Default/Groups/firebird
if [ -f "/Library/StartupItems/Firebird" ]; then
echo "Remove Superserver StartupItem"
rm -fr /Library/StartupItems/Firebird
fi
if [ -f "/Library/LaunchDemons/org.firebird.gds.plist" ]; then
echo "Remove Launchd"
launchctl unload /Library/LaunchDemons/org.firebird.gds.plist
rm /Library/LaunchDemons/org.firebird.gds.plist
fi
echo "Remove Framework"
rm -fr /Library/Frameworks/Firebird.framework
echo "Remove Receipt"
rm -fr /Library/Receipts/Firebird*.pkg
echo "Remove /tmp/firebird"
rm -fr /tmp/firebird

3. Re-install Firebird 2.5.x

@firebird-automations
Copy link
Collaborator Author

Modified by: @paulbeach

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.2 [ 10450 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

The visible reason of the bug is not released semaphore in first attachment to database. I could not find anything wrong in firebird, and same code works just fine on MacOS 10.6 and all versions of freebsd (that port is compiled with same defines in x-process sync as Mac port). Therefore looks like there is a problem with System V semaphores in MacOS 10.7.
The fix committed is very bad. First of all, it breaks -c switch in fb_lock_print. Next, it does not fix superclassic which sooner of all will hang in the same manner. Moreover, it can't be front-ported to FB3.
But with it SS starts correctly on any Mac version, therefore it was committed.

@firebird-automations
Copy link
Collaborator Author

Commented by: @paulbeach

If anybody needs a 2.5.1 build with this fix, please contact me directly.

@firebird-automations
Copy link
Collaborator Author

Commented by: Samo Dadela (samo_dadela)

Same problem.
Lion 10.7.3, mac mini server i7 8G, using embedded (extracted from FirebirdCS-2.5.1-26351-i386.pkg.zip).
Does not happen on 10.6.

Can reproduce it 99% of the time:
1. reboot system
2. start isql
3. isql> create database '/tmp/test.db' user 'SYSDBA' password 'masterkey';
4. isql> quit;
5. hang.....

After killing the hung isql the problem does not happen again until next reboot. (run db creation in a loop for 20 minutes - not one hang).

@firebird-automations
Copy link
Collaborator Author

Commented by: @paulbeach

Samo,
Yours is an unrelated issue, probably due to your home rolled embedded version and ownership issues. The problem is bug refers to only affects SuperClassic and SuperServer not Classic.

@firebird-automations
Copy link
Collaborator Author

Commented by: Samo Dadela (samo_dadela)

Paul,
Ruled out 'home rolled embedded' by using Classic 32-bit. See CORE3786.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants