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

Segfault under Debian 6 #187

Open
flack opened this issue Dec 22, 2012 · 6 comments
Open

Segfault under Debian 6 #187

flack opened this issue Dec 22, 2012 · 6 comments

Comments

@flack
Copy link
Member

flack commented Dec 22, 2012

When running midcom's daily cron service, I get the following segfault under Debian 6 (and Ubuntu 12.10, but I didn't take a backtrace there):

Program received signal SIGSEGV, Segmentation fault.
0xb56b7d56 in midgard_query_builder_new (mgd=0x978840, classname=0x5f16f0 "nt_hierarchyNode")
    at src/query_builder.c:121
121     while(tables[i] != NULL) {  
(gdb) backtrace
#0  0xb56b7d56 in midgard_query_builder_new (mgd=0x978840, classname=0x5f16f0 "nt_hierarchyNode")
    at src/query_builder.c:121
#1  0xb572fa07 in zim_midgard_query_builder___construct (ht=1, return_value=0xe7ecdc, 
    return_value_ptr=0x0, this_ptr=0xe7eed4, return_value_used=0)
    at /var/repos/midgard-php5/query_builder.c:72
#2  0xb7907f9a in ?? () from /usr/lib/apache2/modules/libphp5.so
#3  0xb78de84e in execute () from /usr/lib/apache2/modules/libphp5.so
#4  0xb78b45a6 in zend_execute_scripts () from /usr/lib/apache2/modules/libphp5.so
#5  0xb7858704 in php_execute_script () from /usr/lib/apache2/modules/libphp5.so
#6  0xb794721b in ?? () from /usr/lib/apache2/modules/libphp5.so
#7  0x001487e1 in ap_run_handler ()
#8  0x0014c5e6 in ap_invoke_handler ()
#9  0x0015bdb4 in ap_internal_redirect ()
#10 0xb6f6f7fd in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#11 0x001487e1 in ap_run_handler ()
#12 0x0014c5e6 in ap_invoke_handler ()
#13 0x0015bf68 in ap_process_request ()
#14 0x00158a88 in ?? ()
#15 0x00151061 in ap_run_process_connection ()
#16 0x00161e0c in ?? ()
#17 0x00162121 in ?? ()
#18 0x001628af in ap_mpm_run ()
#19 0x00132f8a in main ()

I'm guessing the reason must be some missing tables, but I ran create/update_storage a number of times without any effect. Where did I go wrong?

@piotras
Copy link
Member

piotras commented Dec 23, 2012

QueryBuilder is depreciated. For modern types, you QuerySelect. Keep in mind that new type might be interface, mixin or abstract class. No one tweaked QB for such types.

@flack
Copy link
Member Author

flack commented Dec 28, 2012

The problem is that I simply iterate over a list of classes from the midgard2 extension. I test isSubclassOf('midgard_object'), but apparently, I need something else. Is there a way to test what works with qb?

@piotras
Copy link
Member

piotras commented Dec 29, 2012

@flack
Copy link
Member Author

flack commented Dec 29, 2012

I just tried to copy that code, but I get

Fatal error: Class 'MidgardObjectReflector' not found

AFAICT, I should be on gjallarhorn HEAD, was this class maybe renamed at some point?

@piotras
Copy link
Member

piotras commented Dec 30, 2012

Ah... My fault. It's MidgardReflectorObject obviously.

@flack
Copy link
Member Author

flack commented Dec 30, 2012

OK, I got it working now. Apart from the checks mentioned above, I also had to check for has_metadata_class, since adding a metadata.deleted constraint on a qb for a class without metadata leads to a segfault as well. I would be nice if there could be a warning instead, so that debugging is easier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants