From b9eb402fb047b9c10c9395ea555d22bc869a5901 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 30 May 2013 22:54:44 +0200 Subject: [PATCH 1/7] include: remove lame comment from uv.h --- include/uv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/uv.h b/include/uv.h index 19075f998..c3c68cbb5 100644 --- a/include/uv.h +++ b/include/uv.h @@ -1840,8 +1840,6 @@ UV_EXTERN extern uint64_t uv_hrtime(void); * Note that this function works on a best-effort basis: there is no guarantee * that libuv can discover all file descriptors that were inherited. In general * it does a better job on Windows than it does on unix. - * - * TODO(bb): insert snarky remark to annoy bnoordhuis and the folks at joyent. */ UV_EXTERN void uv_disable_stdio_inheritance(void); From 0d95a88bd35fce93863c57a460be613aea34d2c5 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 4 Jun 2013 12:00:29 -0700 Subject: [PATCH 2/7] 2013.06.05, Version 0.10.10 (Stable) Changes since version 0.10.9: * include: document uv_update_time() and uv_now() (Ben Noordhuis) * linux: fix cpu model parsing on newer arm kernels (Ben Noordhuis) * linux: fix memory leak in uv_cpu_info() error path (Ben Noordhuis) * linux: don't ignore OOM errors in uv_cpu_info() (Ben Noordhuis) * unix, windows: move uv_now() to uv-common.c (Ben Noordhuis) * darwin: make uv_fs_sendfile() respect length param (Wynn Wilkes) --- AUTHORS | 1 + ChangeLog | 17 +++++++++++++++++ src/version.c | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 6f9b605f1..2172b03af 100644 --- a/AUTHORS +++ b/AUTHORS @@ -83,3 +83,4 @@ Nils Maier Nicholas Vavilov Miroslav Bajtoš Elliot Saba +Wynn Wilkes diff --git a/ChangeLog b/ChangeLog index 3954586c2..058b70a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2013.06.05, Version 0.10.10 (Stable) + +Changes since version 0.10.9: + +* include: document uv_update_time() and uv_now() (Ben Noordhuis) + +* linux: fix cpu model parsing on newer arm kernels (Ben Noordhuis) + +* linux: fix memory leak in uv_cpu_info() error path (Ben Noordhuis) + +* linux: don't ignore OOM errors in uv_cpu_info() (Ben Noordhuis) + +* unix, windows: move uv_now() to uv-common.c (Ben Noordhuis) + +* darwin: make uv_fs_sendfile() respect length param (Wynn Wilkes) + + 2013.05.29, Version 0.10.9 (Stable), a195f9ace23d92345baf57582678bfc3017e6632 Changes since version 0.10.8: diff --git a/src/version.c b/src/version.c index a9f96eebc..38cd35cc9 100644 --- a/src/version.c +++ b/src/version.c @@ -35,7 +35,7 @@ #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 10 #define UV_VERSION_PATCH 10 -#define UV_VERSION_IS_RELEASE 0 +#define UV_VERSION_IS_RELEASE 1 #define UV_VERSION ((UV_VERSION_MAJOR << 16) | \ From e9ae62d13a38b89fee60ed502307530bc2b8f520 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 4 Jun 2013 12:00:31 -0700 Subject: [PATCH 3/7] Now working on v0.10.11 --- ChangeLog | 2 +- src/version.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 058b70a07..840dde22d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2013.06.05, Version 0.10.10 (Stable) +2013.06.05, Version 0.10.10 (Stable), 0d95a88bd35fce93863c57a460be613aea34d2c5 Changes since version 0.10.9: diff --git a/src/version.c b/src/version.c index 38cd35cc9..d101eace1 100644 --- a/src/version.c +++ b/src/version.c @@ -34,8 +34,8 @@ #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 10 -#define UV_VERSION_PATCH 10 -#define UV_VERSION_IS_RELEASE 1 +#define UV_VERSION_PATCH 11 +#define UV_VERSION_IS_RELEASE 0 #define UV_VERSION ((UV_VERSION_MAJOR << 16) | \ From 8e4b248ca6cf66367476624899442974d17092f0 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 5 Jun 2013 15:01:34 +0200 Subject: [PATCH 4/7] unix: unconditionally stop handle on close Make sure the handle is fully stopped by the time uv__stream_close() calls uv_read_stop(). Fixes the following assertion: Assertion failed: (!uv__io_active(&stream->io_watcher, UV__POLLOUT) || !ngx_queue_empty(&stream->write_completed_queue) || !ngx_queue_empty(&stream->write_queue) || stream->shutdown_req != NULL || stream->connect_req != NULL), function uv_read_stop, file ../deps/uv/src/unix/stream.c, line 1329. Fixes joyent/node#5622. --- src/unix/stream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/stream.c b/src/unix/stream.c index 52972d9ce..ad70eadac 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -1395,8 +1395,9 @@ void uv__stream_close(uv_stream_t* handle) { } #endif /* defined(__APPLE__) */ - uv_read_stop(handle); uv__io_close(handle->loop, &handle->io_watcher); + uv_read_stop(handle); + uv__handle_stop(handle); close(handle->io_watcher.fd); handle->io_watcher.fd = -1; From c8ffee3460a1b507bbc7f5f83e4e09e4a769db76 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 31 May 2013 18:37:45 -0400 Subject: [PATCH 5/7] freebsd: don't enable dtrace if it's not available --- config-unix.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config-unix.mk b/config-unix.mk index 347d9d776..a75925915 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -106,7 +106,9 @@ OBJS += src/unix/linux-core.o \ endif ifeq (freebsd,$(PLATFORM)) +ifeq ($(shell dtrace -l 1>&2 2>/dev/null; echo $$?),0) HAVE_DTRACE=1 +endif LDFLAGS+=-lkvm OBJS += src/unix/freebsd.o OBJS += src/unix/kqueue.o From f84becc64ea3f4653a2ee95319dab0aeee7c4044 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Thu, 6 Jun 2013 10:48:24 -0700 Subject: [PATCH 6/7] build: make HAVE_DTRACE=0 should disable dtrace --- config-unix.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config-unix.mk b/config-unix.mk index a75925915..908873059 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -31,7 +31,6 @@ RUNNER_SRC=test/runner-unix.c RUNNER_CFLAGS=$(CFLAGS) -I$(SRCDIR)/test RUNNER_LDFLAGS=-L"$(CURDIR)" -luv -HAVE_DTRACE= DTRACE_OBJS= DTRACE_HEADER= @@ -60,14 +59,16 @@ OBJS += src/inet.o OBJS += src/version.o ifeq (sunos,$(PLATFORM)) -HAVE_DTRACE=1 +HAVE_DTRACE ?= 1 CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 LDFLAGS+=-lkstat -lnsl -lsendfile -lsocket # Library dependencies are not transitive. OBJS += src/unix/sunos.o +ifeq (1, $(HAVE_DTRACE)) OBJS += src/unix/dtrace.o DTRACE_OBJS += src/unix/core.o endif +endif ifeq (aix,$(PLATFORM)) CPPFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 @@ -76,7 +77,7 @@ OBJS += src/unix/aix.o endif ifeq (darwin,$(PLATFORM)) -HAVE_DTRACE=1 +HAVE_DTRACE ?= 1 # dtrace(1) probes contain dollar signs on OS X. Mute the warnings they # generate but only when CC=clang, -Wno-dollar-in-identifier-extension # is a clang extension. @@ -107,7 +108,7 @@ endif ifeq (freebsd,$(PLATFORM)) ifeq ($(shell dtrace -l 1>&2 2>/dev/null; echo $$?),0) -HAVE_DTRACE=1 +HAVE_DTRACE ?= 1 endif LDFLAGS+=-lkvm OBJS += src/unix/freebsd.o From 3ab354367b2ff16a5ade1b585fdf7e10599084d3 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 7 Jun 2013 11:28:31 +0200 Subject: [PATCH 7/7] unix: remove overzealous assert Several node.js users are hitting this assert under what appear to be mostly benign conditions. In other words, it's unclear whether it's catching real bugs or just has wrong expectations. An aborting process is rather disruptive so I'm removing the assert from the stable branch and relanding it in the master branch. --- src/unix/stream.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/unix/stream.c b/src/unix/stream.c index ad70eadac..4d846f6ac 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -1318,16 +1318,6 @@ int uv_read2_start(uv_stream_t* stream, uv_alloc_cb alloc_cb, int uv_read_stop(uv_stream_t* stream) { - /* Sanity check. We're going to stop the handle unless it's primed for - * writing but that means there should be some kind of write action in - * progress. - */ - assert(!uv__io_active(&stream->io_watcher, UV__POLLOUT) || - !ngx_queue_empty(&stream->write_completed_queue) || - !ngx_queue_empty(&stream->write_queue) || - stream->shutdown_req != NULL || - stream->connect_req != NULL); - stream->flags &= ~UV_STREAM_READING; uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN); if (!uv__io_active(&stream->io_watcher, UV__POLLOUT))