Bug 1328231

Summary: mod_jk Segmentation fault when trying to resolve unknown host
Product: [JBoss] JBoss Enterprise Web Server 2 Reporter: Robert Bost <rbost>
Component: mod_jkAssignee: Permaine Cheung <pcheung>
Status: CLOSED WONTFIX QA Contact: Jan Onderka <jonderka>
Severity: high Docs Contact:
Priority: high    
Version: 2.1.0CC: jclere, jdoyle, jonderka, jpallich, jstefl, mbabacek, pcheung, pslavice, rsvoboda, suhail.ahmed
Target Milestone: DR01Flags: dmichael: needinfo+
Target Release: 2.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously in JBoss Enterprise Web Server, an outdated version of mod_jk was included in the product. This is now fixed in JBoss Enterprise Web Server 2.1 by including mod_jk version 1.2.41 is included which incorporates the required miscellaneous bug fixes into the product.
Story Points: ---
Clone Of:
: 1338661 (view as bug list) Environment:
Last Closed: 2019-06-13 12:20:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1342071    
Bug Blocks:    
Attachments:
Description Flags
worker.properties
none
error_log
none
workers.properties
none
mod_jk.conf none

Description Robert Bost 2016-04-18 19:14:54 UTC
Description of problem: Segfault occurrs in mod_jk when trying to resolve an unknown hostname. 


Version-Release number of selected component (if applicable): mod_jk-ap22


How reproducible: Always


Steps to Reproduce:
1. Configure mod_jk
2. In workers.properties, set worker host to something that will not be resolved: 
3. Make request: curl http://localhost/fail

Here's a simple reproducing config:
JkMount /* worker1
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=testhost

# ping testhost
ping: unknown host testhost


Actual results: Segmentation fault


Expected results: Nice error message about not being able to resolve hostname


Additional info:
Related upstream reports:
https://bz.apache.org/bugzilla/show_bug.cgi?id=56452
https://bz.apache.org/bugzilla/show_bug.cgi?id=59164
https://mail-archives.apache.org/mod_mbox/tomcat-dev/201501.mbox/%3C20150101213422.B7310AC08A8@hades.apache.org%3E

Comment 1 Jean-frederic Clere 2016-06-22 12:18:17 UTC
per mod_jk update.

Comment 2 Jan Onderka 2016-06-23 13:23:55 UTC
Created attachment 1171511 [details]
worker.properties

Comment 3 Jan Onderka 2016-06-23 13:24:48 UTC
Created attachment 1171513 [details]
error_log

Comment 4 Jan Onderka 2016-06-23 13:26:03 UTC
Created attachment 1171514 [details]
workers.properties

Comment 5 Jan Onderka 2016-06-23 13:28:09 UTC
Created attachment 1171518 [details]
mod_jk.conf

Comment 6 Jan Onderka 2016-06-23 13:29:37 UTC
Hello,

I was trying to reproduce this issue, but seqFault never occurs. Can anybody provide any additional information about it? I always got error like "[Thu Jun 23 14:27:11 2016][2296:140440171694048] [error] ajp_validate::jk_ajp_common.c (2748): worker worker1 can't resolve tomcat address testhost"
It was tested at versions EWS 2.0.0, 2.1.0 and JWS 3.0.0. Also I upload files which were used as configs, see attachment.

Comment 7 Jan Onderka 2016-06-23 13:44:23 UTC
(In reply to Jan Onderka from comment #6)
> Hello,
> 
> I was trying to reproduce this issue, but seqFault never occurs. Can anybody
> provide any additional information about it? I always got error like "[Thu
> Jun 23 14:27:11 2016][2296:140440171694048] [error]
> ajp_validate::jk_ajp_common.c (2748): worker worker1 can't resolve tomcat
> address testhost"
> It was tested at versions EWS 2.0.0, 2.1.0 and JWS 3.0.0. Also I upload
> files which were used as configs, see attachment.

Tested with mod_jk/1.2.36, mod_jk/1.2.40

Comment 8 Jan Onderka 2016-07-12 11:56:52 UTC
(In reply to Jean-frederic Clere from comment #1)
> per mod_jk update.

Can you be more specific, please?

Comment 9 Jean-frederic Clere 2016-07-12 13:30:58 UTC
See rhbz 1342071

Comment 11 Jean-frederic Clere 2016-08-09 06:54:23 UTC
Actual the update to 1.2.41 fixes the ASFBZ 56452 so the issue should be fixed by the update.

Comment 13 Robert Bost 2016-09-13 21:51:50 UTC
This issue has been resolved in mod_jk-1.2.42 per a similar upstream report. Is the upstream report same as this bugzilla?

https://bz.apache.org/bugzilla/show_bug.cgi?id=59164

Comment 14 Jean-frederic Clere 2016-09-14 08:09:13 UTC
Actually the svn commit: r1760598 isn't in our code so the bug is still there.
Please reopen (and create the corresponding JBCS issue is it isn't forgotten)

Comment 15 Michal Karm Babacek 2016-09-20 11:32:25 UTC
@Jan Onderka,  Jan Stefl can reproduce the issue: https://bugzilla.redhat.com/show_bug.cgi?id=1338661#c4