From d2c7d9ffb3ceffdb324ce93fc2ea2f442f12c1fe Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 13 Jun 2012 18:57:14 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 24 ++++++++++++++++++++++++ erts/vsn.mk | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 09950e865b..8ff3f50348 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -30,6 +30,30 @@

This document describes the changes made to the ERTS application.

+
Erts 5.7.5.3 + +
Fixed Bugs and Malfunctions + + +

+ On Linux systems using heart (erl -heart) and a + HEAR_BEAT_TIMEOUT less than default, heart could fire + even though Erlang was running fine after approx 298 to + 497 days (depending on kernel config). This was due to + the behaviour of the times(2) system call. Usage of + times(2) is now replaced with clock_gettime(2) and the + CLOCK_MONOTONIC clock, resulting in a more stable + solution. The Erlang VM itself has used clock_gettime(2) + on linux since before R12B, so this only affects the + heart program.

+

+ Own Id: OTP-10111 Aux Id: seq12075

+
+
+
+ +
+
Erts 5.7.5.2
Known Bugs and Problems diff --git a/erts/vsn.mk b/erts/vsn.mk index 4e6571c70b..2e830150d8 100644 --- a/erts/vsn.mk +++ b/erts/vsn.mk @@ -17,7 +17,7 @@ # %CopyrightEnd% # -VSN = 5.7.5.2 +VSN = 5.7.5.3 SYSTEM_VSN = R13B04 # Port number 4365 in 4.2 -- cgit v1.2.3 From 8130bf4110459f71caa04ef963af74ff7fd89f95 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 14 Jun 2012 15:03:39 +0200 Subject: Teach heart to use clock_gettime instead of times() --- erts/etc/common/Makefile.in | 5 ++++- erts/etc/common/heart.c | 38 ++++++++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in index 4754328c0b..250934656a 100644 --- a/erts/etc/common/Makefile.in +++ b/erts/etc/common/Makefile.in @@ -61,6 +61,9 @@ LD = @LD@ LIBS = @LIBS@ LDFLAGS = @LDFLAGS@ +# For clock_gettime in heart +RTLIBS = @LIBRT@ + ifeq ($(TARGET),win32) ifeq ($(TYPE),debug) CFLAGS = $(subst -O2,-g,@CFLAGS@ @DEFS@ $(TYPE_FLAGS) @WFLAGS@ -I$(SYSDIR) \ @@ -467,7 +470,7 @@ else $(BINDIR)/heart@EXEEXT@: $(OBJDIR)/heart.o $(ENTRY_OBJ) $(LD) $(LDFLAGS) $(ENTRY_LDFLAGS) -o $@ $(OBJDIR)/heart.o \ - $(ENTRY_OBJ) $(WINDSOCK) + $(RTLIBS) $(ENTRY_OBJ) $(WINDSOCK) $(OBJDIR)/heart.o: heart.c $(CC) $(CFLAGS) -o $@ -c heart.c diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c index 7a5746e630..6d787ab773 100644 --- a/erts/etc/common/heart.c +++ b/erts/etc/common/heart.c @@ -102,9 +102,6 @@ * that can simulate gethrtime with clock_gettime, no use implementing * a phony gethrtime in this file as the time questions are so infrequent. */ -#if defined(CORRET_USING_TIMES) || defined(GETHRTIME_WITH_CLOCK_GETTIME) -# define HEART_CORRECT_USING_TIMES 1 -#endif #include #include @@ -134,7 +131,7 @@ # include # include # include -# if defined(HEART_CORRECT_USING_TIMES) +# if defined(CORRECT_USING_TIMES) # include # include # endif @@ -447,7 +444,8 @@ message_loop(erlin_fd, erlout_fd) */ timestamp(&now); if (now > last_received + heart_beat_timeout) { - print_error("heart-beat time-out."); + print_error("heart-beat time-out, no activity for %lu seconds", + (unsigned long) (now - last_received)); return R_TIMEOUT; } /* @@ -1077,7 +1075,31 @@ time_t timestamp(time_t *res) return r; } -#elif defined(HAVE_GETHRTIME) +#elif defined(HAVE_GETHRTIME) || defined(GETHRTIME_WITH_CLOCK_GETTIME) + +#if defined(GETHRTIME_WITH_CLOCK_GETTIME) +typedef long long SysHrTime; + +SysHrTime sys_gethrtime(void); + +SysHrTime sys_gethrtime(void) +{ + struct timespec ts; + long long result; + if (clock_gettime(CLOCK_MONOTONIC,&ts) != 0) { + print_error("Fatal, could not get clock_monotonic value, terminating! " + "errno = %d\n", errno); + exit(1); + } + result = ((long long) ts.tv_sec) * 1000000000LL + + ((long long) ts.tv_nsec); + return (SysHrTime) result; +} +#else +typedef hrtime_t SysHrTime; +#define sys_gethrtime() gethrtime() +#endif + void init_timestamp(void) { @@ -1085,14 +1107,14 @@ void init_timestamp(void) time_t timestamp(time_t *res) { - hrtime_t ht = gethrtime(); + SysHrTime ht = sys_gethrtime(); time_t r = (time_t) (ht / 1000000000); if (res != NULL) *res = r; return r; } -#elif defined(HEART_CORRECT_USING_TIMES) +#elif defined(CORRECT_USING_TIMES) # ifdef NO_SYSCONF # include -- cgit v1.2.3 From ad660455d333d2538473f5b7abf7ab1784027da0 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 14 Jun 2012 15:07:41 +0200 Subject: Bump vsn --- erts/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/vsn.mk b/erts/vsn.mk index 224727b094..0e755ad8c5 100644 --- a/erts/vsn.mk +++ b/erts/vsn.mk @@ -17,7 +17,7 @@ # %CopyrightEnd% # -VSN = 5.8.5.1 +VSN = 5.8.5.2 SYSTEM_VSN = R14B04 # Port number 4365 in 4.2 -- cgit v1.2.3 From bb78e3f17ed823c6a3a67fa0b6d5829e1d315168 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 14 Jun 2012 15:13:32 +0200 Subject: Teach heart to use clock_gettime instead of times() --- erts/etc/common/Makefile.in | 5 ++++- erts/etc/common/heart.c | 38 ++++++++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in index 28c5e5ccad..35f546e9c4 100644 --- a/erts/etc/common/Makefile.in +++ b/erts/etc/common/Makefile.in @@ -64,6 +64,9 @@ LD = @LD@ LIBS = @LIBS@ LDFLAGS = @LDFLAGS@ +# For clock_gettime in heart +RTLIBS = @LIBRT@ + ifeq ($(TARGET),win32) ifeq ($(TYPE),debug) CFLAGS = $(subst -O2,-g,@CFLAGS@ @DEFS@ $(TYPE_FLAGS) @WFLAGS@ -I$(SYSDIR) \ @@ -416,7 +419,7 @@ else $(BINDIR)/heart@EXEEXT@: $(OBJDIR)/heart.o $(ENTRY_OBJ) $(LD) $(LDFLAGS) $(ENTRY_LDFLAGS) -o $@ $(OBJDIR)/heart.o \ - $(ENTRY_OBJ) $(WINDSOCK) + $(RTLIBS) $(ENTRY_OBJ) $(WINDSOCK) $(OBJDIR)/heart.o: heart.c $(RC_GENERATED) $(CC) $(CFLAGS) -o $@ -c heart.c diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c index 755e308219..70c2b3bb23 100644 --- a/erts/etc/common/heart.c +++ b/erts/etc/common/heart.c @@ -102,9 +102,6 @@ * that can simulate gethrtime with clock_gettime, no use implementing * a phony gethrtime in this file as the time questions are so infrequent. */ -#if defined(CORRET_USING_TIMES) || defined(GETHRTIME_WITH_CLOCK_GETTIME) -# define HEART_CORRECT_USING_TIMES 1 -#endif #include #include @@ -134,7 +131,7 @@ # include # include # include -# if defined(HEART_CORRECT_USING_TIMES) +# if defined(CORRECT_USING_TIMES) # include # include # endif @@ -447,7 +444,8 @@ message_loop(erlin_fd, erlout_fd) */ timestamp(&now); if (now > last_received + heart_beat_timeout) { - print_error("heart-beat time-out."); + print_error("heart-beat time-out, no activity for %lu seconds", + (unsigned long) (now - last_received)); return R_TIMEOUT; } /* @@ -1079,7 +1077,31 @@ time_t timestamp(time_t *res) return r; } -#elif defined(HAVE_GETHRTIME) +#elif defined(HAVE_GETHRTIME) || defined(GETHRTIME_WITH_CLOCK_GETTIME) + +#if defined(GETHRTIME_WITH_CLOCK_GETTIME) +typedef long long SysHrTime; + +SysHrTime sys_gethrtime(void); + +SysHrTime sys_gethrtime(void) +{ + struct timespec ts; + long long result; + if (clock_gettime(CLOCK_MONOTONIC,&ts) != 0) { + print_error("Fatal, could not get clock_monotonic value, terminating! " + "errno = %d\n", errno); + exit(1); + } + result = ((long long) ts.tv_sec) * 1000000000LL + + ((long long) ts.tv_nsec); + return (SysHrTime) result; +} +#else +typedef hrtime_t SysHrTime; +#define sys_gethrtime() gethrtime() +#endif + void init_timestamp(void) { @@ -1087,14 +1109,14 @@ void init_timestamp(void) time_t timestamp(time_t *res) { - hrtime_t ht = gethrtime(); + SysHrTime ht = sys_gethrtime(); time_t r = (time_t) (ht / 1000000000); if (res != NULL) *res = r; return r; } -#elif defined(HEART_CORRECT_USING_TIMES) +#elif defined(CORRECT_USING_TIMES) # ifdef NO_SYSCONF # include -- cgit v1.2.3 From 36e90ad779bd17bcbeb8174616aabb01d7666bad Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 14 Jun 2012 15:13:56 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 1a79263928..c73c52a92f 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -30,6 +30,52 @@

