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-issue-importer opened this issue Dec 1, 2011 · 17 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Dec 1, 2011

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2011

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 7, 2011

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 7, 2011

Commented by: @AlexPeshkoff

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 8, 2011

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 10, 2011

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 11, 2011

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 14, 2011

Modified by: @paulbeach

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 14, 2011

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 14, 2011

Modified by: @paulbeach

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.2 [ 10450 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 7, 2012

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 7, 2012

Commented by: @paulbeach

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 7, 2012

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 8, 2012

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 8, 2012

Commented by: Samo Dadela (samo_dadela)

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 23, 2013

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 18, 2016

Modified by: @pavel-zotov

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

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 25, 2016

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants