image crash

8 views
Skip to first unread message

Milan Mimica

unread,
Jun 20, 2012, 5:03:01 PM6/20/12
to dbx...@googlegroups.com
Hello!

I'm experiancing a crash the moment I start the image. The stacktrace makes it clear that it fails in a primitive while trying to close a stale dbx connection. The database is not even running, let alone having a valid connection to it.
I get this quite often. Can you think of a solution for it, please?

$ ./pharo.sh 
DBXFatalError: FATAL OpenDBX: Invalid handle
DBXPostgresBackend(DBXBackend)>>errorCode:handle:
DBXPostgresBackend(DBXBackend)>>verifyError:handle:
DBXPostgresBackend(DBXBackend)>>closeConnection:
DBXConnection>>close
DBXConnection>>disconnect
DBXConnection>>finalize
WeakFinalizerItem>>finalizeValues
WeakRegistry>>finalizeValues in Block: [finalizer finalizeValues]
BlockClosure>>on:do:
BlockClosure>>on:fork: in Block: [Processor terminateActive]


--
Milan Mimica
http://sparklet.sf.net

Mariano Martinez Peck

unread,
Jun 20, 2012, 5:08:47 PM6/20/12
to dbx...@googlegroups.com
On Wed, Jun 20, 2012 at 11:03 PM, Milan Mimica <milan....@gmail.com> wrote:
Hello!

I'm experiancing a crash the moment I start the image. The stacktrace makes it clear that it fails in a primitive while trying to close a stale dbx connection. The database is not even running, let alone having a valid connection to it.
I get this quite often. Can you think of a solution for it, please?

$ ./pharo.sh 
DBXFatalError: FATAL OpenDBX: Invalid handle
DBXPostgresBackend(DBXBackend)>>errorCode:handle:

Do you know what is the value of the handle at this point?


 
DBXPostgresBackend(DBXBackend)>>verifyError:handle:
DBXPostgresBackend(DBXBackend)>>closeConnection:
DBXConnection>>close
DBXConnection>>disconnect
DBXConnection>>finalize
WeakFinalizerItem>>finalizeValues
WeakRegistry>>finalizeValues in Block: [finalizer finalizeValues]
BlockClosure>>on:do:
BlockClosure>>on:fork: in Block: [Processor terminateActive]


--
Milan Mimica
http://sparklet.sf.net



--
Mariano
http://marianopeck.wordpress.com

Milan Mimica

unread,
Jun 20, 2012, 5:14:31 PM6/20/12
to dbx...@googlegroups.com
On 20 June 2012 23:08, Mariano Martinez Peck <maria...@gmail.com> wrote:

$ ./pharo.sh 
DBXFatalError: FATAL OpenDBX: Invalid handle
DBXPostgresBackend(DBXBackend)>>errorCode:handle:

Do you know what is the value of the handle at this point?

Let's say I could find out, if I empower my gdb skills. I will try.
I expect it to be a value of a handle that was valid at some point in time... What do you hope it is?

Guillermo Polito

unread,
Jun 20, 2012, 5:15:16 PM6/20/12
to dbx...@googlegroups.com
Which image/vm are you using? I remember experiencing vms where the conections were not gced :/

Milan Mimica

unread,
Jun 20, 2012, 5:16:35 PM6/20/12
to dbx...@googlegroups.com
It's a Pharo 1.4 one click from jenkins, from 2 weeks ago or so.

Mariano Martinez Peck

unread,
Jun 20, 2012, 5:19:14 PM6/20/12
to dbx...@googlegroups.com
On Wed, Jun 20, 2012 at 11:14 PM, Milan Mimica <milan....@gmail.com> wrote:
On 20 June 2012 23:08, Mariano Martinez Peck <maria...@gmail.com> wrote:

$ ./pharo.sh 
DBXFatalError: FATAL OpenDBX: Invalid handle
DBXPostgresBackend(DBXBackend)>>errorCode:handle:

Do you know what is the value of the handle at this point?

Let's say I could find out, if I empower my gdb skills. I will try.

mmmm right....that should be from gdb :(
 
I expect it to be a value of a handle that was valid at some point in time... What do you hope it is?


I don't know, maybe nil ?
as a workaound you can just disable the automatic disconnection of connections (done in the shutDown)....
does this crash also happens when disconnecting connections in the normal scenario (not with the GC)  ?


 

--
Milan Mimica
http://sparklet.sf.net



--
Mariano
http://marianopeck.wordpress.com

Mariano Martinez Peck

unread,
Jun 20, 2012, 5:24:42 PM6/20/12
to dbx...@googlegroups.com
In which OS are you?  have you compiled OpenDBX yourself or use a binary distribution?

const char* odbx_error( odbx_t* handle, int error )
{
    DEBUGLOG( if( handle != NULL ) { handle->log.write( &(handle->log), 1, "odbx_error() called" ); } )

    if( error == -ODBX_ERR_BACKEND )
    {
        if( handle != NULL && handle->ops != NULL && handle->ops->basic != NULL && handle->ops->basic->error != NULL )
        {
            return handle->ops->basic->error( handle );
        }

        return dgettext( "opendbx1", odbx_errmsg[ODBX_ERR_HANDLE] );
    }

    if( error <= ODBX_ERR_SUCCESS && error >= -ODBX_MAX_ERRNO )
    {
        return dgettext( "opendbx1", odbx_errmsg[-error] );
    }

    return dgettext( "opendbx1", odbx_errmsg[ODBX_ERR_PARAM] );
--
Mariano
http://marianopeck.wordpress.com

Milan Mimica

unread,
Jun 20, 2012, 5:44:31 PM6/20/12
to dbx...@googlegroups.com
On 20 June 2012 23:24, Mariano Martinez Peck <maria...@gmail.com> wrote:
In which OS are you?  have you compiled OpenDBX yourself or use a binary distribution?

Using slackware linux. I have OpenDBX compiled myself.
The version probably is the latest 1.4.5, but the shared objects have the 1.2.0 suffix!?

I can't tell why the image quits. It doesn't even crash, it exists with code 01.

And what are you trying to say with this code? When is odbx_error even called?

Milan Mimica

unread,
Jun 20, 2012, 5:50:53 PM6/20/12
to dbx...@googlegroups.com
On 20 June 2012 23:08, Mariano Martinez Peck <maria...@gmail.com> wrote:

Do you know what is the value of the handle at this point?

It's  135887552

Milan Mimica

unread,
Jun 20, 2012, 6:07:28 PM6/20/12
to dbx...@googlegroups.com
On 20 June 2012 23:24, Mariano Martinez Peck <maria...@gmail.com> wrote:
In which OS are you?  have you compiled OpenDBX yourself or use a binary distribution?

const char* odbx_error( odbx_t* handle, int error )

Ah, I think you missunderstood where the image quits. It doesn't crash, don't mind the subject.
"odbx_error" is called just fine. DBXBackend>>rrorCode:handle: signals a DBXFatalError which makes the image quit.
So the error is handled gracefully on the dbx side. It is Pharo's start-up process that is still weak.
Reply all
Reply to author
Forward
0 new messages