Bug 1328231 - mod_jk Segmentation fault when trying to resolve unknown host
Summary: mod_jk Segmentation fault when trying to resolve unknown host
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: mod_jk
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: DR01
: 2.1.1
Assignee: Permaine Cheung
QA Contact: Jan Onderka
URL:
Whiteboard:
Depends On: 1342071
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-18 19:14 UTC by Robert Bost
Modified: 2019-10-10 11:54 UTC (History)
10 users (show)

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.
Clone Of:
: 1338661 (view as bug list)
Environment:
Last Closed: 2019-06-13 12:20:03 UTC
Type: Bug
Embargoed:
dmichael: needinfo+


Attachments (Terms of Use)
worker.properties (943 bytes, text/plain)
2016-06-23 13:23 UTC, Jan Onderka
no flags Details
error_log (3.61 KB, text/plain)
2016-06-23 13:24 UTC, Jan Onderka
no flags Details
workers.properties (162 bytes, text/plain)
2016-06-23 13:26 UTC, Jan Onderka
no flags Details
mod_jk.conf (943 bytes, text/plain)
2016-06-23 13:28 UTC, Jan Onderka
no flags Details

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


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