Giter Club home page Giter Club logo

odbc-link's People

Contributors

manio avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

chsoney

odbc-link's Issues

Segmentation fault

Hi @manio,

I tested your version of odbc-link on both PostgreSQL 9.3 and 9.5 and I am getting a Segmentation fault on odbclink.connect.

I am installing PostgreSQL on an EC2 instance Ubuntu Server 16.04 LTS with:

apt-get update
apt-get -y install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list

apt-get update
apt-get -y install postgresql-9.3 postgresql-server-dev-9.3

Then creating a test db:

create database test;

Then I clone and compile your program:

apt install make gcc iodbc odbc-postgresql unixodbc unixodbc-dev

cd
git clone https://github.com/manio/odbc-link.git
cd odbc-link

USE_PGXS=1 make
USE_PGXS=1 make install

su postgres
psql -f odbclink.sql test

Then I connect to the db and run odbclink.connect (I intentionally left 'dsn', 'username', 'password' because its irrelevant in the issue):

root@ip-10-0-1-134:~# su postgres
postgres@ip-10-0-1-134:~$ psql
psql (9.3.19)
Type "help" for help.

postgres=# \c test
You are now connected to database "test" as user "postgres".

test=# select odbclink.connect('dsn', 'username', 'password');
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> 
!> 
!> 

Here are the PG logs:

2017-09-22 14:01:59.055 EDT [1570] LOG:  server process (PID 14339) was terminated by signal 11: Segmentation fault
2017-09-22 14:01:59.055 EDT [1570] DETAIL:  Failed process was running: select odbclink.connect('dsn', 'username', 'password');
2017-09-22 14:01:59.055 EDT [1570] LOG:  terminating any other active server processes
2017-09-22 14:01:59.057 EDT [14328] WARNING:  terminating connection because of crash of another server process
2017-09-22 14:01:59.057 EDT [14328] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2017-09-22 14:01:59.057 EDT [14328] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2017-09-22 14:01:59.059 EDT [1570] LOG:  all server processes terminated; reinitializing
2017-09-22 14:01:59.068 EDT [14342] postgres@test FATAL:  the database system is in recovery mode
2017-09-22 14:01:59.069 EDT [14341] LOG:  database system was interrupted; last known up at 2017-09-22 14:01:32 EDT
2017-09-22 14:01:59.078 EDT [14341] LOG:  database system was not properly shut down; automatic recovery in progress
2017-09-22 14:01:59.080 EDT [14341] LOG:  record with zero length at 0/17A5AC0
2017-09-22 14:01:59.080 EDT [14341] LOG:  redo is not required
2017-09-22 14:01:59.101 EDT [14341] LOG:  MultiXact member wraparound protections are now enabled
2017-09-22 14:01:59.103 EDT [1570] LOG:  database system is ready to accept connections
2017-09-22 14:01:59.104 EDT [14346] LOG:  autovacuum launcher started

I tried initially with PG 9.5 and got the same issue. I tried with 9.3 thinking that it might be a compatibility issue with newer versions of PG.

Are you still maintaining odbc-link? Is it an issue you would be able to look into?

thanks!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.