Skip to content

Commit

Permalink
fix for segfault on file changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Eissing committed Apr 19, 2016
1 parent 3c3c853 commit a3d4a15
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v1.4.7
--------------------------------------------------------------------------------
* disabling file mmap handling as this leads to segmentation faults when files
are truncates while being streamed out.
* Some additional trace1 logging when connections give unexpected errors, e.g.
clients close connection without final GOAWAY frame.

v1.4.6 (as released in Apache httpd 2.4.20)
--------------------------------------------------------------------------------
* incrementing keepalives on each request started so that logging %k gives
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ What you find here are **early experience versions** for people who like living
If you want HTTP/2 in your production environment, please head over to the official releases at Apache and grab one of those or wait until the various OS distributions have assembled one for you.

##Current Version
The version 1.4.6 is **exactly** the one released in Apache httpd 2-.4.20.

Later versions willl be an **early experience version**
and there is no guarantee that it will be released as it is here by Apache. But you are welcome to test it and give feedback.
The versions here are **early experience versions**, based on Apache httpd 2-.4.20. There is no guarantee that thises will be released unchanged by Apache. But you are welcome to test it and give feedback.

##Install

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#

AC_PREREQ([2.69])
AC_INIT([mod_http2], [1.4.6], [[email protected]])
AC_INIT([mod_http2], [1.4.7], [[email protected]])

LT_PREREQ([2.2.6])
LT_INIT()
Expand Down
3 changes: 3 additions & 0 deletions mod_http2/h2_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -2172,6 +2172,9 @@ apr_status_t h2_session_process(h2_session *session, int async)
/* continue reading handling */
}
else {
ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, c,
"h2_session(%ld): idle(1 sec timeout) "
"read failed", session->id);
dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, "error");
}
}
Expand Down
9 changes: 6 additions & 3 deletions mod_http2/h2_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ apr_status_t h2_util_move(apr_bucket_brigade *to, apr_bucket_brigade *from,
}

if (!APR_BRIGADE_EMPTY(from)) {
apr_bucket *b, *end;
apr_bucket *b, *nb, *end;

status = last_not_included(from, maxlen, same_alloc,
pfile_buckets_allowed, &end);
Expand Down Expand Up @@ -526,8 +526,11 @@ apr_status_t h2_util_move(apr_bucket_brigade *to, apr_bucket_brigade *from,
return status;
}
}
apr_brigade_insert_file(to, fd, b->start, b->length,
to->p);
nb = apr_brigade_insert_file(to, fd, b->start, b->length,
to->p);
#if APR_HAS_MMAP
apr_bucket_file_enable_mmap(nb, 0);
#endif
--(*pfile_buckets_allowed);
}
else {
Expand Down
4 changes: 2 additions & 2 deletions mod_http2/h2_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
* @macro
* Version number of the http2 module as c string
*/
#define MOD_HTTP2_VERSION "1.4.6"
#define MOD_HTTP2_VERSION "1.4.7"

/**
* @macro
* Numerical representation of the version number of the http2 module
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
#define MOD_HTTP2_VERSION_NUM 0x010406
#define MOD_HTTP2_VERSION_NUM 0x010407


#endif /* mod_h2_h2_version_h */

0 comments on commit a3d4a15

Please sign in to comment.