set_guid() crashes object creation #126

Closed
bergie opened this Issue Nov 4, 2011 · 4 comments

Comments

Projects
None yet
2 participants
Owner

bergie commented Nov 4, 2011

PHP code to reproduce:

<?php
$filepath = ini_get("midgard.configuration_file");
$config = new midgard_config();
$config->read_file_at_path($filepath);
$mgd = midgard_connection::get_instance();
$mgd->open_config($config);
$mgd->set_loglevel('debug');

$person = new midgard_person();
$person->set_guid("d1eeb24ae38c11df92307f77dcafaed7aed7");
// Crash
$person->create();

Debug log:

midgard-core (pid:14040):(debug): midgard_person::__construct(...)
midgard-core (pid:14040):(debug): midgard_person::set_guid(...)
midgard-core (pid:14040):(debug):QuerySelect: SELECT 
    t1.guid AS reference, 
    t1.typename AS type, 
    t1.object_action AS action, 
    t1.midgard_ws_id AS workspace, 
    t1.midgard_ws_oid_id AS workspaceoid
FROM repligard AS t1
WHERE (t1.guid = 'd1eeb24ae38c11df92307f77dcafaed7aed7') AND 0<1
midgard-core (pid:14040):(debug): midgard_person::create(...)

Backtrace:

(gdb) run -c php.ini test.php
Starting program: /usr/bin/php -c php.ini test.php
[Thread debugging using libthread_db enabled]
PHP Warning:  Module 'midgard2' already loaded in Unknown on line 0

(process:13974): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed

(process:13974): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(process:13974): GLib-GObject-WARNING **: invalid cast from `midgard_person' to `(null)'

(process:13974): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.28.8/./gobject/gsignal.c:2924: signal id `10' is invalid for instance `0x106b200'

(process:13974): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.28.8/./gobject/gsignal.c:2924: signal id `9' is invalid for instance `0x106b200'

(process:13974): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff44b8fb1 in g_type_instance_get_private ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt full
#0  0x00007ffff44b8fb1 in g_type_instance_get_private ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#1  0x00007ffff46ef2be in ?? () from /usr/lib/libmidgard2.so.2010
No symbol table info available.
#2  0x00007ffff4499304 in g_object_get_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#3  0x00007ffff4499704 in g_object_get ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#4  0x00007ffff4733671 in midgard_core_object_is_valid ()
   from /usr/lib/libmidgard2.so.2010
No symbol table info available.
#5  0x00007ffff46f0859 in _midgard_object_create ()
   from /usr/lib/libmidgard2.so.2010
No symbol table info available.
#6  0x00007ffff46f11dd in midgard_object_create ()
   from /usr/lib/libmidgard2.so.2010
No symbol table info available.
#7  0x00007ffff4982d00 in zif__midgard_php_object_create ()
   from /usr/lib/php5/20090626/midgard2.so
No symbol table info available.
#8  0x00007ffff4bbcc5d in xdebug_execute_internal (
    current_execute_data=0x7ffff7eb7068, return_value_used=0)
    at /build/buildd/xdebug-2.1.0/build-php5/xdebug.c:1339
        edata = 0x7ffff7eb7068
        fse = 0x1596a60
        cur_opcode = 0xdd28e0
        do_return = 0
        function_nr = 9
#9  0x00000000006de2dc in ?? ()
No symbol table info available.
#10 0x00000000006b8044 in execute ()
No symbol table info available.
#11 0x00007ffff4bbc8b5 in xdebug_execute (op_array=0x11bf210)
---Type <return> to continue, or q <return> to quit---
    at /build/buildd/xdebug-2.1.0/build-php5/xdebug.c:1272
        dummy = 0x7fffffffe060
        edata = 0x0
        fse = 0x11e1120
        xfse = 0x687972
        magic_cookie = 0x0
        do_return = 0
        function_nr = 0
        le = 0x0
        eval_id = 0
#12 0x0000000000692f29 in zend_execute_scripts ()
No symbol table info available.
#13 0x000000000063fc83 in php_execute_script ()
No symbol table info available.
#14 0x000000000072d644 in ?? ()
No symbol table info available.
#15 0x00007ffff55f5eff in __libc_start_main (main=0x72bf70, argc=4, 
    ubp_av=0x7fffffffe268, init=<value optimized out>, 
    fini=<value optimized out>, rtld_fini=<value optimized out>, 
    stack_end=0x7fffffffe258) at libc-start.c:226
        result = <value optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 
                -6393718823463822328, 4360240, 140737488347744, 0, 0, 
                6393718824475417608, 6393730639966886920}, 
              mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 
              0x7ffff7deaa17, 0x0}, data = {prev = 0x0, cleanup = 0x0, 
              canceltype = -136402409}}}
        not_first_call = <value optimized out>
#16 0x0000000000428859 in _start ()
No symbol table info available.
Owner

bergie commented Nov 4, 2011

This can be reproduced by trying to install org_midgardproject_projectsite on 10.05.5:

$ midgardmvc install  https://raw.github.com/midgardproject/org_midgardproject_projectsite/master/application.yml test
Member

feri commented Nov 4, 2011

I am not getting a crash using the latest (10.05.6-1) packages on amd64. Tried it with MySQL and sqlite3 too.

Owner

bergie commented Nov 14, 2011

Confirmed, doesn't crash on latest packages.

bergie closed this Nov 14, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment