From vlm@REDACTED Thu Apr 2 09:05:41 2009 From: vlm@REDACTED (Lev Walkin) Date: Thu, 02 Apr 2009 00:05:41 -0700 Subject: [erlang-bugs] Documentation error in crypto Message-ID: <49D463C5.6040701@lionet.info> Documentation (erl -man crypto) specifies: rsa_verify(Digest, Signature, Key) -> Verified whereas code expects Data instead of digest: > rsa_verify(Data,Signature,Key) -> > rsa_verify(sha, Data,Signature,Key). > rsa_verify(Type,Data,Signature,Key) -> > control(rsa_verify_digest_type(Type), [Data,Signature,Key]) == <<1>>. -- Lev Walkin vlm@REDACTED From lfredlund@REDACTED Thu Apr 2 15:25:58 2009 From: lfredlund@REDACTED (=?ISO-8859-1?Q?Lars-=C5ke_Fredlund?=) Date: Thu, 02 Apr 2009 15:25:58 +0200 Subject: [erlang-bugs] Possible bug when compiling "from_core" in R13A Message-ID: <49D4BCE6.1000009@fi.upm.es> Hello, when compiling from Core Erlang the following compiler problem occurs (bug.core -- failing module, and bug.txt -- report). Sorry for not supplying Erlang code, but the failing Core Erlang fragment is the result of some internal transformations. It is of course possible that the module does not represent correct Core Erlang code (but at least core_lint:module doesn't report any error). I have not had time to check this in later releases yet. Best regards, Lars-Ake Fredlund -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bug.core URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bug.txt URL: From bgustavsson@REDACTED Fri Apr 3 08:16:12 2009 From: bgustavsson@REDACTED (Bjorn Gustavsson) Date: Fri, 3 Apr 2009 08:16:12 +0200 Subject: [erlang-bugs] Possible bug when compiling "from_core" in R13A In-Reply-To: <49D4BCE6.1000009@fi.upm.es> References: <49D4BCE6.1000009@fi.upm.es> Message-ID: <6672d0160904022316x380db792j25839976a63e737@mail.gmail.com> 2009/4/2 Lars-?ke Fredlund : > Hello, > > when compiling from Core Erlang the following compiler problem occurs > (bug.core -- failing module, and bug.txt -- report). Sorry for not supplying > Erlang code, but the failing Core Erlang fragment is the result of some > internal transformations. It is of course possible that the module does not > represent correct Core Erlang code (but at least core_lint:module doesn't > report any error). Thanks for the bug report. Your Core Erlang code does not violate the Core Erlang specification, as far as I know. The problem is the nested try/catch blocks in guards. The standard translator to Core Erlang (v3_core) never produces nested try/catch blocks in guards, so the beam_bool optimization pass was not expecting the resulting code. I have corrected beam_bool to detect this situation and back off, i.e. not attempt to do guard test optimizations on that kind of code. The correction will be included in R13B. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From davidepesa@REDACTED Sat Apr 4 13:05:05 2009 From: davidepesa@REDACTED (Davide Pesavento) Date: Sat, 4 Apr 2009 13:05:05 +0200 Subject: [erlang-bugs] Build system ignores LDFLAGS In-Reply-To: <2da21fe50903311313h11e175dfwee2a6b742deacc2d@mail.gmail.com> References: <2da21fe50903311313h11e175dfwee2a6b742deacc2d@mail.gmail.com> Message-ID: <2da21fe50904040405p5a1daae7ja6a0ac8868de406f@mail.gmail.com> On Tue, Mar 31, 2009 at 22:13, Davide Pesavento wrote: > Hello, > > Erlang's build system seems to ignore custom LDFLAGS. This is the QA > warning shown by Portage (Gentoo Linux's package manager) after > building R12B-5 with LDFLAGS="-Wl,-O1 -Wl,--as-needed > -Wl,--hash-style=gnu" > > QA Notice: Files built without respecting LDFLAGS have been detected > ?Please include the following list of files in your report: > /usr/lib64/erlang/lib/runtime_tools-1.7.3/priv/lib/trace_file_drv.so > /usr/lib64/erlang/lib/runtime_tools-1.7.3/priv/lib/trace_ip_drv.so > /usr/lib64/erlang/lib/megaco-3.9.1.1/priv/lib/megaco_flex_scanner_drv_mt.so > /usr/lib64/erlang/lib/megaco-3.9.1.1/priv/lib/megaco_flex_scanner_drv.so > /usr/lib64/erlang/lib/erl_interface-3.5.9/bin/erl_call > /usr/lib64/erlang/lib/ssl-3.10/priv/bin/ssl_esock > /usr/lib64/erlang/lib/asn1-1.6.2/priv/lib/asn1_erl_drv.so > /usr/lib64/erlang/lib/crypto-1.5.3/priv/lib/crypto_drv.so > /usr/lib64/erlang/lib/common_test-1.3.4/priv/lib/erl_rx_driver.so > /usr/lib64/erlang/erts-5.6.5/bin/child_setup > > Before digging into the Makefiles, I'd like to know if you already > have some ideas about the root cause of this issue. > This bug is still present in R13A. * QA Notice: Files built without respecting LDFLAGS have been detected * Please include the following list of files in your report: * /usr/lib64/erlang/lib/runtime_tools-1.8/priv/lib/trace_file_drv.so * /usr/lib64/erlang/lib/runtime_tools-1.8/priv/lib/trace_ip_drv.so * /usr/lib64/erlang/lib/erl_interface-3.6/bin/erl_call * /usr/lib64/erlang/lib/crypto-1.6/priv/lib/crypto_drv.so * /usr/lib64/erlang/lib/megaco-3.10.0.1/priv/lib/megaco_flex_scanner_drv_mt.so * /usr/lib64/erlang/lib/megaco-3.10.0.1/priv/lib/megaco_flex_scanner_drv.so * /usr/lib64/erlang/lib/ssl-3.10.1/priv/bin/ssl_esock * /usr/lib64/erlang/lib/asn1-1.6.8/priv/lib/asn1_erl_drv.so * /usr/lib64/erlang/erts-5.7/bin/child_setup Best regards, Davide From adam@REDACTED Tue Apr 7 16:00:25 2009 From: adam@REDACTED (Adam Lindberg) Date: Tue, 7 Apr 2009 15:00:25 +0100 (BST) Subject: [erlang-bugs] Documentation error in Mnesia In-Reply-To: <16088770.106161239111081652.JavaMail.root@zimbra> Message-ID: <5349534.106181239112825112.JavaMail.root@zimbra> Searching for an explanation of the sticky_write option in Mnesia I found none, and after some confusion I realized that it is misspelled under lock/2: http://erlang.org/doc/man/mnesia.html stick_write instead of sticky_write Cheers, Adam From kenji.rikitake@REDACTED Tue Apr 7 15:33:41 2009 From: kenji.rikitake@REDACTED (Kenji Rikitake) Date: Tue, 7 Apr 2009 22:33:41 +0900 Subject: [erlang-bugs] R13A test case example: how to test leap-second code on FreeBSD In-Reply-To: <6672d0160810170154h4f74cc8do7a79828363112729@mail.gmail.com> References: <20080914014111.GA7026@k2r.org> <6672d0160810170154h4f74cc8do7a79828363112729@mail.gmail.com> Message-ID: <20090407133341.GA10312@k2r.org> I found out a part of my patch was incorporated in R13A erts/emulator/beam/erl_time_sup.c, and I saw a question in the comment that there was no test case for checking whether the TAI (leap second) support really works. Here is a piece of code for testing on FreeBSD. (see /usr/src/share/zoneinfo/Makefile for the details) I think this will work on 7.x as well as 6.x. For testing a TAI-based clock on FreeBSD (with leap second support) perform the following script on root then the zone file will include the leap seconds: # -- begin -- cd /usr/src/share/zoneinfo make -DLEAPSECONDS clean install # CAUTION: set to your local timezone cp /usr/share/zoneinfo/Europe/Stockholm /etc/localtime # -- end -- For putting back into non-leap-second clock on FreeBSD, perform the following script on root: # -- begin -- cd /usr/src/share/zoneinfo make clean install # CAUTION: set to your local timezone cp /usr/share/zoneinfo/Europe/Stockholm /etc/localtime # -- end -- These scripts will change the timezone definition *system-wide*. I hope this helps and I appreciate you put in the code into R13A. Regards, Kenji Rikitake In the message <6672d0160810170154h4f74cc8do7a79828363112729@REDACTED> dated Fri, Oct 17, 2008 at 10:53:37AM +0200, Bjorn Gustavsson writes: > > A patch to correct erlang:universaltime_to_localtime/1 > > for FreeBSD running leap-second-enabled timezone > > by Kenji Rikitake > > 14-SEP-2008 > > > > * Summary > > > > This patch fixes the time calculation problem of > > FreeBSD 6.x and 7.x, which has the internal leap-second > > correction enabled. > > This patch is tested with Erlang/OTP R12B-4 source distribution. > > > > We will probably add the patch to R12B-5 with slight modifications. > > /Bjorn From dgud@REDACTED Tue Apr 7 17:01:18 2009 From: dgud@REDACTED (Dan Gudmundsson) Date: Tue, 07 Apr 2009 17:01:18 +0200 Subject: [erlang-bugs] Documentation error in Mnesia In-Reply-To: <5349534.106181239112825112.JavaMail.root@zimbra> References: <5349534.106181239112825112.JavaMail.root@zimbra> Message-ID: <49DB6ABE.1060004@erix.ericsson.se> Thanks, fixed. Adam Lindberg wrote: > Searching for an explanation of the sticky_write option in Mnesia I found none, and after some confusion I realized that it is misspelled under lock/2: > > http://erlang.org/doc/man/mnesia.html > stick_write instead of sticky_write > > Cheers, > Adam > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://www.erlang.org/mailman/listinfo/erlang-bugs > From kenji.rikitake@REDACTED Sun Apr 12 06:12:45 2009 From: kenji.rikitake@REDACTED (Kenji Rikitake) Date: Sun, 12 Apr 2009 13:12:45 +0900 Subject: [erlang-bugs] R13A patch for erts/emulator/drivers/common/inet_drv.c Message-ID: <20090412041245.GA29991@k2r.org> This is a patch for compiling Erlang R13A on FreeBSD 7.1-RELEASE. Note that I apply all Giacomo's patches for Erlang R12B5 (available on FreeBSD port lang/erlang) BEFORE applying this patch. Kenji Rikitake R13A patch for solving a compilation error when building erts/emulator/drivers/common/inet_drv.c by Kenji Rikitake 12-APR-2009 Symptom: When building R13A in FreeBSD 7.1-RELEASE, the compiler flag HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY is NOT enabled. Some code in erts/emulator/drivers/common/inet_drv.c incorrectly assumes HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY is always true when HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_FLAGS is true in config.h. This assumption causes a compilation error. Workaround: apply the following patch. NOTE: this is a followup patch of Giacomo Olgeni's patch for FreeBSD at: http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/lang/erlang/files/patch-erts_emulator_drivers_common_inet__drv.c?rev=1.1;content-type=text%2Fplain so Giacomo's patch must be applied before this patch to compile. --- erts/emulator/drivers/common/inet_drv.c.FCS 2009-04-12 12:16:52.000000000 +0900 +++ erts/emulator/drivers/common/inet_drv.c 2009-04-12 12:36:06.000000000 +0900 @@ -5301,16 +5301,19 @@ if (pmtud_enable && pmtud_disable) return -1; if (pmtud_enable) cflags |= SPP_PMTUD_ENABLE; if (pmtud_disable) cflags |= SPP_PMTUD_DISABLE; +# ifdef HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY + /* The followings are missing in FreeBSD 7.1 */ sackdelay_enable =eflags& SCTP_FLAG_SACDELAY_ENABLE; sackdelay_disable=eflags& SCTP_FLAG_SACDELAY_DISABLE; if (sackdelay_enable && sackdelay_disable) return -1; if (sackdelay_enable) cflags |= SPP_SACKDELAY_ENABLE; if (sackdelay_disable) cflags |= SPP_SACKDELAY_DISABLE; +# endif arg.pap.spp_flags = cflags; # endif curr += 4; @@ -6207,17 +6210,19 @@ if (ap.spp_flags & SPP_PMTUD_ENABLE) { i = LOAD_ATOM (spec, i, am_pmtud_enable); n++; } if (ap.spp_flags & SPP_PMTUD_DISABLE) { i = LOAD_ATOM (spec, i, am_pmtud_disable); n++; } - +# ifdef HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY + /* SPP_SACKDELAY_* not in FreeBSD 7.1 */ if (ap.spp_flags & SPP_SACKDELAY_ENABLE) { i = LOAD_ATOM (spec, i, am_sackdelay_enable); n++; } if (ap.spp_flags & SPP_SACKDELAY_DISABLE) { i = LOAD_ATOM (spec, i, am_sackdelay_disable); n++; } # endif +# endif PLACE_FOR(spec, i, LOAD_NIL_CNT + LOAD_LIST_CNT + 2*LOAD_TUPLE_CNT); /* Close up the Flags list: */ From kenji.rikitake@REDACTED Sun Apr 12 07:33:33 2009 From: kenji.rikitake@REDACTED (Kenji Rikitake) Date: Sun, 12 Apr 2009 14:33:33 +0900 Subject: [erlang-bugs] R13A patch for lib/wx/examples Message-ID: <20090412053333.GA51822@k2r.org> This is a patch for compiling Erlang R13A on FreeBSD 7.1-RELEASE. Note that I apply all Giacomo's patches for Erlang R12B5 (available on FreeBSD port lang/erlang) BEFORE applying this patch. Kenji Rikitake R13A patch to solve lib/wx/examples installation errors on FreeBSD 7.1-RELEASE by Kenji Rikitake 12-APR-2009 Symptom: R13A lib/wx/examples files causes installation error on FreeBSD 7.1-RELEASE. This is caused by the Makefile code which errorneously trying to install BEAM binaries and other files as OS executables. Workaround: Using INSTALL_DATA instead of INSTALL_PROGRAM in the Makefiles solves this issue. Apply the following patches: --- ./lib/wx/examples/simple/Makefile.FCS 2009-03-13 00:04:24.000000000 +0900 +++ ./lib/wx/examples/simple/Makefile 2009-04-12 14:10:58.000000000 +0900 @@ -52,11 +52,11 @@ docs: release_spec: $(INSTALL_DIR) $(EXRELSYSDIR) $(INSTALL_DATA) $(TESTSRC) $(EXRELSYSDIR) - $(INSTALL_PROGRAM) copy.xpm sample.xpm $(TESTTARGETS) $(EXRELSYSDIR) + $(INSTALL_DATA) copy.xpm sample.xpm $(TESTTARGETS) $(EXRELSYSDIR) release_tests_spec: release_docs_spec: --- ./lib/wx/examples/sudoku/Makefile.FCS 2009-03-12 23:44:22.000000000 +0900 +++ ./lib/wx/examples/sudoku/Makefile 2009-04-12 14:11:32.000000000 +0900 @@ -52,11 +52,11 @@ docs: release_spec: $(INSTALL_DIR) $(EXRELSYSDIR) $(INSTALL_DATA) $(TESTSRC) sudoku.hrl $(EXRELSYSDIR) - $(INSTALL_PROGRAM) $(TESTTARGETS) $(EXRELSYSDIR) + $(INSTALL_DATA) $(TESTTARGETS) $(EXRELSYSDIR) release_tests_spec: release_docs_spec: From kenji.rikitake@REDACTED Sun Apr 12 09:12:46 2009 From: kenji.rikitake@REDACTED (Kenji Rikitake) Date: Sun, 12 Apr 2009 16:12:46 +0900 Subject: [erlang-bugs] [erlang-patches] R13A patches for os_mon on dragonfly In-Reply-To: <49D9FB20.4050703@erix.ericsson.se> References: <20090405134412.5f4201a6@horse.intern> <49D9FB20.4050703@erix.ericsson.se> Message-ID: <20090412071246.GA53449@k2r.org> Dear Bjorn and the list members: R13B as of 2009-04-11 is broken for FreeBSD 7.1-RELEASE. Please fix it as proposed. Kenji Rikitake R13B snapshot of 2009-04-11 has broken lib/os_mon/c_src/memsup.c for FreeBSD 7.1-RELEASE by Kenji Rikitake 12-APR-2009 Symptom: compilation error on lib/os_mon/c_src/memsup.c Possible reason: memsup.c was mangled between R13A and R13B, while trying to patch according to the "patch-aa" file in the following patch set for DragonFly BSD: http://erlang.org/pipermail/erlang-patches/2009-April/000395.html Workaround: Apply the patch "patch-aa" in the above article AS IS, as follows. --- lib/os_mon/c_src/memsup.c.FCS 2009-04-08 18:57:44.000000000 +0900 +++ lib/os_mon/c_src/memsup.c 2009-04-12 15:50:34.000000000 +0900 @@ -114,11 +114,11 @@ #include #include #if !defined (__OpenBSD__) && !defined (__NetBSD__) #include #endif -#if defined (__FreeBSD__) && defined(__DragonFly__) +#if defined (__FreeBSD__) || defined(__DragonFly__) #include #endif #endif #if defined (__linux__) From kenji.rikitake@REDACTED Sun Apr 12 09:20:53 2009 From: kenji.rikitake@REDACTED (Kenji Rikitake) Date: Sun, 12 Apr 2009 16:20:53 +0900 Subject: [erlang-bugs] R13B snapshop 2009-04-11 patch for lib/wx/examples Re: R13A patch for lib/wx/examples In-Reply-To: <20090412053333.GA51822@k2r.org> References: <20090412053333.GA51822@k2r.org> Message-ID: <20090412072053.GB53553@k2r.org> Sources under lib/wx/examples are broken on FreeBSD due to the Makefile errors. A patch follows. // Kenji Rikitake R13B snapshot 2009-04-11 patch to solve lib/wx/examples installation errors on FreeBSD 7.1-RELEASE by Kenji Rikitake 12-APR-2009 Symptom: R13B snapshot 2009-04-11 lib/wx/examples/xrc files causes installation error on FreeBSD 7.1-RELEASE. This is caused by the Makefile code which errorneously trying to install BEAM binaries and other files as OS executables. Workaround: Using INSTALL_DATA instead of INSTALL_PROGRAM in the Makefiles solves this issue. Apply the following patches: --- lib/wx/examples/xrc/Makefile.FCS 2009-04-07 23:37:42.000000000 +0900 +++ lib/wx/examples/xrc/Makefile 2009-04-12 15:44:38.000000000 +0900 @@ -60,11 +60,11 @@ docs: release_spec: $(INSTALL_DIR) $(EXRELSYSDIR) $(INSTALL_DATA) $(TESTSRC) $(EXRELSYSDIR) - $(INSTALL_PROGRAM) $(TESTTARGETS) $(EXRELSYSDIR) + $(INSTALL_DATA) $(TESTTARGETS) $(EXRELSYSDIR) $(INSTALL_DIR) $(EXRELSYSDIR)/rc $(INSTALL_DATA) $(TESTRESOURCE) $(EXRELSYSDIR)/rc release_tests_spec: In the message <20090412053333.GA51822@REDACTED> dated Sun, Apr 12, 2009 at 02:33:09PM +0900, Kenji Rikitake writes: > Date: Sun, 12 Apr 2009 14:33:33 +0900 > From: Kenji Rikitake > Subject: R13A patch for lib/wx/examples > To: olgeni@REDACTED > Cc: Kenji Rikitake , erlang-bugs@REDACTED, > erlang-patches@REDACTED > > This is a patch for compiling Erlang R13A on FreeBSD 7.1-RELEASE. > Note that I apply all Giacomo's patches for Erlang R12B5 > (available on FreeBSD port lang/erlang) BEFORE applying > this patch. > > Kenji Rikitake > > R13A patch to solve lib/wx/examples installation errors > on FreeBSD 7.1-RELEASE > by Kenji Rikitake 12-APR-2009 > > Symptom: > > R13A lib/wx/examples files causes installation error on FreeBSD > 7.1-RELEASE. This is caused by the Makefile code which errorneously > trying to install BEAM binaries and other files as OS executables. > > Workaround: > > Using INSTALL_DATA instead of INSTALL_PROGRAM in the Makefiles solves > this issue. > > Apply the following patches: > > --- ./lib/wx/examples/simple/Makefile.FCS 2009-03-13 00:04:24.000000000 +0900 > +++ ./lib/wx/examples/simple/Makefile 2009-04-12 14:10:58.000000000 +0900 > @@ -52,11 +52,11 @@ > docs: > > release_spec: > $(INSTALL_DIR) $(EXRELSYSDIR) > $(INSTALL_DATA) $(TESTSRC) $(EXRELSYSDIR) > - $(INSTALL_PROGRAM) copy.xpm sample.xpm $(TESTTARGETS) $(EXRELSYSDIR) > + $(INSTALL_DATA) copy.xpm sample.xpm $(TESTTARGETS) $(EXRELSYSDIR) > > release_tests_spec: > > release_docs_spec: > > --- ./lib/wx/examples/sudoku/Makefile.FCS 2009-03-12 23:44:22.000000000 +0900 > +++ ./lib/wx/examples/sudoku/Makefile 2009-04-12 14:11:32.000000000 +0900 > @@ -52,11 +52,11 @@ > docs: > > release_spec: > $(INSTALL_DIR) $(EXRELSYSDIR) > $(INSTALL_DATA) $(TESTSRC) sudoku.hrl $(EXRELSYSDIR) > - $(INSTALL_PROGRAM) $(TESTTARGETS) $(EXRELSYSDIR) > + $(INSTALL_DATA) $(TESTTARGETS) $(EXRELSYSDIR) > > release_tests_spec: > > release_docs_spec: > From chris.newcombe@REDACTED Mon Apr 13 22:39:28 2009 From: chris.newcombe@REDACTED (Chris Newcombe) Date: Mon, 13 Apr 2009 13:39:28 -0700 Subject: [erlang-bugs] segv in 64-bit SMP emulator (R12B-5) in erts_ddll_proc_dead Message-ID: <781dd98c0904131339g72637be2o7a09ee87257fbc37@mail.gmail.com> I'm testing this linked-in driver (JSON parser/encoder) http://github.com/davisp/eep0018/tree/master The problem occurs with the 64-bit SMP emulator. I'm building and running on Red Hat Enterprise Linux 5 (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) -- see full details at end of email. If I use the linked-in driver from more than one process at a time, it frequently causes beam to segv with: > 0 erts_ddll_proc_dead PC=0x0044eff3, FP=0x41f5a0e0 [/rhel5pdi/cnewcom/Erlang/erlang/erts-5.6.5/bin/beam.smp] 1 continue_exit_process PC=0x004a92d4, FP=0x41f5a190 [/rhel5pdi/cnewcom/Erlang/erlang/erts-5.6.5/bin/beam.smp] 2 erts_do_exit_process PC=0x004a9137, FP=0x41f5a1c0 [/rhel5pdi/cnewcom/Erlang/erlang/erts-5.6.5/bin/beam.smp] 3 process_main PC=0x00538b40, FP=0x41f5c0d0 [/rhel5pdi/cnewcom/Erlang/erlang/erts-5.6.5/bin/beam.smp] 4 exit_sched_thr PC=0x004a3082, FP=0x41f5c0f0 [/rhel5pdi/cnewcom/Erlang/erlang/erts-5.6.5/bin/beam.smp] 5 reinit_mutexes PC=0x005cafe9, FP=0x41f5c120 [/rhel5pdi/cnewcom/Erlang/erlang/erts-5.6.5/bin/beam.smp] (I haven't yet built the emulator with -g, so I don't have any more information than that, sorry) I suspect the problem occurs because my test code was calling erl_ddll:load_driver() from every process that ever needs to use the driver. (I know that's not optimum; this was only a test hack, not production code.) The problem seems to disappear if I switch to the non-SMP emulator (I can't rule it out, but it hasn't occured in a long test-run). The problem also seems to disappear if I use the 32-bit SMP emulator (however, in that case I'm running on a different OS and compiler (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47) My code looked like: 112 safe_json_to_term(JsonTextBin) -> 113 114 %% As ErlangFastJSON currently returns an untagged message and 115 %% does a non-selective receive, it can return entirely the wrong 116 %% response. So we need to use a temporary process for now. 117 118 CallerPid = self(), 119 120 WorkerPid = spawn_link( 121 fun() -> 122 123 eep0018:start_driver(code:priv_dir(fast_json)), 124 125 JsonTerm = eep0018:json_to_term(JsonTextBin), 126 127 CallerPid ! {self(), JsonTerm} 128 end), 129 130 JsonTerm = receive {WorkerPid, T} -> T end, 131 132 %% TODO: json_to_term does not currently return the 'left over' tail. 133 134 {ok, JsonTerm, []}. The erlang code in the driver looks like: json_to_term(Json) when is_binary(Json) -> % The null byte is important for bare literals. Without it % yajl will throw a fit because it doesn't think it's finished % parsing correctly. [] = erlang:port_control(drv_port(), 1, <>), receive Term -> Term end. start_driver(LibDir) -> case erl_ddll:load_driver(LibDir, "eep0018_drv") of ok -> ok; {error, already_loaded} -> ok; %ok = erl_ddll:reload_driver(LibDir, "eep0018_drv"); {error, Error} -> exit(erl_ddll:format_error(Error)) end. drv_port() -> case get(eep0018_drv_port) of undefined -> Port = open_port({spawn, "eep0018_drv"}, [binary]), put(eep0018_drv_port, Port), Port; Port -> Port end. Here's more details about the OS/compiler on which the problem occurs. % cat /etc/redhat-release Red Hat Enterprise Linux Client release 5.1 (Tikanga) % gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix gcc version 4.1.2 20070626 (Red Hat 4.1.2-14) Kernel: % uname -a Linux 2.6.18-53.1.14.el5 #1 SMP Tue Feb 19 07:18:46 EST 2008 x86_64 x86_64 x86_64 GNU/Linux -------------- next part -------------- An HTML attachment was scrubbed... URL: From saleyn@REDACTED Tue Apr 14 01:51:27 2009 From: saleyn@REDACTED (Serge Aleynikov) Date: Mon, 13 Apr 2009 19:51:27 -0400 Subject: [erlang-bugs] bug: R12B-4 global_group registration has a process leak causing occasional node restarts Message-ID: <49E3CFFF.6040303@gmail.com> It appears that R12B-4 has a faulty implementation of global_group management that results in a process leak eventually causing a node restart when the default process_limit is reached. I don't have R13-A installed, but since I haven't seen anything in kernel release notes indicating changes in the global_groups, I assume the same issue exists in the latest version. Attached is a patch fixing the issue. Here are the steps reproducing the problem: $ cat test.config [ {kernel, [{global_groups, [{marc, ['a@REDACTED', 'b@REDACTED']}]}]} ]. $ erl -sname a -config test.config (a@REDACTED)1> global:register_name(test, self()). yes $ erl -sname b -config test.config (b@REDACTED)1> length(processes()). 30 (b@REDACTED)2> global_group:whereis_name({group, marc}, test). <2334.40.0> (b@REDACTED)3> length(processes()). 34 (b@REDACTED)4> global_group:whereis_name({group, marc}, test). <2334.40.0> (b@REDACTED)5> length(processes()). 35 (b@REDACTED)6> global_group:whereis_name({group, marc}, test). <2334.40.0> (b@REDACTED)7> length(processes()). 36 After applying the patch the same test holds: $ erl -sname b -config test.config (b@REDACTED)1> length(processes()). 30 (b@REDACTED)2> global_group:whereis_name({group, marc}, test). <2334.40.0> (b@REDACTED)3> length(processes()). 33 (b@REDACTED)4> global_group:whereis_name({group, marc}, test). <2334.40.0> (b@REDACTED)5> length(processes()). 33 (b@REDACTED)6> global_group:whereis_name({group, marc}, test). <2334.40.0> (b@REDACTED)7> length(processes()). 33 Regards, Serge -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: global_group.erl.R12B-4.patch URL: From dgud@REDACTED Tue Apr 14 09:21:30 2009 From: dgud@REDACTED (Dan Gudmundsson) Date: Tue, 14 Apr 2009 09:21:30 +0200 Subject: [erlang-bugs] [erlang-patches] R13B snapshop 2009-04-11 patch for lib/wx/examples Re: R13A patch for lib/wx/examples In-Reply-To: <20090412072053.GB53553@k2r.org> References: <20090412053333.GA51822@k2r.org> <20090412072053.GB53553@k2r.org> Message-ID: <49E4397A.10108@erix.ericsson.se> Thanks, fixed. /Dan Kenji Rikitake wrote: > Sources under lib/wx/examples are broken on FreeBSD due to the Makefile > errors. A patch follows. // Kenji Rikitake > > R13B snapshot 2009-04-11 patch > to solve lib/wx/examples installation errors > on FreeBSD 7.1-RELEASE > by Kenji Rikitake 12-APR-2009 > > Symptom: > > R13B snapshot 2009-04-11 lib/wx/examples/xrc files causes installation > error on FreeBSD 7.1-RELEASE. This is caused by the Makefile code which > errorneously trying to install BEAM binaries and other files as OS > executables. > > Workaround: > > Using INSTALL_DATA instead of INSTALL_PROGRAM in the Makefiles solves > this issue. > > Apply the following patches: > > --- lib/wx/examples/xrc/Makefile.FCS 2009-04-07 23:37:42.000000000 +0900 > +++ lib/wx/examples/xrc/Makefile 2009-04-12 15:44:38.000000000 +0900 > @@ -60,11 +60,11 @@ > docs: > > release_spec: > $(INSTALL_DIR) $(EXRELSYSDIR) > $(INSTALL_DATA) $(TESTSRC) $(EXRELSYSDIR) > - $(INSTALL_PROGRAM) $(TESTTARGETS) $(EXRELSYSDIR) > + $(INSTALL_DATA) $(TESTTARGETS) $(EXRELSYSDIR) > $(INSTALL_DIR) $(EXRELSYSDIR)/rc > $(INSTALL_DATA) $(TESTRESOURCE) $(EXRELSYSDIR)/rc > > release_tests_spec: > > > > > > > In the message <20090412053333.GA51822@REDACTED> > dated Sun, Apr 12, 2009 at 02:33:09PM +0900, > Kenji Rikitake writes: >> Date: Sun, 12 Apr 2009 14:33:33 +0900 >> From: Kenji Rikitake >> Subject: R13A patch for lib/wx/examples >> To: olgeni@REDACTED >> Cc: Kenji Rikitake , erlang-bugs@REDACTED, >> erlang-patches@REDACTED >> >> This is a patch for compiling Erlang R13A on FreeBSD 7.1-RELEASE. >> Note that I apply all Giacomo's patches for Erlang R12B5 >> (available on FreeBSD port lang/erlang) BEFORE applying >> this patch. >> >> Kenji Rikitake >> >> R13A patch to solve lib/wx/examples installation errors >> on FreeBSD 7.1-RELEASE >> by Kenji Rikitake 12-APR-2009 >> >> Symptom: >> >> R13A lib/wx/examples files causes installation error on FreeBSD >> 7.1-RELEASE. This is caused by the Makefile code which errorneously >> trying to install BEAM binaries and other files as OS executables. >> >> Workaround: >> >> Using INSTALL_DATA instead of INSTALL_PROGRAM in the Makefiles solves >> this issue. >> >> Apply the following patches: >> >> --- ./lib/wx/examples/simple/Makefile.FCS 2009-03-13 00:04:24.000000000 +0900 >> +++ ./lib/wx/examples/simple/Makefile 2009-04-12 14:10:58.000000000 +0900 >> @@ -52,11 +52,11 @@ >> docs: >> >> release_spec: >> $(INSTALL_DIR) $(EXRELSYSDIR) >> $(INSTALL_DATA) $(TESTSRC) $(EXRELSYSDIR) >> - $(INSTALL_PROGRAM) copy.xpm sample.xpm $(TESTTARGETS) $(EXRELSYSDIR) >> + $(INSTALL_DATA) copy.xpm sample.xpm $(TESTTARGETS) $(EXRELSYSDIR) >> >> release_tests_spec: >> >> release_docs_spec: >> >> --- ./lib/wx/examples/sudoku/Makefile.FCS 2009-03-12 23:44:22.000000000 +0900 >> +++ ./lib/wx/examples/sudoku/Makefile 2009-04-12 14:11:32.000000000 +0900 >> @@ -52,11 +52,11 @@ >> docs: >> >> release_spec: >> $(INSTALL_DIR) $(EXRELSYSDIR) >> $(INSTALL_DATA) $(TESTSRC) sudoku.hrl $(EXRELSYSDIR) >> - $(INSTALL_PROGRAM) $(TESTTARGETS) $(EXRELSYSDIR) >> + $(INSTALL_DATA) $(TESTTARGETS) $(EXRELSYSDIR) >> >> release_tests_spec: >> >> release_docs_spec: >> > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://www.erlang.org/mailman/listinfo/erlang-patches > From raimo+erlang-bugs@REDACTED Tue Apr 14 12:31:05 2009 From: raimo+erlang-bugs@REDACTED (Raimo Niskanen) Date: Tue, 14 Apr 2009 12:31:05 +0200 Subject: [erlang-bugs] R13A patch for erts/emulator/drivers/common/inet_drv.c In-Reply-To: <20090412041245.GA29991@k2r.org> References: <20090412041245.GA29991@k2r.org> Message-ID: <20090414103105.GA13441@erix.ericsson.se> Thank you very much for the patch. Alas, (due to customer demands), we had a very short time between R13A and R13B, so you just missed the deadline, or rather Giacomo Olgeni's patch was too risky to take now. I want to remake his patch to a configure test for sctp_bindx in libc (without linking with libsctp) instead of a compile test for __FreeBSD__; I hate OS version tests, they always come back and bite you. But now we have a virtual FreeBSD 7.1 machine, so we will enable SCTP on its daily builds (and hence apply your patches) as soon as possible. Check out the snapshots. On Sun, Apr 12, 2009 at 01:12:45PM +0900, Kenji Rikitake wrote: > This is a patch for compiling Erlang R13A on FreeBSD 7.1-RELEASE. > Note that I apply all Giacomo's patches for Erlang R12B5 > (available on FreeBSD port lang/erlang) BEFORE applying > this patch. > > Kenji Rikitake > > R13A patch for solving a compilation error when building > erts/emulator/drivers/common/inet_drv.c > by Kenji Rikitake 12-APR-2009 > > Symptom: > > When building R13A in FreeBSD 7.1-RELEASE, > the compiler flag > HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY > is NOT enabled. > > Some code in > erts/emulator/drivers/common/inet_drv.c > incorrectly assumes > HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY > is always true when > HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_FLAGS > is true in config.h. > This assumption causes a compilation error. > > Workaround: apply the following patch. > > NOTE: this is a followup patch of Giacomo Olgeni's patch for FreeBSD at: > > http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/lang/erlang/files/patch-erts_emulator_drivers_common_inet__drv.c?rev=1.1;content-type=text%2Fplain > > so Giacomo's patch must be applied before this patch to compile. > > --- erts/emulator/drivers/common/inet_drv.c.FCS 2009-04-12 12:16:52.000000000 +0900 > +++ erts/emulator/drivers/common/inet_drv.c 2009-04-12 12:36:06.000000000 +0900 > @@ -5301,16 +5301,19 @@ > if (pmtud_enable && pmtud_disable) > return -1; > if (pmtud_enable) cflags |= SPP_PMTUD_ENABLE; > if (pmtud_disable) cflags |= SPP_PMTUD_DISABLE; > > +# ifdef HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY > + /* The followings are missing in FreeBSD 7.1 */ > sackdelay_enable =eflags& SCTP_FLAG_SACDELAY_ENABLE; > sackdelay_disable=eflags& SCTP_FLAG_SACDELAY_DISABLE; > if (sackdelay_enable && sackdelay_disable) > return -1; > if (sackdelay_enable) cflags |= SPP_SACKDELAY_ENABLE; > if (sackdelay_disable) cflags |= SPP_SACKDELAY_DISABLE; > +# endif > > arg.pap.spp_flags = cflags; > # endif > curr += 4; > > @@ -6207,17 +6210,19 @@ > if (ap.spp_flags & SPP_PMTUD_ENABLE) > { i = LOAD_ATOM (spec, i, am_pmtud_enable); n++; } > > if (ap.spp_flags & SPP_PMTUD_DISABLE) > { i = LOAD_ATOM (spec, i, am_pmtud_disable); n++; } > - > +# ifdef HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY > + /* SPP_SACKDELAY_* not in FreeBSD 7.1 */ > if (ap.spp_flags & SPP_SACKDELAY_ENABLE) > { i = LOAD_ATOM (spec, i, am_sackdelay_enable); n++; } > > if (ap.spp_flags & SPP_SACKDELAY_DISABLE) > { i = LOAD_ATOM (spec, i, am_sackdelay_disable); n++; } > # endif > +# endif > > PLACE_FOR(spec, i, > LOAD_NIL_CNT + LOAD_LIST_CNT + 2*LOAD_TUPLE_CNT); > > /* Close up the Flags list: */ > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://www.erlang.org/mailman/listinfo/erlang-bugs -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From egil@REDACTED Wed Apr 15 12:13:16 2009 From: egil@REDACTED (=?ISO-8859-1?Q?Bj=F6rn-Egil_Dahlberg?=) Date: Wed, 15 Apr 2009 12:13:16 +0200 Subject: [erlang-bugs] [erlang-patches] R13A patches for os_mon on dragonfly In-Reply-To: <20090412071246.GA53449@k2r.org> References: <20090405134412.5f4201a6@horse.intern> <49D9FB20.4050703@erix.ericsson.se> <20090412071246.GA53449@k2r.org> Message-ID: <49E5B33C.8040506@erix.ericsson.se> Hi, The patch was applied by hand and a typo was introduced. Never do something yourself that a machine can do better ... The corrected version is now in r13b. // Bj?rn-Egil Erlang/OTP Kenji Rikitake wrote: > Dear Bjorn and the list members: > > R13B as of 2009-04-11 is broken for FreeBSD 7.1-RELEASE. > Please fix it as proposed. > > Kenji Rikitake > > R13B snapshot of 2009-04-11 > has broken lib/os_mon/c_src/memsup.c > for FreeBSD 7.1-RELEASE > by Kenji Rikitake 12-APR-2009 > > Symptom: compilation error on lib/os_mon/c_src/memsup.c > > Possible reason: > > memsup.c was mangled between R13A and R13B, while trying to > patch according to the "patch-aa" file in the following patch set > for DragonFly BSD: > > http://erlang.org/pipermail/erlang-patches/2009-April/000395.html > > Workaround: > > Apply the patch "patch-aa" in the above article AS IS, as follows. > > --- lib/os_mon/c_src/memsup.c.FCS 2009-04-08 18:57:44.000000000 +0900 > +++ lib/os_mon/c_src/memsup.c 2009-04-12 15:50:34.000000000 +0900 > @@ -114,11 +114,11 @@ > #include > #include > #if !defined (__OpenBSD__) && !defined (__NetBSD__) > #include > #endif > -#if defined (__FreeBSD__) && defined(__DragonFly__) > +#if defined (__FreeBSD__) || defined(__DragonFly__) > #include > #endif > #endif > > #if defined (__linux__) From sysop@REDACTED Wed Apr 15 08:29:32 2009 From: sysop@REDACTED (Matt Stancliff) Date: Tue, 14 Apr 2009 23:29:32 -0700 Subject: [erlang-bugs] ei_reg_getpval can't return pointers? Message-ID: <69498163-49E7-4DD3-A634-B446A9B04CEA@mindspring.com> OTP Bug-Fixing Guys, In R12B-5 and R13A lib/erl_interface/src/registry/reg_getp.c looks like it needs to have EI_BIN instead of EI_STR in the validation check. I am unable to make ei_reg_getpval return non-null, but I can manually get my stored object from ei_hash_lookup then take its val.p. -Matt -- Matt Stancliff San Jose, CA AIM: seijimr iPhone: 678-591-9337 "The best way to predict the future is to invent it." --Alan Kay From ext@REDACTED Thu Apr 16 14:40:35 2009 From: ext@REDACTED (David Sveningsson) Date: Thu, 16 Apr 2009 14:40:35 +0200 Subject: [erlang-bugs] R13A Internal compiler error when using a record in a guard within a try/catch block Message-ID: <49E72743.3090501@sidvind.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, when compiling the attached code with R13A erlc the compiler crashes with the following error: Function: do_stuff/1 temp/test.erl:none: internal error in v3_codegen; crash reason: {{case_clause, {'EXIT', {function_clause, [{v3_codegen,longest,[[{ker0}],[]]}, {v3_codegen,longest,2}, {v3_codegen,sr_merge,2}, {v3_codegen,match_cg,5}, {v3_codegen,guard_match_cg,6}, {v3_codegen,guard_cg,5}, {v3_codegen,'-guard_cg_list/6-anonymous-0-',4}, {v3_codegen,flatmapfoldl,3}]}}}, [{compile,'-select_passes/2-anonymous-2-',2}, {compile,'-internal_comp/4-anonymous-1-',2}, {compile,fold_comp,3}, {compile,internal_comp,4}, {compile,internal,3}]} There are many ways to workaround this: * Removing the try/catch block. * Putting the case block in a separate functions. * Assigning Foo#foo.bar to a local variable and use in guard instead. Either way, the compiler shouldn't crash. It is possible that this issue is already fixed as I've read some similar reports related to try/catch. - -module(test). - -export([start/0]). - -record(foo, { bar = false :: bool() }). start() -> do_stuff(#foo{bar=true}). do_stuff(Foo) -> try case fred:barney() of _ when Foo#foo.bar =:= true -> a; _ when Foo#foo.bar =:= false -> b end catch _ -> error end. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknnJ0MACgkQ6pa1H/H5pqV4ogCfWAhJ+I+ogKcRpk6XxCSzRc0r iRUAn39B2HxuQlkDIUWv15crYJf/20LS =PJ+9 -----END PGP SIGNATURE----- From bgustavsson@REDACTED Thu Apr 16 16:58:25 2009 From: bgustavsson@REDACTED (Bjorn Gustavsson) Date: Thu, 16 Apr 2009 16:58:25 +0200 Subject: [erlang-bugs] R13A Internal compiler error when using a record in a guard within a try/catch block In-Reply-To: <49E72743.3090501@sidvind.com> References: <49E72743.3090501@sidvind.com> Message-ID: <6672d0160904160758k5064035bo6f3a71ded3f62c8e@mail.gmail.com> On Thu, Apr 16, 2009 at 2:40 PM, David Sveningsson wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, when compiling the attached code with R13A erlc the compiler crashes > with the following error: > > Function: do_stuff/1 > temp/test.erl:none: internal error in v3_codegen; > crash reason: {{case_clause, > {'EXIT', > {function_clause, > [{v3_codegen,longest,[[{ker0}],[]]}, > {v3_codegen,longest,2}, > {v3_codegen,sr_merge,2}, > {v3_codegen,match_cg,5}, > {v3_codegen,guard_match_cg,6}, > {v3_codegen,guard_cg,5}, > {v3_codegen,'-guard_cg_list/6-anonymous-0-',4}, > {v3_codegen,flatmapfoldl,3}]}}}, > [{compile,'-select_passes/2-anonymous-2-',2}, > {compile,'-internal_comp/4-anonymous-1-',2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}, > {compile,internal,3}]} > > There are many ways to workaround this: > > * Removing the try/catch block. > * Putting the case block in a separate functions. > * Assigning Foo#foo.bar to a local variable and use in guard instead. > > Either way, the compiler shouldn't crash. It is possible that this issue > is already fixed as I've read some similar reports related to try/catch. Yes, it shouldn't crash, and, yes, it has already been fixed. The correction will be included in the R13B release. /Bj?rn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ext@REDACTED Thu Apr 16 17:06:09 2009 From: ext@REDACTED (David Sveningsson) Date: Thu, 16 Apr 2009 17:06:09 +0200 Subject: [erlang-bugs] R13A Internal compiler error when using a record in a guard within a try/catch block In-Reply-To: <6672d0160904160758k5064035bo6f3a71ded3f62c8e@mail.gmail.com> References: <49E72743.3090501@sidvind.com> <6672d0160904160758k5064035bo6f3a71ded3f62c8e@mail.gmail.com> Message-ID: <49E74961.2090306@sidvind.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bjorn Gustavsson wrote: > On Thu, Apr 16, 2009 at 2:40 PM, David Sveningsson wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Hi, when compiling the attached code with R13A erlc the compiler crashes >> with the following error: >> >> Function: do_stuff/1 >> temp/test.erl:none: internal error in v3_codegen; >> crash reason: {{case_clause, >> {'EXIT', >> {function_clause, >> [{v3_codegen,longest,[[{ker0}],[]]}, >> {v3_codegen,longest,2}, >> {v3_codegen,sr_merge,2}, >> {v3_codegen,match_cg,5}, >> {v3_codegen,guard_match_cg,6}, >> {v3_codegen,guard_cg,5}, >> {v3_codegen,'-guard_cg_list/6-anonymous-0-',4}, >> {v3_codegen,flatmapfoldl,3}]}}}, >> [{compile,'-select_passes/2-anonymous-2-',2}, >> {compile,'-internal_comp/4-anonymous-1-',2}, >> {compile,fold_comp,3}, >> {compile,internal_comp,4}, >> {compile,internal,3}]} >> >> There are many ways to workaround this: >> >> * Removing the try/catch block. >> * Putting the case block in a separate functions. >> * Assigning Foo#foo.bar to a local variable and use in guard instead. >> >> Either way, the compiler shouldn't crash. It is possible that this issue >> is already fixed as I've read some similar reports related to try/catch. > > Yes, it shouldn't crash, and, yes, it has already been fixed. The correction > will be included in the R13B release. > > /Bj?rn > Ok, thanks! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknnSQAACgkQ6pa1H/H5pqVt4gCgnEfuEXzYeLQcZSQwFe96qZOa ZBgAn3GGvzK39xMzi2b7WNSRpD0TAlTh =MCnj -----END PGP SIGNATURE----- From masse@REDACTED Fri Apr 17 10:30:53 2009 From: masse@REDACTED (mats cronqvist) Date: Fri, 17 Apr 2009 10:30:53 +0200 Subject: [erlang-bugs] Question about http client Message-ID: <87k55jy94y.fsf@sterlett.hq.kred> mtalyans writes: > Hi All, > > I am a rank beginner, so please bear with me: > > I am fetching Web content from a set of URLs using http:request. For > most of URLs everything works fine; however for some of them I see > error reports on the console that look like so: ... tons of crap... > ** Reason for termination == > ** session_remotly_closed > > As far as I can tell, session has been remotely closed. that is indeed what's happening. > I don?t mind a failure like this, but I would like to get rid of > the error reports, as I am fetching many, many URLs. it is a bizarre design decision to print an error report for a perfectly normal event. there has been some complaining about this on erlang-bugs (by me among others) to no avail. The only sane solution (turning off sasl is insane) I've been able to come up with is to patch; IIRC you have to replace the atom 'session_remotly_closed' with 'shutdown' in a few lines like this; httpc_handler.erl: {stop, session_remotly_closed, State}; > In other cases, I get content properly fetched, and then get an error report > with a timeout: > > <0.49.0> spawned pid <0.50.0> > <0.50.0>: normal clause "Normal completion" > > =ERROR REPORT==== 15-Apr-2009::13:35:05 === > ** Generic server <0.51.0> terminating > ** Last message in was {timeout,#Ref<0.0.0.67>} > ** When Server state == {state,undefined, > {tcp_session, > {{"links.preplogic.com",80},<0.51.0>}, > false,http,#Port<0.1570>,1,keep_alive}, > undefined,undefined,undefined,undefined, > {[],[]}, > {[],[]}, > keep_alive,[],nolimit,nolimit, > {options, > {undefined,[]}, > 0,2,5,120000,2,disabled,enabled,false}, > {timers,[],#Ref<0.0.0.78>}, > httpc_manager,undefined} > ** Reason for termination == > ** {{badrecord,request}, > [{httpc_handler,handle_info,2}, > {gen_server,handle_msg,5}, > {proc_lib,init_p_do_apply,3}]} > > Could someone in the know help me to solve this issue? this looks like a "real" bug. handle_info/2 expects a to be handed a record, but it gets an atom, namely 'request'. This will happens if you type 'request' instead of 'Request' at the right place... I'll CC this to erlang-bugs, in case the OTP guys miss it. mats From davidepesa@REDACTED Fri Apr 17 23:34:49 2009 From: davidepesa@REDACTED (Davide Pesavento) Date: Fri, 17 Apr 2009 23:34:49 +0200 Subject: [erlang-bugs] Build system ignores LDFLAGS In-Reply-To: <2da21fe50904040405p5a1daae7ja6a0ac8868de406f@mail.gmail.com> References: <2da21fe50903311313h11e175dfwee2a6b742deacc2d@mail.gmail.com> <2da21fe50904040405p5a1daae7ja6a0ac8868de406f@mail.gmail.com> Message-ID: <2da21fe50904171434o51133324vc667cc4e966063b2@mail.gmail.com> On Sat, Apr 4, 2009 at 13:05, Davide Pesavento wrote: > On Tue, Mar 31, 2009 at 22:13, Davide Pesavento wrote: >> Hello, >> >> Erlang's build system seems to ignore custom LDFLAGS. This is the QA >> warning shown by Portage (Gentoo Linux's package manager) after >> building R12B-5 with LDFLAGS="-Wl,-O1 -Wl,--as-needed >> -Wl,--hash-style=gnu" >> >> QA Notice: Files built without respecting LDFLAGS have been detected >> ?Please include the following list of files in your report: >> /usr/lib64/erlang/lib/runtime_tools-1.7.3/priv/lib/trace_file_drv.so >> /usr/lib64/erlang/lib/runtime_tools-1.7.3/priv/lib/trace_ip_drv.so >> /usr/lib64/erlang/lib/megaco-3.9.1.1/priv/lib/megaco_flex_scanner_drv_mt.so >> /usr/lib64/erlang/lib/megaco-3.9.1.1/priv/lib/megaco_flex_scanner_drv.so >> /usr/lib64/erlang/lib/erl_interface-3.5.9/bin/erl_call >> /usr/lib64/erlang/lib/ssl-3.10/priv/bin/ssl_esock >> /usr/lib64/erlang/lib/asn1-1.6.2/priv/lib/asn1_erl_drv.so >> /usr/lib64/erlang/lib/crypto-1.5.3/priv/lib/crypto_drv.so >> /usr/lib64/erlang/lib/common_test-1.3.4/priv/lib/erl_rx_driver.so >> /usr/lib64/erlang/erts-5.6.5/bin/child_setup >> >> Before digging into the Makefiles, I'd like to know if you already >> have some ideas about the root cause of this issue. >> > > This bug is still present in R13A. > > ?* QA Notice: Files built without respecting LDFLAGS have been detected > ?* ?Please include the following list of files in your report: > ?* /usr/lib64/erlang/lib/runtime_tools-1.8/priv/lib/trace_file_drv.so > ?* /usr/lib64/erlang/lib/runtime_tools-1.8/priv/lib/trace_ip_drv.so > ?* /usr/lib64/erlang/lib/erl_interface-3.6/bin/erl_call > ?* /usr/lib64/erlang/lib/crypto-1.6/priv/lib/crypto_drv.so > ?* /usr/lib64/erlang/lib/megaco-3.10.0.1/priv/lib/megaco_flex_scanner_drv_mt.so > ?* /usr/lib64/erlang/lib/megaco-3.10.0.1/priv/lib/megaco_flex_scanner_drv.so > ?* /usr/lib64/erlang/lib/ssl-3.10.1/priv/bin/ssl_esock > ?* /usr/lib64/erlang/lib/asn1-1.6.8/priv/lib/asn1_erl_drv.so > ?* /usr/lib64/erlang/erts-5.7/bin/child_setup > > Best regards, > Davide > The attached patch fixes the problem for me: LDFLAGS are now respected. Regards, Davide -------------- next part -------------- A non-text attachment was scrubbed... Name: erlang-R13A-LDFLAGS.patch Type: application/octet-stream Size: 4225 bytes Desc: not available URL: From raimo+erlang-bugs@REDACTED Mon Apr 20 14:30:34 2009 From: raimo+erlang-bugs@REDACTED (Raimo Niskanen) Date: Mon, 20 Apr 2009 14:30:34 +0200 Subject: [erlang-bugs] : Build system ignores LDFLAGS In-Reply-To: <2da21fe50904171434o51133324vc667cc4e966063b2@mail.gmail.com> References: <2da21fe50903311313h11e175dfwee2a6b742deacc2d@mail.gmail.com> <2da21fe50904040405p5a1daae7ja6a0ac8868de406f@mail.gmail.com> <2da21fe50904171434o51133324vc667cc4e966063b2@mail.gmail.com> Message-ID: <20090420123034.GA8817@erix.ericsson.se> On Fri, Apr 17, 2009 at 11:34:49PM +0200, Davide Pesavento wrote: > On Sat, Apr 4, 2009 at 13:05, Davide Pesavento wrote: > > On Tue, Mar 31, 2009 at 22:13, Davide Pesavento wrote: > >> Hello, > >> > >> Erlang's build system seems to ignore custom LDFLAGS. This is the QA > >> warning shown by Portage (Gentoo Linux's package manager) after > >> building R12B-5 with LDFLAGS="-Wl,-O1 -Wl,--as-needed > >> -Wl,--hash-style=gnu" > >> > >> QA Notice: Files built without respecting LDFLAGS have been detected > >> ?Please include the following list of files in your report: > >> /usr/lib64/erlang/lib/runtime_tools-1.7.3/priv/lib/trace_file_drv.so > >> /usr/lib64/erlang/lib/runtime_tools-1.7.3/priv/lib/trace_ip_drv.so > >> /usr/lib64/erlang/lib/megaco-3.9.1.1/priv/lib/megaco_flex_scanner_drv_mt.so > >> /usr/lib64/erlang/lib/megaco-3.9.1.1/priv/lib/megaco_flex_scanner_drv.so > >> /usr/lib64/erlang/lib/erl_interface-3.5.9/bin/erl_call > >> /usr/lib64/erlang/lib/ssl-3.10/priv/bin/ssl_esock > >> /usr/lib64/erlang/lib/asn1-1.6.2/priv/lib/asn1_erl_drv.so > >> /usr/lib64/erlang/lib/crypto-1.5.3/priv/lib/crypto_drv.so > >> /usr/lib64/erlang/lib/common_test-1.3.4/priv/lib/erl_rx_driver.so > >> /usr/lib64/erlang/erts-5.6.5/bin/child_setup > >> > >> Before digging into the Makefiles, I'd like to know if you already > >> have some ideas about the root cause of this issue. > >> > > > > This bug is still present in R13A. > > > > ?* QA Notice: Files built without respecting LDFLAGS have been detected > > ?* ?Please include the following list of files in your report: > > ?* /usr/lib64/erlang/lib/runtime_tools-1.8/priv/lib/trace_file_drv.so > > ?* /usr/lib64/erlang/lib/runtime_tools-1.8/priv/lib/trace_ip_drv.so > > ?* /usr/lib64/erlang/lib/erl_interface-3.6/bin/erl_call > > ?* /usr/lib64/erlang/lib/crypto-1.6/priv/lib/crypto_drv.so > > ?* /usr/lib64/erlang/lib/megaco-3.10.0.1/priv/lib/megaco_flex_scanner_drv_mt.so > > ?* /usr/lib64/erlang/lib/megaco-3.10.0.1/priv/lib/megaco_flex_scanner_drv.so > > ?* /usr/lib64/erlang/lib/ssl-3.10.1/priv/bin/ssl_esock > > ?* /usr/lib64/erlang/lib/asn1-1.6.8/priv/lib/asn1_erl_drv.so > > ?* /usr/lib64/erlang/erts-5.7/bin/child_setup > > > > Best regards, > > Davide > > > > The attached patch fixes the problem for me: LDFLAGS are now respected. > > Regards, > Davide The patch looks great! It is unfortunately a few days late to make it into R13B. Now the source tree is labeled, and cut in stone. We have applied it, and it will be in the first patch release. We will also release it as a source code patch immediately after the R13B release. More patches like that! (and earlier)-: > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://www.erlang.org/mailman/listinfo/erlang-bugs -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bengt.kleberg@REDACTED Tue Apr 21 15:23:50 2009 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 21 Apr 2009 15:23:50 +0200 Subject: [erlang-bugs] manual error, snmpa, value_type() for 'IpAddress' Message-ID: <1240320230.1919.24.camel@seasc1137.dyn.rnd.as.sw.ericsson.se> Greetings, When I read the snmpm manual page (http://erlang.org/doc/man/snmpm.html) it says that the value_type() for 'IpAddress' is 'ip'. When I tested this in my code it did not work. Instead 'ia' seems to work. Please consider adding ip to the code. IMHO that is better than changing the manual to 'ia' bengt From nem@REDACTED Thu Apr 23 23:47:56 2009 From: nem@REDACTED (Geoff Cant) Date: Thu, 23 Apr 2009 23:47:56 +0200 Subject: [erlang-bugs] R13B TTY bug on mac os x Message-ID: Hi all, I've just realised that when I start erl on Mac OS X (10.5) I get erlang's oldshell instead of the regular shell. The behaviour was correct (user_drv, not user) in R12B5 and seems to be broken in R13A and R13B. When running user_drv:start() in R12B5 I get: 2> user_drv:start(). <0.35.0> 3> =ERROR REPORT==== 23-Apr-2009::23:41:26 === Error in process <0.35.0> with exit value: {badarg,[{erlang,register,[user,<0.37.0>]},{user,start_port,1}]} =ERROR REPORT==== 23-Apr-2009::23:41:26 === driver_select(0x000001a9, 0, DO_READ, 1) by fd (0/1) driver #Port<0.425> stealing control of fd=0 from input driver tty_sl (tty_sl -c -e) #Port<0.233> On R13B I get: 1> user_drv:start(). <0.34.0> 2> =ERROR REPORT==== 23-Apr-2009::23:21:54 === Error in process <0.34.0> with exit value: {badarg,[{erlang,register,[user,<0.35.0>]},{user,start,0}]} 2> =ERROR REPORT==== 23-Apr-2009::23:21:54 === driver_select(0x000001b1, 0, ERL_DRV_READ ERL_DRV_USE, 1) by fd (0/1) driver #Port<0.433> stealing control of fd=0 from input driver fd (0/1) #Port<0.252> In the R13B version I can see that the fd driver is stealing from the fd driver, while in R12B5 the fd driver is stealing from the input driver, which suggests to me that the tty_sl driver isn't functioning correctly in R13B. How do I go about debugging this? Can I spawn the tty_sl driver manually to check to see if it's working? Cheers, -- Geoff Cant From bgustavsson@REDACTED Fri Apr 24 11:09:14 2009 From: bgustavsson@REDACTED (Bjorn Gustavsson) Date: Fri, 24 Apr 2009 11:09:14 +0200 Subject: [erlang-bugs] R13B TTY bug on mac os x In-Reply-To: References: Message-ID: <6672d0160904240209u5d49b47g22ac0f4a18c4fde2@mail.gmail.com> On Thu, Apr 23, 2009 at 11:47 PM, Geoff Cant wrote: > > Hi all, I've just realised that when I start erl on Mac OS X (10.5) I > get erlang's oldshell instead of the regular shell. Works fine for me, on two different Macs. > > How do I go about debugging this? Can I spawn the tty_sl driver manually > to check to see if it's working? I would check how the emulator was built first. The ttsl_drv.c file has an #ifdef testing on HAVE_TERMCAP. If HAVE_TERMCAP is undefined, the ttsl driver will fail when opened and the old shell will be used. So I would check that HAVE_TERMCAP is defined in config.h (generated by ./congfigure). If not defined there, I would check the logs from configure or re-run configure to see where it went wrong. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From nem@REDACTED Fri Apr 24 15:37:02 2009 From: nem@REDACTED (Geoff Cant) Date: Fri, 24 Apr 2009 15:37:02 +0200 Subject: [erlang-bugs] R13B TTY bug on mac os x In-Reply-To: <6672d0160904240209u5d49b47g22ac0f4a18c4fde2@mail.gmail.com> (Bjorn Gustavsson's message of "Fri, 24 Apr 2009 11:09:14 +0200") References: <6672d0160904240209u5d49b47g22ac0f4a18c4fde2@mail.gmail.com> Message-ID: Bjorn Gustavsson writes: > On Thu, Apr 23, 2009 at 11:47 PM, Geoff Cant wrote: >> >> Hi all, I've just realised that when I start erl on Mac OS X (10.5) I >> get erlang's oldshell instead of the regular shell. > > Works fine for me, on two different Macs. >> >> How do I go about debugging this? Can I spawn the tty_sl driver manually >> to check to see if it's working? > > I would check how the emulator was built first. The ttsl_drv.c file > has an #ifdef > testing on HAVE_TERMCAP. If HAVE_TERMCAP is undefined, the ttsl driver > will fail when opened and the old shell will be used. So I would check that > HAVE_TERMCAP is defined in config.h (generated by ./congfigure). If not > defined there, I would check the logs from configure or re-run configure to > see where it went wrong. False alarm. Apparently I managed to break my ncurses installation which stopped the ttsl_drv from loading properly. It all works fine now. Thanks very much for the pointer, -- Geoff Cant From kruber@REDACTED Fri Apr 24 16:21:15 2009 From: kruber@REDACTED (Nico Kruber) Date: Fri, 24 Apr 2009 16:21:15 +0200 Subject: [erlang-bugs] Possible buffer overflow on x86_64 Message-ID: <200904241621.26029.kruber@zib.de> Compiling an rpm, the system complained about possible buffer overflows as well as non-void functions with no return statement -> you'll find a patch for those attached to this email Nico Kruber -------------- next part -------------- A non-text attachment was scrubbed... Name: otp-R13B-fortify.patch Type: text/x-patch Size: 1494 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From kenji.rikitake@REDACTED Mon Apr 27 02:04:24 2009 From: kenji.rikitake@REDACTED (Kenji Rikitake) Date: Mon, 27 Apr 2009 09:04:24 +0900 Subject: [erlang-bugs] R13B *private* port for FreeBSD with necessary patches In-Reply-To: <20090412072053.GB53553@k2r.org> References: <20090412053333.GA51822@k2r.org> <20090412072053.GB53553@k2r.org> Message-ID: <20090427000424.GA13162@k2r.org> I've compiled a *private* (= unofficial) R13B port for FreeBSD with necessary patches (mostly from Giacomo Olgeni) and one from me (about SCTP). This port is now under testing on FreeBSD 7.1-RELEASE. It is still preliminary so your feedback is welcome. I hope Giacomo will release the official one soon. The tar archive URL is at http://www.ne.jp/asahi/bdx/info/software/erlang-port-R13B-20090427-0.tar.gz Regards, Kenji Rikitake From egil@REDACTED Mon Apr 27 16:18:38 2009 From: egil@REDACTED (=?ISO-8859-1?Q?Bj=F6rn-Egil_Dahlberg?=) Date: Mon, 27 Apr 2009 16:18:38 +0200 Subject: [erlang-bugs] Possible buffer overflow on x86_64 In-Reply-To: <200904241621.26029.kruber@zib.de> References: <200904241621.26029.kruber@zib.de> Message-ID: <49F5BEBE.6060009@erix.ericsson.se> Thank you for reporting this. Your patch, or some variant if it, will be included our next release. // Bj?rn-Egil Erlang/OTP Nico Kruber wrote: > Compiling an rpm, the system complained about possible buffer overflows as > well as non-void functions with no return statement > -> you'll find a patch for those attached to this email > > Nico Kruber > > > ------------------------------------------------------------------------ > > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://www.erlang.org/mailman/listinfo/erlang-bugs From vincent.dephily@REDACTED Mon Apr 27 20:29:00 2009 From: vincent.dephily@REDACTED (Vincent de Phily) Date: Mon, 27 Apr 2009 20:29:00 +0200 Subject: [erlang-bugs] R13B compiler regression ? Message-ID: <200904272029.01409.vincent.dephily@mobile-devices.fr> Hi there, I have the following compiler error : $ erlc test/aaaa_compileerror.erl Function -add_clients/1-fun-0-/2 refers to undefined label 9 test/aaaa_compileerror.erl:none: internal error in beam_peep; crash reason: {{case_clause,{'EXIT',{undefined_label,9}}}, [{compile,'-select_passes/2-anonymous-2-',2}, {compile,'-internal_comp/4-anonymous-1-',2}, {compile,fold_comp,3}, {compile,internal_comp,4}, {compile,internal,3}]} when compiling this : -module(aaaa_compileerror). -export([add_clients/1]). add_clients(Count) -> Timeout = 42, lists:foldl(fun(_, N) -> %receive after Timeout -> ok end, case N of 1 -> ok; %2 -> receive after Timeout -> ok end; %_ -> Timeout _ -> receive after Timeout -> ok end %_ -> ko end, N - 1 end, Count, [1,2,3]). This is narrowed-down code from something that compiles fine in R12B-5. Playing around with the example, seemingly innocuous changes make the error disappear. Pity to find this now, I should have tested R13A :/ -- Vincent de Phily From bgustavsson@REDACTED Tue Apr 28 14:40:52 2009 From: bgustavsson@REDACTED (Bjorn Gustavsson) Date: Tue, 28 Apr 2009 14:40:52 +0200 Subject: [erlang-bugs] R13B compiler regression ? In-Reply-To: <200904272029.01409.vincent.dephily@mobile-devices.fr> References: <200904272029.01409.vincent.dephily@mobile-devices.fr> Message-ID: <6672d0160904280540m65b1cd41r39228016d71c3608@mail.gmail.com> On Mon, Apr 27, 2009 at 8:29 PM, Vincent de Phily wrote: > Hi there, > > I have the following compiler error : > > [...] Thanks for the bug report. I have found and fixed the bug. The correction will be included in R13B01. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From peter@REDACTED Tue Apr 28 23:40:17 2009 From: peter@REDACTED (Peter Sabaini) Date: Tue, 28 Apr 2009 23:40:17 +0200 Subject: [erlang-bugs] regexp deprecation warning in http_client.erl Message-ID: <1240954817.5509.47.camel@gram.local> Hello, I'm not really sure what the patch submission procedure for Erlang is, but here's a hopefully useful small patch to fix the "regexp" deprecation warning in lib/inets/src/http_client/http_uri.erl peter. -------------- next part -------------- A non-text attachment was scrubbed... Name: http_uri.erl.patch Type: text/x-patch Size: 1627 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: From mrwizard82d1@REDACTED Thu Apr 30 01:43:21 2009 From: mrwizard82d1@REDACTED (Larry Jones) Date: Wed, 29 Apr 2009 18:43:21 -0500 (GMT-05:00) Subject: [erlang-bugs] Eunit Possibly Failing Under Windows Message-ID: <8675878.1241048601863.JavaMail.root@elwamui-huard.atl.sa.earthlink.net> When I try to run eunit tests on Windows (XP SP2) using erlang 5.7.1, I keep receiving the following error: $ erl -noshell -s eunit test reverse_test -s init stop reverse_test: reverse_test (module 'reverse_test')...*skipped* undefined *unexpected termination of test process* ::{badarg,[{io,put_chars,[<0.32.0>,unicode,<<>>]}, {eunit_proc,handle_test,2}, {eunit_proc,tests_inorder,3}, {eunit_proc,with_timeout,3}, {eunit_proc,run_group,2}, {eunit_proc,child_process,2}]} ======================================================= Failed: 0. Skipped: 0. Passed: 0. One or more tests were cancelled. I've attached the file the produces this error. I think I'm doing everything correctly - but I've been known to fail before :) -------------- next part -------------- A non-text attachment was scrubbed... Name: reverse_test.erl Type: application/octet-stream Size: 111 bytes Desc: not available URL: From bgustavsson@REDACTED Thu Apr 30 15:34:26 2009 From: bgustavsson@REDACTED (Bjorn Gustavsson) Date: Thu, 30 Apr 2009 15:34:26 +0200 Subject: [erlang-bugs] Eunit Possibly Failing Under Windows In-Reply-To: <8675878.1241048601863.JavaMail.root@elwamui-huard.atl.sa.earthlink.net> References: <8675878.1241048601863.JavaMail.root@elwamui-huard.atl.sa.earthlink.net> Message-ID: <6672d0160904300634r6348f8b3h77926c2f5b20ca51@mail.gmail.com> On Thu, Apr 30, 2009 at 1:43 AM, Larry Jones wrote: > When I try to run eunit tests on Windows (XP SP2) using erlang 5.7.1, I keep receiving the following error: > $ erl -noshell -s eunit test reverse_test -s init stop > reverse_test: reverse_test (module 'reverse_test')...*skipped* > undefined > *unexpected termination of test process* > ::{badarg,[{io,put_chars,[<0.32.0>,unicode,<<>>]}, > {eunit_proc,handle_test,2}, > {eunit_proc,tests_inorder,3}, > {eunit_proc,with_timeout,3}, > {eunit_proc,run_group,2}, > {eunit_proc,child_process,2}]} > It is a known problem. We have now posted a correction of the eunit application at http://www.erlang.org/download/patches/eunit-2.1.1.tar.gz You need to manually unpack and install the application in "lib" directory of the Erlang/OTP installation (alternatively, use "erl -pa /path/to/eunit-2.1.1/ebin"). Sorry for the inconvenience. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB