Ticket #1461 (closed defect: fixed)

Opened 10 months ago

Last modified 8 months ago

Failure / Segmentation fault on Debian lenny and Ubuntu 9.10 while running datagard install/dbinstall

Reported by: flack Assigned to: piotras
Priority: critical Milestone: 8.09.7 Ragnaroek
Component: Midgard PHP Version: 8.09 Ragnaroek
Keywords: Cc:

Description

I didn't find any error message, the last output in DG log and on command line is:

MIDGARD_SETUP: Creating storage for: 'org_openpsa_relatedto'
MIDGARD_SETUP: Updating storage for: 'org_openpsa_relatedto'
MIDGARD_SETUP: Successfully created database newdb
MIDGARD_SETUP: Importing all required xml packages
Failed to execute /usr/bin/php /usr/local/share/midgard/setup/php/midgard_datagard.php '-c' 'newdb' -a 'dbinstall'

Database, config file, blob dir and all that gets created correctly, but the database itself is empty except for 186 midgard_language entries, one person and one member (interestingly, no group seems to get created). datagard -a upgrade on an existing DB works fine

Self-compiled 8.09.6 allinone on Debian Stable

Change History

11/11/09 12:11:34 changed by flack

Reading the documentation once more, it seems that dbinstall does everything it should, so the bug would be that it reports a failure at the end of its run.

The same happens with the -a install command: AFAICT it does everything it is supposed to do (but it doesn't create a host), and afterwards, it throws the error mentined above

11/12/09 12:03:27 changed by piotras

Does it happen with midgard-core hotfix?

12/28/09 16:03:13 changed by flack

I just tried to reproduce this with a 8.09.6.99 version, but now I get a segfault:

MIDGARD_SETUP: Updating storage for: 'org_openpsa_document'
MIDGARD_SETUP: Successfully created database newdb5
MIDGARD_SETUP: Importing all required xml packages
Segmentation fault
Failed to execute /usr/bin/php /usr/local/share/midgard/setup/php/midgard_datagard.php '-c' 'newdb' -a 'dbinstall'

for unknown reasons, gdb doesn't show me a backtrace for this, unfortunately.

12/29/09 09:05:27 changed by piotras

To run with gdb:

gdb php
run /usr/local/share/midgard/setup/php/midgard_datagard.php '-c' 'newdb' -a 'dbinstall'

12/29/09 09:21:23 changed by jval

Can't reproduce on CentOS 5.4 with Midgard 8.09.6.

12/29/09 09:54:15 changed by jval

Can't reproduce on CentOS 5.4 with midgard-core 8.09.6.1.

12/29/09 10:09:56 changed by jval

Can't reproduce on CentOS 5.4 with Midgard 8.09.6.99 (r24577).

12/29/09 10:23:31 changed by jval

  • priority changed from major to critical.
  • component changed from Midgard Data to Midgard Core.
  • summary changed from datagard -a dbinstall -c newdb fails to Failure / Segmentation fault on Debian lenny while running datagard install/dbinstall.

This doesn't seem to be a midgard-data/datagard related issue. The original failure probably came from php-midgard or midgard-core. The segfault naturally does. The issue seems to be related to the OS environment as I couldn't see any problems on different platform.

Changing summary and moving this to Midgard Core. Also raising the priority as segfaults are always important to get investigated and fixed. Because I couldn't produce this myself, I set it to critical. If also someone else than flack manages to produce the segfault, make this a blocker I'd say.

12/29/09 10:42:51 changed by jval

Please paste the gdb backtrace if you can. That might be extremely valuable in case this can't be reproduced by others. (Because that wouldn't mean the issue doesn't exist. It would just mean it's something special and its fixing would be only possible with your backtrace information.)

12/29/09 22:23:26 changed by flack

Hi!

Just to add to the confusion: I now tried a different machine with Kubuntu 9.10 and a vanilla 8.09.6.1 compiled from source. There, It stops with the following output:

MIDGARD_SETUP: Installing MidCOM package midcom_admin_settings. Please wait...   already installed

GLib-WARNING **: /build/buildd/glib2.0-2.22.3/glib/gmessages.c:422: could not find handler with id `5' for domain "midgard-core"
aborting...
Aborted
Failed to execute /usr/bin/php /usr/local/share/midgard/setup/php/midgard_datagard.php -a install

The database gets created here as well, but AFAICT only partially.

12/30/09 08:56:16 changed by jval

That GLib-WARNING (#1043) is fixed from r24421 onwards, e.g. in 8.09.6.99.

So it's now reproduced on different platform as well. No segfault there, but it's the same issue.

/usr/bin/php /usr/local/share/midgard/setup/php/midgard_datagard.php -a install exits with something else than 0 there. That's strange if you look at datagard's code because every place where exit is done with something else than 0 there's also something printed to the screen.

Therefore I think php itself exits uncleanly which means php-midgard perhaps does it. Which in turn means midgard-core probably has something which triggers this. Especially since this worked before .6 apparently (e.g. this would perhaps work with midgard-core-8.09.5...).

12/30/09 14:31:32 changed by piotras

  • status changed from new to assigned.
  • component changed from Midgard Core to Midgard PHP.

12/30/09 14:31:47 changed by piotras

(In [24589]) Check if given pointer is Midgardconnection instance. Refs #1461

12/30/09 14:59:53 changed by jval

I never guess it correctly between midgard-core and php-midgard. :)

Anyway, great if it works. Can you flack test it now if it works now or not?

12/30/09 18:44:07 changed by jval

I think that commit probably removed the segfault but it is not clear if it fixed the php return status issue.

12/30/09 18:54:25 changed by jval

  • summary changed from Failure / Segmentation fault on Debian lenny while running datagard install/dbinstall to Failure / Segmentation fault on Debian lenny and Ubuntu 9.10 while running datagard install/dbinstall.

01/02/10 15:22:14 changed by flack

  • status changed from assigned to closed.
  • resolution set to fixed.

I just tried with the latest 8.09.6.99 and now the command terminates successfully, so I'm closing as fixed. Thanks for the efforts!