This document describes the changes made to the ERTS application.

+
Erts 5.8.5.2 + +
Fixed Bugs and Malfunctions + + +

+ On Linux systems using heart (erl -heart) and a + HEAR_BEAT_TIMEOUT less than default, heart could fire + even though Erlang was running fine after approx 298 to + 497 days (depending on kernel config). This was due to + the behaviour of the times(2) system call. Usage of + times(2) is now replaced with clock_gettime(2) and the + CLOCK_MONOTONIC clock, resulting in a more stable + solution. The Erlang VM itself has used clock_gettime(2) + on linux since before R12B, so this only affects the + heart program.

+

+ Own Id: OTP-10111 Aux Id: seq12075

+
+
+
+ + +
Improvements and New Features + + +

+ The extra memory barriers introduced by bug-fix OTP-9281 + were unnecessarily used also on tables without the + write_concurrency option enabled. This could + unnecessarily degrade performance of ETS tables without + write_concurrency on some hardware (e.g. PowerPC) + while not effecting performance at all on other hardware + (e.g. x86/x86_64).

+

+ OTP-9281 (R14B03): ETS tables using the + write_concurrency option could potentially get + into an internally inconsistent state.

+

+ Own Id: OTP-10048 Aux Id: OTP-9281

+
+
+
+ +
+
Erts 5.8.5.1
Improvements and New Features -- cgit v1.2.3 From 745e246212e9d361554f6a3769af0c42898118eb Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 14 Jun 2012 15:22:14 +0200 Subject: Bump vsn --- erts/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/vsn.mk b/erts/vsn.mk index 42a94e18b8..8eee513eec 100644 --- a/erts/vsn.mk +++ b/erts/vsn.mk @@ -17,7 +17,7 @@ # %CopyrightEnd% # -VSN = 5.9.1.1 +VSN = 5.9.1.2 SYSTEM_VSN = R15B01 # Port number 4365 in 4.2 -- cgit v1.2.3 From 8662ae851a6d8f1efec2740b7aef78ccbb75dade Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Fri, 15 Jun 2012 14:41:40 +0200 Subject: Fix compilation of examples and tc names on windows --- lib/mnesia/test/Makefile | 28 ++++++++++++++++++---------- lib/mnesia/test/mnesia_consistency_test.erl | 22 +++++++++++----------- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/lib/mnesia/test/Makefile b/lib/mnesia/test/Makefile index ae4c9626c7..f041fef85b 100644 --- a/lib/mnesia/test/Makefile +++ b/lib/mnesia/test/Makefile @@ -52,24 +52,29 @@ MODULES= \ mnesia_cost \ mnesia_dbn_meters -MnesiaExamplesDir := ../examples +DocExamplesDir := ../doc/src/ -ExampleModules = \ +DocExampleModules = \ company \ company_o \ - bup \ - mnesia_meter \ - mnesia_tpcb -ExamplesHrl = \ + bup + +DocExamplesHrl = \ company.hrl \ company_o.hrl -ERL_FILES= $(MODULES:%=%.erl) $(ExampleModules:%=$(MnesiaExamplesDir)/%.erl) +ExamplesDir := ../examples/ + +ExampleModules = \ + mnesia_meter \ + mnesia_tpcb -HRL_FILES= mnesia_test_lib.hrl $(ExamplesHrl:%=$(MnesiaExamplesDir)/%) +ERL_FILES= $(MODULES:%=%.erl) $(DocExampleModules:%=$(DocExamplesDir)/%.erl) $(ExampleModules:%=$(ExamplesDir)/%.erl) + +HRL_FILES= mnesia_test_lib.hrl $(DocExamplesHrl:%=$(DocExamplesDir)/%) TARGET_FILES= \ - $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(ExampleModules:%=$(EBIN)/%.$(EMULATOR)) + $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(DocExampleModules:%=$(EBIN)/%.$(EMULATOR)) $(ExampleModules:%=$(EBIN)/%.$(EMULATOR)) INSTALL_PROGS= $(TARGET_FILES) @@ -91,7 +96,10 @@ EBIN = . tests debug opt: $(TARGET_FILES) -$(EBIN)/%.beam: $(MnesiaExamplesDir)/%.erl +$(EBIN)/%.beam: $(DocExamplesDir)/%.erl + $(ERLC) -bbeam $(ERL_COMPILE_FLAGS) -o$(EBIN) $< + +$(EBIN)/%.beam: $(ExamplesDir)/%.erl $(ERLC) -bbeam $(ERL_COMPILE_FLAGS) -o$(EBIN) $< clean: diff --git a/lib/mnesia/test/mnesia_consistency_test.erl b/lib/mnesia/test/mnesia_consistency_test.erl index f38e13f3a2..bb21723e27 100644 --- a/lib/mnesia/test/mnesia_consistency_test.erl +++ b/lib/mnesia/test/mnesia_consistency_test.erl @@ -100,7 +100,7 @@ groups() -> {group, updates_during_checkpoint_iteration}, {group, load_table_with_activated_checkpoint}, {group, - add_table_copy_to_table_with_activated_checkpoint}]}, + add_table_copy_to_table_checkpoint}]}, {updates_during_checkpoint_activation, [], [updates_during_checkpoint_activation_2_ram, updates_during_checkpoint_activation_2_disc, @@ -116,10 +116,10 @@ groups() -> [load_table_with_activated_checkpoint_ram, load_table_with_activated_checkpoint_disc, load_table_with_activated_checkpoint_disc_only]}, - {add_table_copy_to_table_with_activated_checkpoint, [], - [add_table_copy_to_table_with_activated_checkpoint_ram, - add_table_copy_to_table_with_activated_checkpoint_disc, - add_table_copy_to_table_with_activated_checkpoint_disc_only]}, + {add_table_copy_to_table_checkpoint, [], + [add_table_copy_to_table_checkpoint_ram, + add_table_copy_to_table_checkpoint_disc, + add_table_copy_to_table_checkpoint_disc_only]}, {backup_consistency, [], [{group, interupted_install_fallback}, {group, interupted_uninstall_fallback}, @@ -952,16 +952,16 @@ view(Source, Mod) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -add_table_copy_to_table_with_activated_checkpoint_ram(suite) -> []; -add_table_copy_to_table_with_activated_checkpoint_ram(Config) when is_list(Config) -> +add_table_copy_to_table_checkpoint_ram(suite) -> []; +add_table_copy_to_table_checkpoint_ram(Config) when is_list(Config) -> add_table_copy_to_table_with_activated_checkpoint(ram_copies, Config). -add_table_copy_to_table_with_activated_checkpoint_disc(suite) -> []; -add_table_copy_to_table_with_activated_checkpoint_disc(Config) when is_list(Config) -> +add_table_copy_to_table_checkpoint_disc(suite) -> []; +add_table_copy_to_table_checkpoint_disc(Config) when is_list(Config) -> add_table_copy_to_table_with_activated_checkpoint(disc_copies, Config). -add_table_copy_to_table_with_activated_checkpoint_disc_only(suite) -> []; -add_table_copy_to_table_with_activated_checkpoint_disc_only(Config) when is_list(Config) -> +add_table_copy_to_table_checkpoint_disc_only(suite) -> []; +add_table_copy_to_table_checkpoint_disc_only(Config) when is_list(Config) -> add_table_copy_to_table_with_activated_checkpoint(disc_only_copies, Config). add_table_copy_to_table_with_activated_checkpoint(Type,Config) -> -- cgit v1.2.3 From 7f62ffa61d422f095a4cdf88aacec68c10738372 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 16 Aug 2012 19:03:08 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 6b6a3374d1..825a67356d 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -30,6 +30,30 @@

This document describes the changes made to the ERTS application.

+
Erts 5.9.1.2 + +
Fixed Bugs and Malfunctions + + +

+ On Linux systems using heart (erl -heart) and a + HEAR_BEAT_TIMEOUT less than default, heart could fire + even though Erlang was running fine after approx 298 to + 497 days (depending on kernel config). This was due to + the behaviour of the times(2) system call. Usage of + times(2) is now replaced with clock_gettime(2) and the + CLOCK_MONOTONIC clock, resulting in a more stable + solution. The Erlang VM itself has used clock_gettime(2) + on linux since before R12B, so this only affects the + heart program.

+

+ Own Id: OTP-10111 Aux Id: seq12075

+
+
+
+ +
+
Erts 5.9.1.1
Fixed Bugs and Malfunctions -- cgit v1.2.3