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

Alignment problems in Sparc64 kill the server [CORE2217] #2645

Closed
firebird-automations opened this issue Nov 28, 2008 · 14 comments
Closed

Alignment problems in Sparc64 kill the server [CORE2217] #2645

firebird-automations opened this issue Nov 28, 2008 · 14 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Alan Barclay (alan_barclay)

/usr/lib/firebird/2.1/bin/isql -a -o /tmp/a.sql -u editor -p XXXXXX /mnt/DataDisk/simple.fdb
Statement failed, SQLCODE = -902
Unable to complete network request to host "localhost".
-Error reading data from the connection.
Statement failed, SQLCODE = -902
Unable to complete network request to host "localhost".
-Error reading data from the connection.
Statement failed, SQLCODE = -902
Unable to complete network request to host "localhost".
-Error writing data to the connection.
-Broken pipe
Statement failed, SQLCODE = -902
Unable to complete network request to host "localhost".
-Error writing data to the connection.
-Broken pipe
ETC. ETC. ETC.

/tmp/a.sql:
Database: /mnt/DataDisk/simple.fdb, User: editor

SET SQL DIALECT 3;

/* CREATE DATABASE '/mnt/DataDisk/simple.fdb' DEFAULT CHARACTER SET NONE */

--END OF FILE--

/var/log/firebird2.1.log:
cougar (Client) Fri Nov 28 21:44:11 2008
/usr/lib/firebird/2.1/bin/fbguard: /usr/lib/firebird/2.1/bin/fbserver terminated abnormally (-1)
cougar (Client) Fri Nov 28 21:44:11 2008
/usr/lib/firebird/2.1/bin/fbguard: guardian starting bin/fbserver

Commits: 54f0b2d

@firebird-automations
Copy link
Collaborator Author

Commented by: @helebor

/mnt/DataDisk/simple.fdb - trying to access a database on an external device?

Bug here seems to be that we should return an exception when an attempt is made to access database on an external filesystem, not crash the server.

@firebird-automations
Copy link
Collaborator Author

Commented by: Alan Barclay (alan_barclay)

Hi Helen,

What do you mean by external device?

The DB is on a dedicated hard disk.
Until I tried running 'isql -a' I was successful in INSERTing and SELECTing records, etc, with this configuration.

xyz:~#⁠ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 16G 1.8G 13G 13% /
tmpfs 501M 0 501M 0% /lib/init/rw
udev 10M 184K 9.9M 2% /dev
tmpfs 501M 0 501M 0% /dev/shm
/dev/sda4 17G 15M 17G 1% /home
/dev/sdb1 32G 32M 32G 1% /mnt/LocalDisk
/dev/sdc1 149G 7.2M 149G 1% /mnt/DataDisk

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @paulbeach

Ok am I correct in thinking that this is Firebird 2.1.1 running on UltraSparc?
If so - where did it come from? I am not aware of any "official" build running on this platform.
Who built it? With what? etc etc...

@firebird-automations
Copy link
Collaborator Author

Commented by: Alan Barclay (alan_barclay)

Yes ... its v2.1.1 on UltraSparc.

If you read thru Environment above ... you'll see a list of Debian's 'official' packages for the forthcoming v5 Lenny release.

Apart from this bug, it has been working okay, so far.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

And this is much surprising:)
Looks like people just compiled our 2.1 branch on bigendian 64-bit machine - and it works. The fact that it fails on metadata extraction is definitely small issue compareed with the main fact!

Alan, can you contact me privately (peshkoff at mail dot ru) and provide me remote access to that box? I hope I'll be able to solve your problem in that case. (I have no access to sparc64 machines, and on amd64 isql -a works fine.)

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

This is alignment issue in INTL. I've committed fix to B2_1, but it shoudl be reviewed by Adriano.

@firebird-automations
Copy link
Collaborator Author

Commented by: dbi (dbi)

For the record, the firebird2.1 packages in Debian are in the 'experimental' suite and won't be released with Lenny.

As for building on exotic platforms, the reason for these is that users want them and they bring more exposure to Firebird.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Nobody here says that such builds are not needed...
Moreover, building on non-intel platform (in addition to already mentioned factors) helps increasing overall code quality.

@firebird-automations
Copy link
Collaborator Author

Commented by: Claudio Valderrama C. (robocop)

Since this has nothing to do with isql (the problem is in the server and any client tool that can process scripts would make the server fail) I'm changing the Component and Title of the bug report.

@firebird-automations
Copy link
Collaborator Author

Modified by: Claudio Valderrama C. (robocop)

Component: Engine [ 10000 ]

summary: isql -a crashes fbserver => Alignment problems in Sparc64 kill the server

Component: ISQL [ 10003 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

The case is clear now.
Some parts of code relays on the fact that sizeof(ptr) >= RequiredAlignment.
This is wrong if you build 32-bit firebird for 64-bit sparc cpu.
The solution is very simple - build 64-bit firebird version for 64-bit machine.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

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