Bug 222291 - devel/ice: Update to 3.6.4
Summary: devel/ice: Update to 3.6.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Michael Gmelin
URL: https://github.com/zeroc-ice/ice/blob...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-13 15:31 UTC by Andreas Sommer
Modified: 2018-01-22 23:10 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (freebsd)


Attachments
Port skeleton patch for 3.6.4 (22.60 KB, patch)
2017-09-13 15:31 UTC, Andreas Sommer
no flags Details | Diff
Poudriere testport log (232.60 KB, text/plain)
2017-09-13 15:31 UTC, Andreas Sommer
no flags Details
Port skeleton patch for 3.6.4 (17.95 KB, patch)
2017-10-07 21:27 UTC, Andreas Sommer
no flags Details | Diff
Poudriere testport log (11.1-RELEASE amd64) (234.56 KB, text/plain)
2017-10-08 21:20 UTC, Andreas Sommer
no flags Details
Poudriere testport log (11.1-RELEASE amd64) for py27-ice (52.42 KB, text/plain)
2017-10-08 21:21 UTC, Andreas Sommer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sommer 2017-09-13 15:31:10 UTC
Created attachment 186332 [details]
Port skeleton patch for 3.6.4

There's already a PR for Ice-3.7.0 (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221141), but as discussed there it makes more sense to maintain separate versions 3.6.x and 3.7.x because migration is nontrivial.

The new minor version 3.6.4 brings several critical Ice Grid related fixes that could (or already did) really hurt in production.

Poudriere testport log is attached. I removed previous patches which already landed upstream (such as LibreSSL). `portlint -a` seems fine except for stuff that was there before.

I roughly tested this new version in a test environment and no warnings/errors/objections appeared. Also, one of the critical fixes is already tested in production.
Comment 1 Andreas Sommer 2017-09-13 15:31:38 UTC
Created attachment 186333 [details]
Poudriere testport log
Comment 2 Andreas Sommer 2017-09-27 10:56:56 UTC
Please wait before checking and committing. I'm currently experiencing a segfault in a Python-based unit test that happens with 3.6.4 but not with {py27-}Ice-3.6.3_1.
Comment 3 Andreas Sommer 2017-10-07 21:27:52 UTC
Created attachment 186989 [details]
Port skeleton patch for 3.6.4

Resolved the alleged segfault. The crash itself was a red herring and came from me only updating Ice/py27-Ice in my test system, but not python27. Didn't check exactly, but I guess the C API of libpython had changed between the version I had installed and the one in my ports tree (against which devel/py-ice was built).

Instead, my reproduction environment (https://github.com/AndiDog/ice-3.6.4-python-bug) actually led to this problem after fishing out the herring:

> Traceback (most recent call last):
>   File "./client.py", line 15, in <module>
>     print(demo.method())
>   File "Demo.ice", line 227, in method
> 
> SystemError: Objects/tupleobject.c:142: bad argument to internal function
> *** Error code 1

This came from the patch-python-modules-IcePy-Operation.cpp which replaced all occurrences of PyTuple_SET_ITEM by PyTuple_SetItem. However this is wrong at least for this (patched) hunk

> void
> IcePy::ParamInfo::unmarshaled(PyObject* val, PyObject* target, void* closure)
> {
>     assert(PyTuple_Check(target));
>     Py_ssize_t i = reinterpret_cast<Py_ssize_t>(closure);
>     PyTuple_SetItem(target, i, val);
>     Py_INCREF(val); // PyTuple_SetItem steals a reference.
> }

Here, the `val` had reference count == 2, but PyTuple_SetItem only allows 1. So Ice is using PyTuple_SET_ITEM (which doesn't check refcount) on purpose. Therefore, this patch hunk had to be removed. All other patched occurrences seemed fine, but I still removed the whole patch file because with those other occurences, the tuple is obviously newly created and therefore PyTuple_SET_ITEM is good enough. No need to differ from upstream here.

---

ice-3.6.4.diff updated - very same but with files/patch-python-modules-IcePy-Operation.cpp removed. Patch needs to be applied with `patch -E` to remove empty files.

I've tested 3.6.4 for quite a while now and feeling pretty confident to upgrade.
Comment 4 Andreas Sommer 2017-10-08 21:20:59 UTC
Created attachment 187014 [details]
Poudriere testport log (11.1-RELEASE amd64)

As requested: proof this release still compiles with Clang 4.
Comment 5 Andreas Sommer 2017-10-08 21:21:29 UTC
Created attachment 187015 [details]
Poudriere testport log (11.1-RELEASE amd64) for py27-ice
Comment 6 Michael Gmelin freebsd_committer 2018-01-22 01:46:24 UTC
Requires more patches to the test target (currently testing those) because of libressl and py-passlib changes.

I'll also need to test devel/php5-ice.
Comment 7 Michael Gmelin freebsd_committer 2018-01-22 11:52:20 UTC
More changes required (php5-ice doesn't build), fix is trivial though. Will update the port as soon as automatic tests/internal exp-runs finish.
Comment 8 commit-hook freebsd_committer 2018-01-22 23:06:58 UTC
A commit references this bug:

Author: grembo
Date: Mon Jan 22 23:05:52 UTC 2018
New revision: 459707
URL: https://svnweb.freebsd.org/changeset/ports/459707

Log:
  Update devel/ice, devel/py-ice, devel/php5-ice to version 3.6.4

  PR:		222291
  Submitted by:	Andreas Sommer <andreas.sommer87@googlemail.com>

Changes:
  head/devel/ice/Makefile
  head/devel/ice/distinfo
  head/devel/ice/files/Make.rules.FreeBSD
  head/devel/ice/files/patch-cpp-src-IceGrid-ServerI.cpp
  head/devel/ice/files/patch-cpp-src-IceSSL-OpenSSLEngine.cpp
  head/devel/ice/files/patch-cpp-src-IceSSL-Util.cpp
  head/devel/ice/files/patch-cpp-src-IceUtil-Cond.cpp
  head/devel/ice/files/patch-cpp-test-IceSSL-configuration-AllTests.cpp
  head/devel/ice/files/patch-php-config-Make.rules.php
  head/devel/ice/files/patch-python-modules-IcePy-Operation.cpp
  head/devel/ice/files/patch-scripts-TestUtil.py
  head/devel/ice/pkg-plist