[erlang-questions] Source patch for R12B-0 not working on Netra T2000 with SMP enabled (64-bit)

Valentin Micic valentin@REDACTED
Mon Dec 17 10:04:33 CET 2007


Hi,

I know this is a bad time of the year, however, can we get some kind of 
conclusion and/or resolution for this particular problem?

Regards,

Valentin.

----- Original Message ----- 
From: "Rickard Green" <rickard.s.green@REDACTED>
To: "Ognian Pantov [ MTN - Innovation Centre ]" <Pantov_O@REDACTED>
Cc: "Valentin Micic" <valentin@REDACTED>; "Kenneth Lundin" 
<kenneth.lundin@REDACTED>; "Sean Hinde" <sean.hinde@REDACTED>; "Erlang/OTP 
discussions" <erlang-questions@REDACTED>; <waynes@REDACTED>
Sent: Friday, December 14, 2007 5:51 PM
Subject: Re: [erlang-questions] Source patch for R12B-0 available


> 'kill -ABRT' the emulator when you are sure the emulator hangs (i.e. 0% 
> cpu utilization after quite a while). Make the following available for 
> download:
> * A complete build log including the environment (use 'script' to capture 
> printouts and type 'env' to print the environment).
> * The whole source tree you've built in and the core generated (pack with 
> gnu tar).
>
> I'll have a look at it, and try to figure out what is going on.
>
> By the way: Have anyone else tried to build R12B-0 with the patch on 
> solaris 10 sparc64? If so, did it fail or succeed?
>
> BR,
> Rickard Green, Erlang/OTP, Ericsson AB.
>
> Ognian Pantov [ MTN - Innovation Centre ] wrote:
>> Hi,
>>
>> I manage to build R12B-0 Erlang 64 bit with the patch on T2000 without 
>> SMP support: env CC=/tmp/gcc64 
>> ./configure --disable-smp-support --prefix=/usr/local/erlang/R12B-0
>>
>> We can build R12B-0 on the same machine with the same OS using the same 
>> procedure:
>> - 64 bit with SMP support, no patch
>> - 64 bit with patch, NO SMP
>>
>> We can't build 64 bit with SMP support with the patch.
>>
>> It seems that the patch and SMP don't work together on Netra T2000.
>>
>> Best regards
>> Ognian
>>
>> -----Original Message-----
>> From: Rickard Green [mailto:rickard.s.green@REDACTED]
>> Sent: Thursday, 13 December 2007 05:42
>> To: Ognian Pantov [ MTN - Innovation Centre ]
>> Cc: Valentin Micic; Kenneth Lundin; Sean Hinde; Erlang/OTP discussions;
>> waynes@REDACTED
>> Subject: Re: [erlang-questions] Source patch for R12B-0 available
>>
>>
>>
>> $ uname -a
>> SunOS xxx 5.10 Generic_125100-10 sun4u sparc SUNW,Ultra-5_10
>>
>> BR,
>> Rickard Green, Erlang/OTP, Ericsson AB.
>>
>> Ognian Pantov [ MTN - Innovation Centre ] wrote:
>>> Hi,
>>>
>>> We can build R12B-0 without the patch on Netra T2000 (SMP) and Netra 440 
>>> (No SMP) using Sun tar or GNU tar, with or without -64 flag passed to 
>>> ld. There is no other Erlang on the box.
>>>
>>> We can't build R12B-0 with the patch on Netra T2000 and Netra 440 using 
>>> Sun tar or GNU tar, with or without -64 flag passed to ld. There is no 
>>> other Erlang on the box.
>>>
>>> What is the hardware you are using to build Solaris 10?
>>>
>>> If do env CC=/tmp/gcc64 
>>> ./configure --enable-smp-support --prefix=/usr/local/erlang/R11-1 on 
>>> Netra 440 using R11B-1 we got:
>>>
>>> checking whether an emulator with smp support should be built... yes; 
>>> enabled by user configure: error: cannot build smp enabled emulator 
>>> since hardware platform (ultrasparc wordsize=8) is not supp
>>> orted
>>> configure: error: 
>>> /export/home/smscproj/install/otp_src_R11B-1/erts/configure failed for 
>>> erts
>>>
>>> If we do env CC=/tmp/gcc64 
>>> ./configure --enable-smp-support --prefix=/usr/local/erlang/R12B-0
>>> configure finish successfully! We can build OK without patch and we fail 
>>> to build with the patch.
>>>
>>> Best regards
>>> Ognian
>>>
>>> -----Original Message-----
>>> From: Rickard Green [mailto:rickard.s.green@REDACTED]
>>> Sent: Thursday, 13 December 2007 01:15
>>> To: Valentin Micic
>>> Cc: Ognian Pantov [ MTN - Innovation Centre ]; Kenneth Lundin; Sean
>>> Hinde; Erlang/OTP discussions; waynes@REDACTED
>>> Subject: Re: [erlang-questions] Source patch for R12B-0 available
>>>
>>>
>>> Valentin Micic wrote:
>>>> Not sure how is gnu tar related to the problem, but we'll try...
>>>>
>>> As far as I know solaris tar and gnu tar are slightly incompatible, and 
>>> that you might get silent errors if you extract using solaris tar. I'm 
>>> no tar expert, though, I might be wrong, but by using gnu tar you will 
>>> at least remove one possible error source.
>>>
>>>> When we've run "truss" command using 'erlc' and arguments as indicated 
>>>> immediately when build "hangs", the execution fails because it cannot 
>>>> locate 'erl'. Unfortunately, the 'erl' hasn't been build at this point, 
>>>> so I am at loss... it appears to me that 'erlc' is invoked to early, 
>>>> that is to say, before 'erl' has been created. Thus, two questions for 
>>>> your consideration, if you please:
>>>>
>>>> 1) Could it be that patch is inserted at a wrong place;
>>> Perhaps, but I've also used gpatch (version 2.5.4), and it works for me. 
>>> You could try to apply the patch manually if you want. Modify all files 
>>> included in the patch manually except for otp_src_R12B-0/configure, and 
>>> otp_src_R12B-0/erts/configure then cd into otp_src_R12B-0 and run 
>>> "./otp_build autoconf" (you need to have autoconf 2.59 in your path). If 
>>> you search for "diff -Naur" in the patch file, you will easily find the 
>>> beginning of each diff.
>>>
>>>> 2) Could it be that your build is successful because you do have erl 
>>>> somewhere in your path (I mean erl that you've build before via 
>>>> separate build) -- I've checked it over and over again: erlc will try 
>>>> to invoke erl using any path specified in your $PATH variable.
>>>>
>>> The top makefile puts the bootstrap/bin directory (where the bootstrap 
>>> erl and erlc resides) first in your path during the build. I've also 
>>> successfully built it without any erl and erlc in the path and without 
>>> ERLC_EMULATOR set, and also using the runtime system with resp. without 
>>> smp support.
>>>
>>> You could also try to enable/disable smp support for erlc by 
>>> putting -smpenable/-smpdisable in the ERL_ZFLAGS environment variable 
>>> before building and see if it makes any difference.
>>>
>>> BR,
>>> Rickard Green, Erlang/OTP, Ericsson AB.
>>>
>>>> Thanks for your effort so far.
>>>>
>>>> Kind Regards,
>>>> V.
>>>>
>>>>
>>>> ----- Original Message ----- From: "Rickard Green" 
>>>> <rickard.s.green@REDACTED>
>>>> To: "Ognian Pantov [ MTN - Innovation Centre ]" <Pantov_O@REDACTED>
>>>> Cc: "Kenneth Lundin" <kenneth.lundin@REDACTED>; "Sean Hinde" 
>>>> <sean.hinde@REDACTED>; "Erlang/OTP discussions" 
>>>> <erlang-questions@REDACTED>; <waynes@REDACTED>; "Valentin 
>>>> Micic" <valentin@REDACTED>
>>>> Sent: Wednesday, December 12, 2007 2:05 PM
>>>> Subject: Re: [erlang-questions] Source patch for R12B-0 available
>>>>
>>>>
>>>>> It builds fine for me on solaris 10.
>>>>>
>>>>> Are you extracting the tar file with gnu tar? If not, you need to.
>>>>>
>>>>> Instead of using CC I put a script called gcc (similar to yours) in 
>>>>> the path and also a script called ld (passing -64 as argument to ld) 
>>>>> in the path.
>>>>>
>>>>> I use gcc 3.4.4.
>>>>>
>>>>> BR,
>>>>> Rickard Green, Erlang/OTP, Ericsson AB.
>>>>>
>>>>>
>>>>> Ognian Pantov [ MTN - Innovation Centre ] wrote:
>>>>>> Hi,
>>>>>>
>>>>>> We are having a problem making R12B-0 with the patch on Solaris 10.
>>>>>> We can make and run R12B-0 without the patch on the same machine. See 
>>>>>> below for details of our environment.  When we are trying to make 
>>>>>> R12B-0 with the patch, make hangs when is trying to compile 
>>>>>> hipe_rtl_arch.erl file.
>>>>>> *********************************************************************************************************
>>>>>> make[2]: Leaving directory 
>>>>>> `/export/home/smscproj/install/otp_src_R12B-0/lib/parsetools'
>>>>>> make[2]: Entering directory 
>>>>>> `/export/home/smscproj/install/otp_src_R12B-0/lib/asn1/src'
>>>>>> make[2]: Nothing to be done for `opt'.
>>>>>> make[2]: Leaving directory 
>>>>>> `/export/home/smscproj/install/otp_src_R12B-0/lib/asn1/src'
>>>>>> make[2]: Entering directory 
>>>>>> `/export/home/smscproj/install/otp_src_R12B-0/lib/hipe'
>>>>>> Makefile:35: warning: overriding commands for target `docs'
>>>>>> /export/home/smscproj/install/otp_src_R12B-0/make/otp_subdir.mk:28: 
>>>>>> warning: ignoring old commands for target `docs'
>>>>>> === Entering application hipe
>>>>>> make[3]: Entering directory 
>>>>>> `/export/home/smscproj/install/otp_src_R12B-0/lib/hipe/rtl'
>>>>>> /export/home/smscproj/install/otp_src_R12B-0/bin/sparc-sun-solaris2.10/hipe_mkliterals 
>>>>>>  -e > hipe_literals.hrl
>>>>>> erlc -W  +debug_info +warn_obsolete_guard +inline -o../ebin 
>>>>>> hipe_rtl_arch.erl
>>>>>>
>>>>>> !!! We stay here till we kill the process!
>>>>>> ********************************************************************************************************
>>>>>> The command patch doesn't support -Z option on Solaris (it does on 
>>>>>> Linux) and we use gpatch instead.
>>>>>> We try to patch the source code on Linux and make on Solaris - the 
>>>>>> result is the same the process hangs during compilation on 
>>>>>> hipe_rtl_arch.erl.
>>>>>>
>>>>>> We tryed to compile hipe_rtl_arch.erl manually but environment 
>>>>>> doesn't seem to be ready yet.
>>>>>>
>>>>>> Any ideas what may cuase this problem?
>>>>>>
>>>>>> Best regards
>>>>>> Ognian
>>>>>>
>>>>>> --------------------------Environment--------------------------------------------
>>>>>>
>>>>>> The make for R12B-0 with and without patch is done on the same 
>>>>>> machine using the same procedure.
>>>>>> We are using Sun Netra-T2000 running Solaris 10 patch level 
>>>>>> 125100-05. We use GCC 3.4.6.
>>>>>>
>>>>>> To compile 64 bit code we do:
>>>>>>
>>>>>> cat>/tmp/gcc64
>>>>>> #!/bin/sh
>>>>>> exec gcc -m64 "$@"
>>>>>> ^D
>>>>>>
>>>>>> chmod +x /tmp/gcc64
>>>>>>
>>>>>> Every time we make we remove the old otp_src_R12B-0 directory and 
>>>>>> start from scratch.
>>>>>>
>>>>>> tar -xvf otp_src_R12B-0.tar
>>>>>> gpatch -ZNp0 < otp_src_R12B-0-osp1.patch ( only with patch )
>>>>>>
>>>>>> env CC=/tmp/gcc64 
>>>>>> ./configure --enable-smp-support --prefix=/usr/local/erlang/R12B-0
>>>>>> make
>>>>>> ---------------------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Kenneth Lundin [mailto:kenneth.lundin@REDACTED]
>>>>>> Sent: Monday, 10 December 2007 02:33
>>>>>> To: Valentin Micic
>>>>>> Cc: Sean Hinde; Rickard Green; Erlang/OTP discussions; Ognian Pantov 
>>>>>> [
>>>>>> MTN - Innovation Centre ]; waynes@REDACTED
>>>>>> Subject: Re: [erlang-questions] Source patch for R12B-0 available
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Since the combination SMP and 64 bit sparc apparently never has 
>>>>>> worked
>>>>>> in R11B you can't have any system in service dependent on this patch
>>>>>> do you?
>>>>>>
>>>>>> So if you are planning on using the SMP emulator for the first time 
>>>>>> in a product
>>>>>> I would really recommend that you put your old policy away and go for 
>>>>>> R12B.
>>>>>>
>>>>>> The reasons for that are in my opinion many:
>>>>>> - R12B is the most stable version with best performance when it comes
>>>>>> to SMP execution.
>>>>>> R12B is the version where we will have regular service releases with 
>>>>>> patches and
>>>>>> improvements.
>>>>>> R12B is the version where improvements regarding SMP will appear.
>>>>>> R12B is the version where we may support more platforms.
>>>>>> Bugs found by open source users in R12B AND PREVIOUS releases will be
>>>>>> corrected in R12B-1, 2, ..., etc.
>>>>>>
>>>>>> /Regards Kenneth Erlang/OTP team, Ericsson AB
>>>>>>
>>>>>> On 12/9/07, Valentin Micic <valentin@REDACTED> wrote:
>>>>>>> May I second what Sean is asking for?
>>>>>>> I would really appreciate a fix for R11B-5 -- we have a policy not 
>>>>>>> to run
>>>>>>> the latest release on production systems, and absence of the patch 
>>>>>>> would
>>>>>>> force us to do so. Make no mistake, I really like what I saw in R12 
>>>>>>> so far,
>>>>>>> but we'd like to migrate on our own pace.
>>>>>>> Your cooperation will be *highly* appreciated.
>>>>>>>
>>>>>>> Valentin Micic
>>>>>>> Principal Consultant
>>>>>>> PHAROS CONSVLTING (PTY) LTD.
>>>>>>> Cell: +27 83 212 9180
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> From: "Sean Hinde" <sean.hinde@REDACTED>
>>>>>>> To: "Rickard Green" <rickard.s.green@REDACTED>
>>>>>>> Cc: "Erlang/OTP discussions" <erlang-questions@REDACTED>
>>>>>>> Sent: Sunday, December 09, 2007 1:51 AM
>>>>>>> Subject: Re: [erlang-questions] Source patch for R12B-0 available
>>>>>>>
>>>>>>>
>>>>>>>> Hi Rikard,
>>>>>>>>
>>>>>>>> Do you have any plans to release a patch for those using R11B-5 on 
>>>>>>>> 64
>>>>>>>> bit sparc? I'm thinking mainly of the OTP-7006 issue, initially
>>>>>>>> reported on R11B-5.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Sean
>>>>>>>>
>>>>>>>> On 7 Dec 2007, at 14:17, Rickard Green wrote:
>>>>>>>>
>>>>>>>>> A patch that fixes the following issues is now available at
>>>>>>>>> http://www.erlang.org/download.html . Instructions for applying
>>>>>>>>> the patch can be found in the patch README.
>>>>>>>>>
>>>>>>>>> BR,
>>>>>>>>> Rickard Green, Erlang/OTP, Ericsson AB.
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> OTP-7006  The SMP emulator on sparc64 erroneously used the sparc32
>>>>>>>>>           atomic and the sparc32 spinlock implementations which
>>>>>>>>>           caused it to crash.
>>>>>>>>>
>>>>>>>>> OTP-7012  Matching an empty binary in a record and then using the
>>>>>>>>>           same record again could cause a compiler crash.
>>>>>>>>>
>>>>>>>>>           Example code that triggers the crash:
>>>>>>>>>
>>>>>>>>>           -record(r, {a,b}).
>>>>>>>>>           t(R) ->
>>>>>>>>>             #r{a = <<>>} = R,
>>>>>>>>>             R#r.b.
>>>>>>>>>
>>>>>>>>> OTP-7013  file:read/2 and file:consult_stream/1,3 did not use an 
>>>>>>>>> empty
>>>>>>>>>           prompt on I/O devices. This bug has now been corrected.
>>>>>>>>>
>>>>>>>>> OTP-7014  configuring --enable-darwin-universal or --enable-
>>>>>>>>> darwin-64bit
>>>>>>>>>           on MacOSX could result in a non optimized emulator. Top
>>>>>>>>> level
>>>>>>>>>           configure script now corrected.
>>>>>>>>>
>>>>>>>>> OTP-7015  configuring --with-gd did not produce correct include 
>>>>>>>>> flags
>>>>>>>>>           for percept.
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> erlang-questions mailing list
>>>>>>>>> erlang-questions@REDACTED
>>>>>>>>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>>>>>>> _______________________________________________
>>>>>>>> erlang-questions mailing list
>>>>>>>> erlang-questions@REDACTED
>>>>>>>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>>>>>> _______________________________________________
>>>>>>> erlang-questions mailing list
>>>>>>> erlang-questions@REDACTED
>>>>>>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>>>>>>
>>>>>> NOTE: This e-mail message is subject to the MTN Group disclaimer see 
>>>>>> http://www.mtn.co.za/default.aspx?pid=34411
>>> NOTE: This e-mail message is subject to the MTN Group disclaimer see 
>>> http://www.mtn.co.za/default.aspx?pid=34411
>> NOTE: This e-mail message is subject to the MTN Group disclaimer see 
>> http://www.mtn.co.za/default.aspx?pid=34411 




More information about the erlang-questions mailing list