Opened 7 years ago

Closed 7 years ago

#1684 closed defect (fixed)

Segfault when instantiating midcom_core_collector for a class that is not yet loaded

Reported by: flack Owned by: piotras
Priority: blocker Milestone: 8.09.9 Ragnaroek
Component: Midgard Core Version: 8.09 Ragnaroek
Keywords: Cc:

Description

When instantiating collector like this:

// uncommenting the next line makes the error go away:
// new org_openpsa_relatedto_dba();

$mc = new midcom_core_collector('org_openpsa_relatedto_dba', 'id', 1);

without loading the DBA class before, I get the following segfault:

Program received signal SIGSEGV, Segmentation fault.
0xb7814642 in ?? () from /usr/lib/apache2/modules/libphp5.so
(gdb) backtrace                                             
#0  0xb7814642 in ?? () from /usr/lib/apache2/modules/libphp5.so
#1  0xb782e546 in ?? () from /usr/lib/apache2/modules/libphp5.so
#2  0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#3  0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so     
#4  0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#5  0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so
#6  0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#7  0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so
#8  0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#9  0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so
#10 0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#11 0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so
#12 0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#13 0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so
#14 0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#15 0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so
#16 0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#17 0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so
#18 0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#19 0xb782ddf9 in ?? () from /usr/lib/apache2/modules/libphp5.so
#20 0xb782a04b in execute () from /usr/lib/apache2/modules/libphp5.so
#21 0xb78044d4 in zend_execute_scripts () from /usr/lib/apache2/modules/libphp5.so
#22 0xb77b9246 in php_execute_script () from /usr/lib/apache2/modules/libphp5.so
#23 0xb787af13 in ?? () from /usr/lib/apache2/modules/libphp5.so
#24 0x007aaf61 in ap_run_handler () from /usr/sbin/apache2
#25 0x007aed3f in ap_invoke_handler () from /usr/sbin/apache2
#26 0x007be5b8 in ap_process_request () from /usr/sbin/apache2
#27 0x007bb128 in ?? () from /usr/sbin/apache2
#28 0x007b37d1 in ap_run_process_connection () from /usr/sbin/apache2
#29 0x007c3ad1 in ?? () from /usr/sbin/apache2
---Type <return> to continue, or q <return> to quit---
#30 0x007c3db1 in ?? () from /usr/sbin/apache2
#31 0x007c453f in ap_mpm_run () from /usr/sbin/apache2
#32 0x00795a92 in main () from /usr/sbin/apache2

Since Midgard isn't mentioned in the backtrace, I don't know if it's maybe a PHP bug, but I thought I'd leave that for others to determine...

Change History (3)

comment:1 Changed 7 years ago by bergie

  • Component changed from MidCOM core to Midgard Core
  • Owner changed from bergie to piotras

comment:2 Changed 7 years ago by indeyets

  • Priority changed from major to blocker

segfault = blocker

comment:3 Changed 7 years ago by piotras

  • Resolution set to fixed
  • Status changed from new to closed

(In [26412]) midgard_collector_new: check if given classname is registsred in GType system and if it's MidgardDBObject derived one. Fix #1684

Note: See TracTickets for help on using tickets.