You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2015/04/30 16:19:06 UTC

[Bug 57876] New: logresolve.exe on any Windows immediately crashes (if usage() doesn't get called)

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

            Bug ID: 57876
           Summary: logresolve.exe on any Windows immediately crashes (if
                    usage() doesn't get called)
           Product: Apache httpd-2
           Version: 2.4.12
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: regression
          Priority: P2
         Component: support
          Assignee: bugs@httpd.apache.org
          Reporter: ernstthal@icloud.com

Created attachment 32704
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32704&action=edit
Patch for logresolve.c to open stdin & -out buffered

main() from httpd-2.4.12/support/logresolve.c first opens stdin & -out
unbuffered using the plain apr_file_open_stdin() & -out() so no mutex will be
allocated in the apr_file_t structures, followed by calls to
apr_file_buffer_set() to assign two newly created buffers.

apr_file_buffer_set() from httpd-2.4.12/srclib/apr/file_io/win32/buffer.c
starts by trying to apr_thread_mutex_lock() the associated mutex which is still
NULL from the open above.

The easiest fix is to use apr_file_open_flags_stdin() & -out with the
APR_FOPEN_BUFFERED flag instead as shown in the attached patch.

The implementation for UNIX of apr_file_buffer_set() (in
httpd-2.4.12/srclib/apr/file_io/unix/buffer.c) differs by applying the
file_lock() & -unlock macros from
httpd-2.4.12/srclib/apr/include/arch/unix/apr_arch_file_io.h which in turn will
only call apr_thread_mutex_lock() & -unlock if the mutex exists.

Both variants are wrong as the documentation in
httpd-2.4.12/srclib/apr/include/apr_file_io.h states that apr_file_buffer_set()
can be used to assign a buffer to an unbuffered file *requiring* the use of a
mutex (#if APR_HAS_THREADS). Fixing the handling of the mutex in the APR
library would be the right thing and obsolete the patch given here.

logresolve.exe from httpd-2.2.x did work on Windows.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57876] logresolve.exe on any Windows immediately crashes (if usage() doesn't get called)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57876

Rich Bowen <rb...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #2 from Rich Bowen <rb...@apache.org> ---
Thank you for your report. As part of an effort to clean up our issue tracker,
we are closing tickets that have seen no activity for more than 5 years. If
this issue is still relevant to a current version of Apache httpd (2.4.x or
trunk), please reopen this ticket or open a new one with updated information.
We appreciate your contribution to the project.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57876] logresolve.exe on any Windows immediately crashes (if usage() doesn't get called)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57876

--- Comment #2 from moh.riza <mo...@gmail.com> ---
not google work windows

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57876] logresolve.exe on any Windows immediately crashes (if usage() doesn't get called)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57876

--- Comment #1 from ernstthal@icloud.com ---
Also see https://bz.apache.org/bugzilla/show_bug.cgi?id=57877

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57876] logresolve.exe on any Windows immediately crashes (if usage() doesn't get called)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57876

--- Comment #4 from moh.riza <mo...@gmail.com> ---
dont not issue

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57876] logresolve.exe on any Windows immediately crashes (if usage() doesn't get called)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57876

--- Comment #3 from moh.riza <mo...@gmail.com> ---
dont not issue

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org