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 Classic (32-bit) Hangs on MacOSX 10.7 (Lion) on DB create after reboot [CORE3786] #4129

Closed
firebird-issue-importer opened this issue Mar 8, 2012 · 18 comments

Comments

@firebird-issue-importer
Copy link

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

Submitted by: Samo Dadela (samo_dadela)

Attachments:
isql_stacktrace_08032012.txt
fbhang.sh
isql_localhost_stacktrace_08032012.txt
fb_inet_server_localhost_stacktrace_08032012.txt
isql_vg_08032012.txt

Votes: 1

Firebird hangs with simple db create only first time after the machine is (re)booted.

How to reproduce:
1. Install Firebird Classic MacOSX 32-bit:
October 04, 2011 / FirebirdCS-2.5.1-26351-i386.pkg.zip / 14 MB / MacOS X 10.6+ 32-bit Classic, Superclassic & Embedded (Intel) package, compressed
2. Add user to firebird user group:
#⁠ sudo dscl . append Groups/firebird GroupMembership username
3. Reboot!
4. Run:
#⁠ /Library/Frameworks/Firebird.framework/Versions/A/Resources/bin/isql
SQL> create database '/tmp/hang.db' user 'SYSDBA' password 'masterkey';
SQL> quit; <---- *** hang when enter is pressed ***

Note: If isql is then killed and the operation is retried - it just works (does not hang)... until the next reboot. The hang happens about 90% of the time.

Commits: 4ca6e66 8ddf02f 3216e8b 04c0204 1b59032

====== Test Details ======

> 3. Reboot!

@firebird-issue-importer
Copy link
Author

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

Commented by: Samo Dadela (samo_dadela)

Add stacktrace of hang (obtained with killall -11 isql).
isql_stacktrace_08032012.txt

@firebird-issue-importer
Copy link
Author

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

Modified by: Samo Dadela (samo_dadela)

Attachment: isql_stacktrace_08032012.txt [ 12108 ]

@firebird-issue-importer
Copy link
Author

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

Commented by: Samo Dadela (samo_dadela)

Add test script: http://fbhang.sh
Reboot is required prior to running it to reproduce problem!

@firebird-issue-importer
Copy link
Author

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

Modified by: Samo Dadela (samo_dadela)

Attachment: http://fbhang.sh [ 12109 ]

@firebird-issue-importer
Copy link
Author

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

Commented by: Samo Dadela (samo_dadela)

Some comments:
- the "how to reproduce" is only the simplest way to reproduce the problem; it was noticed as random hangs in my app (for example on IBPP::Fetch).
- the problem does not happen on Snow Leopard (10.6); though the 10.6 system may not be comparable since it is a very old (and slow) system.
- after the first hang, if the operation is retried the database is successfully created; also firebird works without a problem until the system is booted again.
- sometimes (very rarely) it can hang twice or more times in a row.
- it seems that once the database is created and the system is rebooted you can connect normally to the previously created database
- tried setting FIREBIRD_LOCK to something different than /tmp/firebird - does not help.
- if FIREBIRD_LOCK is used and the lock files survive reboot; it seams that the problem happens less often (note the 'seams', I might be wrong)

Possible 'workaround':
- before creating your database, call isql to create a dummy database and if it hangs, kill it.
- you should be able to create your real database now.

@firebird-issue-importer
Copy link
Author

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

Commented by: Samo Dadela (samo_dadela)

Tried using "localhost:/tmp/hang.db" as the database name. BTW: is this Superserver or Superclassic?

This time isql hangs on poll() (Select::select) waiting for fb_inet_server.
However fb_inet_server hangs in a similar way as before.

See attached stacktraces.

@firebird-issue-importer
Copy link
Author

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

Commented by: Samo Dadela (samo_dadela)

Stacktraces of hang using localhost:/
isql_localhost_stacktrace_08032012.txt
fb_inet_server_localhost_stacktrace_08032012.txt

@firebird-issue-importer
Copy link
Author

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

Modified by: Samo Dadela (samo_dadela)

Attachment: isql_localhost_stacktrace_08032012.txt [ 12110 ]

Attachment: fb_inet_server_localhost_stacktrace_08032012.txt [ 12111 ]

@firebird-issue-importer
Copy link
Author

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

Modified by: Samo Dadela (samo_dadela)

priority: Major [ 3 ] => Critical [ 2 ]

@firebird-issue-importer
Copy link
Author

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

Commented by: Samo Dadela (samo_dadela)

Attaching valgrind output of isql hang using "/tmp/hang.db" as the database name.

Valgrind/memcheck (32-bit) was invoked as:

FB=/Library/Frameworks/Firebird.framework/Versions/A/Resources/bin
DB=/tmp/hang.db

(
printf "create database '%s' user 'SYSDBA' password 'masterkey';\n" "${DB}"
printf "quit;\n"
) | /usr/local/bin/valgrind \
--dsymutil=yes \
--num-callers=50 \
--max-stackframe=4048000 \
--track-origins=yes \
--leak-check=full \
"${FB}/isql" -q > /tmp/isql_vg_08032012.txt 2>&1

There are some suspicious "points to uninitialized bytes" messages.
Source line numbers are not shown since I don't have the debug version.

See: isql_vg_08032012.txt

@firebird-issue-importer
Copy link
Author

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

Modified by: Samo Dadela (samo_dadela)

Attachment: isql_vg_08032012.txt [ 12112 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 19, 2012

Commented by: Samo Dadela (samo_dadela)

Anyone update on this?

This is a critical issue and it would be nice if it makes it into 2.5.2.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 19, 2012

Modified by: @dyemanov

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 14, 2012

Modified by: @AlexPeshkoff

Version: 3.0 Initial [ 10301 ]

Fix Version: 2.5.2 [ 10450 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 1, 2012

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@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

Test Details: > 3. Reboot!

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