ice icon indicating copy to clipboard operation
ice copied to clipboard

swift/Ice/operations tests failure

Open pepone opened this issue 4 years ago • 7 comments

We got this failure with the latest macOS catalina build

*** [19/32] Running swift/Ice/operations tests ***
[ running client/server test - 04/24/20 05:10:08 ]
- Config: tcp
(/Users/vagrant/Library/Developer/Xcode/DerivedData/ice-test-ezhsibqmdkrugzakhgxhdknfjhty/Build/Products/Release/TestDriver.app/Contents/MacOS/TestDriver Ice.operations Server --Ice.Default.Host=127.0.0.1 --Test.BasePort=14500 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1)
(/Users/vagrant/Library/Developer/Xcode/DerivedData/ice-test-ezhsibqmdkrugzakhgxhdknfjhty/Build/Products/Release/TestDriver.app/Contents/MacOS/TestDriver Ice.operations Client --Ice.Default.Host=127.0.0.1 --Test.BasePort=14500 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0)
testing twoway operations...
test in Ice/operations failed:
Traceback (most recent call last):

pepone avatar Apr 24 '20 09:04 pepone

the debugger shows

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff2)
  * frame #0: 0x00007fff7004daed libswiftCore.dylib`_swift_release_dealloc + 13
    frame #1: 0x0000000101b1f750 IceOperations`twoways(helper=0x0000000101901560, p=(instance = 0x00000001018967a0 -> 0x0000000101ba1658 type metadata for IceOperations.(MyClassPrxI in _2D2830256E7307B73730FEE111226FB1), witness_table_MyClassPrx = 0x00007ffee005d578), bprx=(instance = 0x0000000101896960 -> 0x0000000101ba20b8 type metadata for IceOperations.(MBPrxI in _2D2830256E7307B73730FEE111226FB1), witness_table_MBPrx = 0x00007fff9a69ce90 libswiftCore.dylib`InitialAllocationPool + 11384)) at <compiler-generated>:0 [opt]
    frame #2: 0x0000000101b02204 IceOperations`allTests(helper=<unavailable>) at AllTests.swift:24:9 [opt]
    frame #3: 0x0000000101b04615 IceOperations`Client.run(args=<unavailable>, self=0x0000000101901560) at Client.swift:21:22 [opt]
    frame #4: 0x0000000100001ee2 TestDriver`main at main.swift:47:20 [opt]
    frame #5: 0x00007fff7091d7fd libdyld.dylib`start + 1
    frame #6: 0x00007fff7091d7fd libdyld.dylib`start + 1
frame #1: 0x0000000101b1f750 IceOperations`twoways(helper=0x0000000101901560, p=(instance = 0x00000001018967a0 -> 0x0000000101ba1658 type metadata for IceOperations.(MyClassPrxI in _2D2830256E7307B73730FEE111226FB1), witness_table_MyClassPrx = 0x00007ffee005da08), bprx=(instance = 0x0000000101896960 -> 0x0000000101ba20b8 type metadata for IceOperations.(MBPrxI in _2D2830256E7307B73730FEE111226FB1), witness_table_MBPrx = 0x00007fff9a69ce90 libswiftCore.dylib`InitialAllocationPool + 11384)) at <compiler-generated>:0 [opt]

pepone avatar Apr 24 '20 17:04 pepone

I wonder if it's related to my fix from a month or so ago

externl avatar Apr 24 '20 18:04 externl

running from Xcode I get a better stack trace

#0	0x00007fff6dce5675 in objc_release ()
#1	0x00000001003804ce in ObjectPrxI.deinit ()
#2	0x00000001015aaff9 in MyClassPrxI.deinit [inlined] ()
#3	0x00000001015aaff4 in MyClassPrxI.__deallocating_deinit at /Users/jose/Documents/ZeroC/3.7/ice/swift/build/Intermediates/ice.build/Release/IceOperations macOS.build/DerivedSources/Test.swift:3258
#4	0x00007fff6e7b51f0 in _swift_release_dealloc ()

pepone avatar Apr 27 '20 23:04 pepone

crash in https://github.com/zeroc-ice/ice/blob/c2159899f48e7bdf562cb05f626469ec2474a241/swift/test/Ice/operations/Twoways.swift#L192

pepone avatar Apr 27 '20 23:04 pepone

We should test again with Swift 5.3 once it is released, remember to revert 153bd18 workaround for testing

pepone avatar Apr 30 '20 18:04 pepone

I just tried without the workaround on Big Sur with Swift 5.3.2 and it doesn't crash! Could someone else also try to be sure?

EDIT: Never mind, I got a crash when I left it looping.

externl avatar Jan 08 '21 17:01 externl

Still failing with

❯ swift --version
swift-driver version: 1.45.2 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
Target: arm64-apple-macosx12.0
*** [19/32] Running swift/Ice/operations tests ***
[ running client/server test - 07/08/22 10:34:53 ]
testing twoway operations... unexpected exit status: expected: 0, got -10

externl avatar Jul 08 '22 14:07 externl

I just tested with

❯ swift --version
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: arm64-apple-macosx13.0

and didn't get a crash after looping 200 times.

externl avatar Feb 08 '23 16:02 externl