Tuscany
  1. Tuscany
  2. TUSCANY-3759

binding-erlang-runtime isn't compatible with the current version of Erlang/OTP

    Details

      Description

      The unit tests in binding-erlang-runtime hang if the current version of Erlang/OTP is in the path.

      The binding runtime code and unit tests were originally developed with version R12B of the Erlang/OTP runtime and version 1.4.2 of the jinterface jar (the Java/Erlang bridge). When run with this combination, the unit tests complete successfully.

      Making either or both of the following changes causes the unit tests to hang:
      1. Upgrading the Erlang/OTP runtime from version R12B to the current version R14B.
      2. Upgrading the jinterface jar from version 1.4.2 (com/ericsson/otperlang-1.4.2.jar) to the current version 1.5.3.1 (org/erlang/otp/jinterface-1.5.3.1.jar).

      This implies that there is some code in binding-erlang-runtime that requires the older version of the Erlang/OTP runtime and/or the older version of jinterface.

        Activity

        Hide
        Simon Nash added a comment -

        For the 1.6.1 release I have documented this incompatibility in the source distribution BUILDING file and the README files for the helloworld-erlang-service and helloworld-erlang-reference samples.

        Added this information under revsion r1028371 in the 1.6.1 release branch and revision r1028378 in the 1.x trunk.

        Show
        Simon Nash added a comment - For the 1.6.1 release I have documented this incompatibility in the source distribution BUILDING file and the README files for the helloworld-erlang-service and helloworld-erlang-reference samples. Added this information under revsion r1028371 in the 1.6.1 release branch and revision r1028378 in the 1.x trunk.
        Hide
        Simon Nash added a comment -

        After further testing I have seen the same problem with the unit tests hanging when using the R12B runtime and the older jinterface jar. The problem occurs less often than with the new runtime but it happens often enough to be a problem.

        From further investigation it appears that the problem is caused by the unit test not reading stdout from the epmd process that it has spawned. This can cause the stdout buffers to fill up at which point the epmd process gets hung.

        I have written some code to fix this which seems to work. I'll do further testing tomorrow and check in the fix. If all goes well, this should allow the Tuscany Erlang binding to work with the latest Erlang/OTP runtime and jinterface jar.

        Show
        Simon Nash added a comment - After further testing I have seen the same problem with the unit tests hanging when using the R12B runtime and the older jinterface jar. The problem occurs less often than with the new runtime but it happens often enough to be a problem. From further investigation it appears that the problem is caused by the unit test not reading stdout from the epmd process that it has spawned. This can cause the stdout buffers to fill up at which point the epmd process gets hung. I have written some code to fix this which seems to work. I'll do further testing tomorrow and check in the fix. If all goes well, this should allow the Tuscany Erlang binding to work with the latest Erlang/OTP runtime and jinterface jar.
        Hide
        Simon Nash added a comment -

        The fix to read the epmd stdout and stderr streams seems to be working OK with no build hangs so far when using the current R14B release of Erlang/OTP and the current 1.5.3.1 version of jinterface.

        I have therefore committed code to read the epmd stdout and stderr streams everywhere that epmd is launched, upgraded the jinterface pom dependency in binding-erlang-runtime, and reversed the previous commits r1028371 and r1028378.

        Fixed under revisions r1028654 and r1028655 in the 1.6.1 branch and revisions r1028657 and r1028659 in the 1.x trunk.

        Show
        Simon Nash added a comment - The fix to read the epmd stdout and stderr streams seems to be working OK with no build hangs so far when using the current R14B release of Erlang/OTP and the current 1.5.3.1 version of jinterface. I have therefore committed code to read the epmd stdout and stderr streams everywhere that epmd is launched, upgraded the jinterface pom dependency in binding-erlang-runtime, and reversed the previous commits r1028371 and r1028378. Fixed under revisions r1028654 and r1028655 in the 1.6.1 branch and revisions r1028657 and r1028659 in the 1.x trunk.

          People

          • Assignee:
            Simon Nash
            Reporter:
            Simon Nash
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development