Bug 18450 - Apache 2.4 crashes when adding zeroconf avahi dnssd module
Summary: Apache 2.4 crashes when adding zeroconf avahi dnssd module
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: x86_64 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Olav Vitters
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-12 22:02 CEST by bittar
Modified: 2017-12-31 19:41 CET (History)
4 users (show)

See Also:
Source RPM: apache-mod_dnssd-0.6-10.mga5.x86_64
CVE:
Status comment:


Attachments

Description bittar 2016-05-12 22:02:53 CEST
Description of problem:
Apache 2.4 crashes when adding zeroconf avahi dnssd module.
The module cannot load due to module error

Error message:
Cannot load modules/mod_dnssd.so into server: /etc/httpd/modules/mod_dnssd.so: undefined symbol: unixd_setup_child

I think this is a src file error when generating the .so module
the RPM is to be rebuild correctly
See the correction patch:
https://github.com/pld-linux/apache-mod_dnssd/blob/master/apache-mod_dnssd.spec

Version-Release number of selected component (if applicable):
Mageia 5
Apache 2.4.10
apache-mod_dnssd version 0.6-10.mga5

How reproducible:
Just add Load dnssd module to Apache modules conf file

Steps to Reproduce:
1.install Apache 2.4.10
2.install apache-mod_dnssd version 0.6-10.mga5
3.add Load dnssd module to Apache modules conf file
4 start httpd service
5 verify that crash occurs
bittar 2016-05-12 22:13:39 CEST

CC: (none) => biba_paris
Source RPM: apache-mod_dnssd 0.6-10.mga5 => apache-mod_dnssd-0.6-10.mga5.x86_64

Comment 1 Marja Van Waes 2016-05-14 20:14:11 CEST
@ Olav

Maintdb says you're the maintainer of this package, is that correct?

http://maintdb.mageia.org/apache-mod_dnssd

CC: (none) => marja11
Assignee: bugsquad => olav

Comment 2 David Walser 2016-06-07 15:17:05 CEST
Thanks for the report.  Please test the updated package and confirm it works.  Let us know which architecture you tested on.

Advisory:
----------------------------------------

The apache-mod_dnssd package has been patched to work correctly with Apache 2.4.

----------------------------------------

Updated packages in core/updates_testing:
----------------------------------------
apache-mod_dnssd-0.6-10.1.mga5

from apache-mod_dnssd-0.6-10.1.mga5.src.rpm

Assignee: olav => qa-bugs

Comment 3 claire robinson 2016-06-09 22:27:20 CEST
Some odd non-standard packaging with this module. Initially it appears to work, but it actually isn't loading OOTB.

# systemctl restart httpd.service 
# systemctl status httpd.service 
â httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: active (running) since Thu 2016-06-09 20:50:11 BST; 2s ago

It puts the .so in /usr/lib/apache-extramodules/ and uses a module configuration in /etc/http/modules.d/ rather than /etc/httpd/modules and /etc/httpd/conf/modules.d/. 

The conf begins with A47_ which stands out amongst the others which start with 00_ 02_ 70_ etc.

This all means it isn't included and isn't loaded.
# httpd -M | grep dns

Nothing actually supplies the file mentioned by the reporter in comment 0
/etc/httpd/modules/mod_dnssd.so in either current or testing so presumably it's self compiled..


After installing the update nothing is appears to have changed..

# systemctl restart httpd.service 
# systemctl status httpd.service 
â httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: active (running) since Thu 2016-06-09 21:22:49 BST; 4s ago

# httpd -M | grep dns | wc -l
0


It's hard to validate this as it appears basically broken but I'm unable to replicate the crash and there's no regression at least.

WDYT?
Comment 4 David Walser 2016-06-09 23:12:05 CEST
Thanks for testing Claire.  There were many packaging changes made for Apache modules once we moved to Apache 2.4, and it appears that this package was never touched or fixed for that.  Assigning back to Olav.  If it doesn't get fixed, we'll have to drop it for Mageia 6.

CC: (none) => qa-bugs
Version: 5 => Cauldron
Assignee: qa-bugs => olav
Whiteboard: (none) => MGA5TOO

Comment 5 bittar 2016-06-10 12:09:28 CEST
To Claire,
Thank you for testing.

As you pointed it out, this module cannot run out of the box, due to erroneous and amazing directory install.

Anyway, to make it run you have to :

1) Verify that /usr/lib64/apache-extramodules/mod_dnssd.so exists (bogus or patched version).

2) Insert 1st line below in file /etc/httpd/modules.d/A47_mod_dnssd.conf to force module loading ( delete <IfDefine HAVE_DNSSD> bloc):
LoadModule dnssd_module	extramodules/mod_dnssd.so

3) Insert line 56 in file /etc/httpd/conf/httpd.conf:
Include modules.d/*.conf

If the mod_dnssd.so is the bogus one, it crashes.

I suggest to rework completely this package installation.
Comment 6 Olav Vitters 2016-06-15 11:56:07 CEST
Anyone wanting to completely redo the spec file feel free to do so.

David: Any recommendations for a good module to look at?
Olav Vitters 2016-06-15 12:20:04 CEST

Severity: normal => critical

Comment 7 bittar 2016-06-15 16:45:56 CEST
(In reply to David Walser from comment #2)
> Thanks for the report.  Please test the updated package and confirm it
> works.  Let us know which architecture you tested on.
> 

Thank you.
To answer your questions:
1) my test architecture is x86_64
2) the patched version of mod_dnssd.so works fine.

I suggest when rebuiding the rpm to simplify the directories choices, and use of existant ones. I don't understand why such complex directory map is needed to install and run this poor module !

Regards
Comment 8 David Walser 2016-06-22 22:56:37 CEST
Sorry Olav, I just saw this.

Guillaume made commits to several such packages for the adaptation.  Here's a few I found:
http://svnweb.mageia.org/packages/?view=revision&revision=280773
http://svnweb.mageia.org/packages/?view=revision&revision=283918
http://svnweb.mageia.org/packages/?view=revision&revision=280787
Comment 9 David Walser 2017-12-31 19:41:34 CET
This was never fixed.  Sorry.

Resolution: (none) => OLD
Status: NEW => RESOLVED
Version: Cauldron => 5
Whiteboard: MGA5TOO => (none)
CC: (none) => luigiwalser


Note You need to log in before you can comment on or make changes to this bug.