apache2 asserts on reload - GLib-GObject-CRITICAL + g_boxed_type_register_static

Bug #1243741 reported by David Favor on 2013-10-23
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gdcm (Ubuntu)

Bug Description

service apache2 restart works...

[Wed Oct 23 09:58:47.171246 2013] [core:warn] [pid 30408] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Oct 23 09:58:47.175859 2013] [mpm_prefork:notice] [pid 30408] AH00163: Apache/2.4.6 (Ubuntu) PHP/5.5.3-1ubuntu2 configured -- resuming normal operations
[Wed Oct 23 09:58:47.175938 2013] [core:notice] [pid 30408] AH00094: Command line: '/usr/sbin/apache2'

service apache2 reload fails...

[Wed Oct 23 10:02:15.429601 2013] [mpm_prefork:notice] [pid 30591] AH00171: Graceful restart requested, doing restart

(process:30591): GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
ERROR:gda-init.c:166:gda_init: assertion failed: (type)
[Wed Oct 23 10:02:15.495609 2013] [core:notice] [pid 30591] AH00060: seg fault or similar nasty error detected in the parent process

David Favor (davidfavor) wrote :

Only occurs if php5-snmp is installed + snmp has not been configured.

Fix is to either deinstall php5-snmp or configure snmp.

Close + marked as fixed.


David Favor (davidfavor) wrote :

Oops... updated wrong bug...

This bug should stay open.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apache2 (Ubuntu):
status: New → Confirmed
David Favor (davidfavor) wrote :

Getting worse.

Apache crashes periodically with the same error.

David Favor (davidfavor) wrote :

Alright let's see if I can at least figure out the true source of this assertion, as Apache seems to have no direct linkage to glib.

First I hacked out two scripts...

lsofunique - prints all unique files of a process ala lsof.

lddflat - prints lib name for every internal reference.

Attached is the full output off - lddflat $(lsofunique apache2 | grep '\.so') | grep glib

The lines that pop out relate to PHP... as I suspected...

/usr/lib/php5/20121212/enchant.so /lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/php5/20121212/imagick.so /lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/php5/20121212/midgard2.so /lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/php5/20121212/midgard2.so /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2
/usr/lib/php5/20121212/rrd.so /lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/php5/20121212/vtkgdcm.so /lib/x86_64-linux-gnu/libglib-2.0.so.0

I'll "turn off" all these modules, then turn them back on, one-by-one, to identify the culprit.

I'll update this ticket with the nefarious module throwing the assertion.

David Favor (davidfavor) wrote :
David Favor (davidfavor) wrote :

Alright, tried pecl upgrade-all just to make sure all modules are up to date. None of the modules referencing glib were upgraded, so now to disable them all + test Apache reload...

In /etc/php5/mods-available commented out all extension=...so entries in the files mentioned above...


service apache2 restart
lddflat $(lsofunique apache2 | grep '\.so') | grep glib | grep php5 -> yields nothing, so we're good to test reload function.

Success! Apache now reloads w/o the glib assertion... Whew...

No to figure out which php module is throwing the assertion.

David Favor (davidfavor) wrote :

PASS - enchant.ini
PASS - imagick.ini
PASS - midgard2.ini
PASS - rrd.ini
FAIL! - vtkgdcm.ini

Alright... so vtkgdcm.ini is the culprit... Now what is it...

net1# apt-file search vtkgdcm.ini
php5-vtkgdcm: /etc/php5/mods-available/vtkgdcm.ini

net1# apt-cache show php5-vtkgdcm
VTK PHP bindings to the GDCM DICOM library.

Hum... Just going to remove this package, as I'm unsure what dependency this package satisfies.

So fix/resolution for this bug is...

apt-get purge php5-vtkgdcm

I'm unsure what to do next. Likely a bug ought to be opened against php5-vtkgdcm referencing this ticket.

In the meantime, since many people are reporting this bug, maybe there's some way upstream can flag the following package as broken...


Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Reassigning this bug to gdcm, as that provides the php5-vtkgdcm package, and the bug appears to be there.

affects: apache2 (Ubuntu) → gdcm (Ubuntu)
David Favor (davidfavor) wrote :

You're welcome!

As always... Ubuntu rocks!

David Favor (davidfavor) wrote :

This crash is back again, even with php5-vtkgdcm purged.

Difference now is Apache crashes intermittently, rather than every time.

David Favor (davidfavor) wrote :

To remove all traces of glib in apache.

apt-get purge php5-enchant php5-rrd php5-lasso php5-mapscript php5-imagick

All traces of glib references gone in Apache PHP modules now.

So one of these is the culprit. I'll write a watchdog for Apache that will restart Apache when it crashes + start enabling these one at a time to figure out which is the real problem source.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments