Open Lukasa opened 5 years ago
@gottesmm, @slavapestov, look familiar?
@belkadan nope.
@Lukasa can you provide a full reproducer using ASAN instead of valgrind?
Yup, but it's not very helpful. The full output is below (basically identical in release and debug modes):
AddressSanitizer:DEADLYSIGNAL
=================================================================
==207==ERROR: AddressSanitizer: SEGV on unknown address 0x56325e00003d (pc 0x7f3b0e664aa8 bp 0x7fffaa997110 sp 0x7fffaa995cf0 T0)
==207==The signal is caused by a READ memory access.
#​0 0x7f3b0e664aa7 (/root/.swift/usr/lib/swift/linux/libswiftCore.so+0x399aa7)
#​1 0x5632f0b7c7fe (/code/.build/x86_64-unknown-linux/release/swift-nio-http2PackageTests.xctest+0x5fd7fe)
#​2 0x5632f0b6b9b0 (/code/.build/x86_64-unknown-linux/release/swift-nio-http2PackageTests.xctest+0x5ec9b0)
#​3 0x5632f0b6be18 (/code/.build/x86_64-unknown-linux/release/swift-nio-http2PackageTests.xctest+0x5ece18)
#​4 0x5632f06b881b (/code/.build/x86_64-unknown-linux/release/swift-nio-http2PackageTests.xctest+0x13981b)
#​5 0x5632f0b6b9d0 (/code/.build/x86_64-unknown-linux/release/swift-nio-http2PackageTests.xctest+0x5ec9d0)
#​6 0x5632f0b6bc08 (/code/.build/x86_64-unknown-linux/release/swift-nio-http2PackageTests.xctest+0x5ecc08)
#​7 0x7f3b0e909600 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x30600)
#​8 0x7f3b0e90942b (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x3042b)
#​9 0x7f3b0e909393 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x30393)
#​10 0x7f3b0e909668 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x30668)
#​11 0x7f3b0e8fb4c6 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x224c6)
#​12 0x7f3b0e907ddc (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x2eddc)
#​13 0x7f3b0e9076dc (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x2e6dc)
#​14 0x7f3b0e90bde1 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x32de1)
#​15 0x7f3b0e9099d7 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x309d7)
#​16 0x7f3b0e90bde1 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x32de1)
#​17 0x7f3b0e9099d7 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x309d7)
#​18 0x7f3b0e90bde1 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x32de1)
#​19 0x7f3b0e9099ef (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x309ef)
#​20 0x7f3b0e90bde1 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x32de1)
#​21 0x7f3b0e906452 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x2d452)
#​22 0x5632f0d0413f (/code/.build/x86_64-unknown-linux/release/swift-nio-http2PackageTests.xctest+0x78513f)
#​23 0x7f3b0bc7cb96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#​24 0x5632f068f479 (/code/.build/x86_64-unknown-linux/release/swift-nio-http2PackageTests.xctest+0x110479)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/root/.swift/usr/lib/swift/linux/libswiftCore.so+0x399aa7)
==207==ABORTING
(The reproducer is the same: swift-nio-http2's test suite. I have still not been able to reproduce this on macOS, or in a different repo, but I suspect that's because I don't know what specific situation is triggering this.
This continues to manifest with the most recent Swift 5 snapshot (from the 28th of December).
Obtaining a reproducer is simple enough if you have Docker for Mac installed:
git clone https://github.com/apple/swift-nio-http2.git && cd swift-nio-http2 && docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.1804.50.yaml run test
In the absence of Docker for Mac, obtaining a machine with Ubuntu 18.04 and a recent Swift 5 snapshot can be used to hit the issue as well:
git clone https://github.com/apple/swift-nio-http2.git && cd swift-nio-http2 && swift test
Created tracking radar: rdar://47020961
Incidentally, this reproduces in both release and debug mode, so I don't think there's any concern around the behaviour of the optimiser here.
still happening with the toolchain from the 20th Jan:
(lldb) bt
* thread #​1, name = 'swift-nio-http2', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
* frame #​0: 0x0000000000000000
frame #​1: 0x00007ffff764caab libswiftCore.so`_swift_release_dealloc + 11
frame #​2: 0x00005555555fe7ac swift-nio-http2PackageTests.xctest`outlined consume of NIO.IOData at <compiler-generated>:0
frame #​3: 0x000055555583147d swift-nio-http2PackageTests.xctest`outlined consume of NIOHTTP2.HTTP2Frame.FramePayload at <compiler-generated>:0
frame #​4: 0x00005555558329bd swift-nio-http2PackageTests.xctest`outlined destroy of HTTP2Frame at <compiler-generated>:0
frame #​5: 0x000055555590bc84 swift-nio-http2PackageTests.xctest`SimpleClientServerTests.testBasicRequestResponse(self=<unavailable>) at SimpleClientServerTests.swift:216:9
frame #​6: 0x0000555555905826 swift-nio-http2PackageTests.xctest`partial apply at <compiler-generated>:0
frame #​7: 0x00005555555da8c6 swift-nio-http2PackageTests.xctest`thunk for @escaping @callee_guaranteed () -> (@error @owned Error) at <compiler-generated>:0
frame #​8: 0x00005555559057ab swift-nio-http2PackageTests.xctest`partial apply for thunk for @escaping @callee_guaranteed () -> (@error @owned Error) at <compiler-generated>:0
frame #​9: 0x00007ffff7ed3601 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) + 17
frame #​10: 0x00007ffff7ed342c libXCTest.so`partial apply forwarder for closure #​1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () + 92
frame #​11: 0x00007ffff7ed3394 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) + 20
frame #​12: 0x00007ffff7ed3669 libXCTest.so`reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".37" + 9
frame #​13: 0x00007ffff7ec54c7 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) + 39
frame #​14: 0x00007ffff7ed1ddd libXCTest.so`XCTest.XCTestCase.invokeTest() -> () + 77
frame #​15: 0x00007ffff7ed16dd libXCTest.so`XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () + 173
frame #​16: 0x00007ffff7ed5de2 libXCTest.so`XCTest.XCTest.run() -> () + 194
frame #​17: 0x00007ffff7ed39d8 libXCTest.so`XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () + 232
frame #​18: 0x00007ffff7ed5de2 libXCTest.so`XCTest.XCTest.run() -> () + 194
frame #​19: 0x00007ffff7ed39d8 libXCTest.so`XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () + 232
frame #​20: 0x00007ffff7ed5de2 libXCTest.so`XCTest.XCTest.run() -> () + 194
frame #​21: 0x00007ffff7ed0453 libXCTest.so`XCTest.XCTMain(Swift.Array<(testCaseClass: XCTest.XCTestCase.Type, allTests: Swift.Array<(Swift.String, (XCTest.XCTestCase) throws -> ())>)>) -> Swift.Never + 1091
frame #​22: 0x000055555598f110 swift-nio-http2PackageTests.xctest`main at LinuxMain.swift:29:4
frame #​23: 0x00007ffff548db97 libc.so.6`__libc_start_main + 231
frame #​24: 0x00005555555b96ca swift-nio-http2PackageTests.xctest`_start + 42
and because @gottesmm requested the ASan (symbolication is at the end):
(lldb) run
Process 410 launched: '/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest' (x86_64)
Test Suite 'Selected tests' started at 2019-01-21 12:08:50.001
Test Suite 'SimpleClientServerTests' started at 2019-01-21 12:08:50.004
Test Case 'SimpleClientServerTests.testBasicRequestResponse' started at 2019-01-21 12:08:50.004
Process 410 stopped
* thread #​1, name = 'swift-nio-http2', stop reason = signal SIGSEGV: invalid address (fault address: 0x55551cfffff4)
frame #​0: 0x00007ffff764caa8 libswiftCore.so`_swift_release_dealloc + 8
libswiftCore.so`_swift_release_dealloc:
-> 0x7ffff764caa8 <+8>: callq *-0x10(%rax)
0x7ffff764caab <+11>: popq %r13
0x7ffff764caad <+13>: retq
0x7ffff764caae: nop
Target 0: (swift-nio-http2PackageTests.xctest) stopped.
(lldb) bt
* thread #​1, name = 'swift-nio-http2', stop reason = signal SIGSEGV: invalid address (fault address: 0x55551cfffff4)
* frame #​0: 0x00007ffff764caa8 libswiftCore.so`_swift_release_dealloc + 8
frame #​1: 0x000055555572be1c swift-nio-http2PackageTests.xctest`outlined consume of NIO.IOData at <compiler-generated>:0
frame #​2: 0x0000555555c9e57d swift-nio-http2PackageTests.xctest`outlined consume of NIOHTTP2.HTTP2Frame.FramePayload at <compiler-generated>:0
frame #​3: 0x0000555555ca28ed swift-nio-http2PackageTests.xctest`outlined destroy of HTTP2Frame at <compiler-generated>:0
frame #​4: 0x0000555555e77de6 swift-nio-http2PackageTests.xctest`SimpleClientServerTests.testBasicRequestResponse(self=<unavailable>) at SimpleClientServerTests.swift:216:9
frame #​5: 0x0000555555e68606 swift-nio-http2PackageTests.xctest`partial apply at <compiler-generated>:0
frame #​6: 0x00005555556d05a6 swift-nio-http2PackageTests.xctest`thunk for @escaping @callee_guaranteed () -> (@error @owned Error) at <compiler-generated>:0
frame #​7: 0x0000555555e6858b swift-nio-http2PackageTests.xctest`partial apply for thunk for @escaping @callee_guaranteed () -> (@error @owned Error) at <compiler-generated>:0
frame #​8: 0x00007ffff7ed3601 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) + 17
frame #​9: 0x00007ffff7ed342c libXCTest.so`partial apply forwarder for closure #​1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () + 92
frame #​10: 0x00007ffff7ed3394 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) + 20
frame #​11: 0x00007ffff7ed3669 libXCTest.so`reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".37" + 9
frame #​12: 0x00007ffff7ec54c7 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) + 39
frame #​13: 0x00007ffff7ed1ddd libXCTest.so`XCTest.XCTestCase.invokeTest() -> () + 77
frame #​14: 0x00007ffff7ed16dd libXCTest.so`XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () + 173
frame #​15: 0x00007ffff7ed5de2 libXCTest.so`XCTest.XCTest.run() -> () + 194
frame #​16: 0x00007ffff7ed39d8 libXCTest.so`XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () + 232
frame #​17: 0x00007ffff7ed5de2 libXCTest.so`XCTest.XCTest.run() -> () + 194
frame #​18: 0x00007ffff7ed39d8 libXCTest.so`XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () + 232
frame #​19: 0x00007ffff7ed5de2 libXCTest.so`XCTest.XCTest.run() -> () + 194
frame #​20: 0x00007ffff7ed0453 libXCTest.so`XCTest.XCTMain(Swift.Array<(testCaseClass: XCTest.XCTestCase.Type, allTests: Swift.Array<(Swift.String, (XCTest.XCTestCase) throws -> ())>)>) -> Swift.Never + 1091
frame #​21: 0x0000555555f9c24e swift-nio-http2PackageTests.xctest`main at LinuxMain.swift:29:4
frame #​22: 0x00007ffff5285b97 libc.so.6`__libc_start_main + 231
frame #​23: 0x000055555566160a swift-nio-http2PackageTests.xctest`_start + 42
(lldb) cont
Process 410 resuming
AddressSanitizer:DEADLYSIGNAL
=================================================================
==410==ERROR: AddressSanitizer: SEGV on unknown address 0x55551cfffff4 (pc 0x7ffff764caa8 bp 0x7fffffffce20 sp 0x7fffffffcdf0 T0)
==410==The signal is caused by a READ memory access.
#​0 0x7ffff764caa7 (/root/.swift/usr/lib/swift/linux/libswiftCore.so+0x399aa7)
#​1 0x55555572be1b (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0x1d7e1b)
#​2 0x555555c9e57c (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0x74a57c)
#​3 0x555555ca28ec (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0x74e8ec)
#​4 0x555555e77de5 (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0x923de5)
#​5 0x555555e68605 (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0x914605)
#​6 0x5555556d05a5 (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0x17c5a5)
#​7 0x555555e6858a (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0x91458a)
#​8 0x7ffff7ed3600 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x30600)
#​9 0x7ffff7ed342b (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x3042b)
#​10 0x7ffff7ed3393 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x30393)
#​11 0x7ffff7ed3668 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x30668)
#​12 0x7ffff7ec54c6 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x224c6)
#​13 0x7ffff7ed1ddc (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x2eddc)
#​14 0x7ffff7ed16dc (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x2e6dc)
#​15 0x7ffff7ed5de1 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x32de1)
#​16 0x7ffff7ed39d7 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x309d7)
#​17 0x7ffff7ed5de1 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x32de1)
#​18 0x7ffff7ed39d7 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x309d7)
#​19 0x7ffff7ed5de1 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x32de1)
#​20 0x7ffff7ed0452 (/root/.swift/usr/lib/swift/linux/libXCTest.so+0x2d452)
#​21 0x555555f9c24d (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0xa4824d)
#​22 0x7ffff5285b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#​23 0x555555661609 (/code/.build/x86_64-unknown-linux/debug/swift-nio-http2PackageTests.xctest+0x10d609)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/root/.swift/usr/lib/swift/linux/libswiftCore.so+0x399aa7)
==410==ABORTING
Process 410 exited with status = 1 (0x00000001)
(lldb) image lookup --address 0x7ffff764caa7
Address: libswiftCore.so[0x0000000000399aa7] (libswiftCore.so..text + 2556039)
Summary: libswiftCore.so`_swift_release_dealloc + 7
(lldb) image lookup --address 0x55555572be1b
Address: swift-nio-http2PackageTests.xctest[0x00000000001d7e1b] (swift-nio-http2PackageTests.xctest..text + 829499)
Summary: swift-nio-http2PackageTests.xctest`outlined consume of NIO.IOData + 43
(lldb) image lookup --address 0x555555c9e57c
Address: swift-nio-http2PackageTests.xctest[0x000000000074a57c] (swift-nio-http2PackageTests.xctest..text + 6541212)
Summary: swift-nio-http2PackageTests.xctest`outlined consume of NIOHTTP2.HTTP2Frame.FramePayload + 92
(lldb) image lookup --address 0x555555ca28ec
Address: swift-nio-http2PackageTests.xctest[0x000000000074e8ec] (swift-nio-http2PackageTests.xctest..text + 6558476)
Summary: swift-nio-http2PackageTests.xctest`outlined destroy of NIOHTTP2.HTTP2Frame + 76 at <compiler-generated>
(lldb) image lookup --address 0x555555e77de5
Address: swift-nio-http2PackageTests.xctest[0x0000000000923de5] (swift-nio-http2PackageTests.xctest..text + 8480773)
Summary: swift-nio-http2PackageTests.xctest`NIOHTTP2Tests.SimpleClientServerTests.testBasicRequestResponse() throws -> () + 13509 at SimpleClientServerTests.swift:216:9
(lldb) image lookup --address 0x555555e68605
Address: swift-nio-http2PackageTests.xctest[0x0000000000914605] (swift-nio-http2PackageTests.xctest..text + 8417317)
Summary: swift-nio-http2PackageTests.xctest`partial apply forwarder with unmangled suffix ".270" + 37 at <compiler-generated>
(lldb) image lookup --address 0x5555556d05a5
Address: swift-nio-http2PackageTests.xctest[0x000000000017c5a5] (swift-nio-http2PackageTests.xctest..text + 454597)
Summary: swift-nio-http2PackageTests.xctest`reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) + 21 at <compiler-generated>
(lldb) image lookup --address 0x555555e6858a
Address: swift-nio-http2PackageTests.xctest[0x000000000091458a] (swift-nio-http2PackageTests.xctest..text + 8417194)
Summary: swift-nio-http2PackageTests.xctest`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) + 26 at <compiler-generated>
(lldb) image lookup --address 0x7ffff7ed3600
Address: libXCTest.so[0x0000000000030600] (libXCTest.so..text + 81440)
Summary: libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) + 16
(lldb) image lookup --address 0x7ffff7ed342b
Address: libXCTest.so[0x000000000003042b] (libXCTest.so..text + 80971)
Summary: libXCTest.so`partial apply forwarder for closure #​1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () + 91
(lldb) image lookup --address 0x7ffff7ed3393
Address: libXCTest.so[0x0000000000030393] (libXCTest.so..text + 80819)
Summary: libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) + 19
(lldb) image lookup --address 0x7ffff7ed3668
Address: libXCTest.so[0x0000000000030668] (libXCTest.so..text + 81544)
Summary: libXCTest.so`reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".37" + 8
(lldb) image lookup --address 0x7ffff7ec54c6
Address: libXCTest.so[0x00000000000224c6] (libXCTest.so..text + 23782)
Summary: libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) + 38
(lldb) image lookup --address 0x7ffff7ed1ddc
Address: libXCTest.so[0x000000000002eddc] (libXCTest.so..text + 75260)
Summary: libXCTest.so`XCTest.XCTestCase.invokeTest() -> () + 76
(lldb) image lookup --address 0x7ffff7ed16dc
Address: libXCTest.so[0x000000000002e6dc] (libXCTest.so..text + 73468)
Summary: libXCTest.so`XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () + 172
(lldb) image lookup --address 0x7ffff7ed5de1
Address: libXCTest.so[0x0000000000032de1] (libXCTest.so..text + 91649)
Summary: libXCTest.so`XCTest.XCTest.run() -> () + 193
(lldb) image lookup --address 0x7ffff7ed39d7
Address: libXCTest.so[0x00000000000309d7] (libXCTest.so..text + 82423)
Summary: libXCTest.so`XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () + 231
(lldb) image lookup --address 0x7ffff7ed5de1
Address: libXCTest.so[0x0000000000032de1] (libXCTest.so..text + 91649)
Summary: libXCTest.so`XCTest.XCTest.run() -> () + 193
(lldb) image lookup --address 0x7ffff7ed39d7
Address: libXCTest.so[0x00000000000309d7] (libXCTest.so..text + 82423)
Summary: libXCTest.so`XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () + 231
(lldb) image lookup --address 0x7ffff7ed5de1
Address: libXCTest.so[0x0000000000032de1] (libXCTest.so..text + 91649)
Summary: libXCTest.so`XCTest.XCTest.run() -> () + 193
(lldb) image lookup --address 0x7ffff7ed0452
Address: libXCTest.so[0x000000000002d452] (libXCTest.so..text + 68722)
Summary: libXCTest.so`XCTest.XCTMain(Swift.Array<(testCaseClass: XCTest.XCTestCase.Type, allTests: Swift.Array<(Swift.String, (XCTest.XCTestCase) throws -> ())>)>) -> Swift.Never + 1090
(lldb) image lookup --address 0x555555f9c24d
Address: swift-nio-http2PackageTests.xctest[0x0000000000a4824d] (swift-nio-http2PackageTests.xctest..text + 9677933)
Summary: swift-nio-http2PackageTests.xctest`main + 2269 at LinuxMain.swift:29:4
(lldb) image lookup --address 0x7ffff5285b96
Address: libc.so.6[0x0000000000021b96] (libc.so.6..text + 2246)
Summary: libc.so.6`__libc_start_main + 230
(lldb) image lookup --address 0x555555661609
Address: swift-nio-http2PackageTests.xctest[0x000000000010d609] (swift-nio-http2PackageTests.xctest..text + 41)
Summary: swift-nio-http2PackageTests.xctest`_start + 41
Attachment: Download
Environment
Swift version 5.0-dev (LLVM 9a8bf9ce12, Clang eba26b8d1c, Swift b74d54a27c) Target: x86_64-unknown-linux-gnuAdditional Detail from JIRA
| | | |------------------|-----------------| |Votes | 1 | |Component/s | Compiler | |Labels | Bug, 5.0Regression, Miscompile, RunTimeCrash | |Assignee | None | |Priority | Medium | md5: 65641d9eaf1880afa480ebf91c9c2308Issue Description:
When running the unit tests for swift-nio-http2 (https://github.com/apple/swift-nio-http2)'s master branch on Linux under the latest Swift 5 snapshot, the tests reliably segmentation fault partway through their execution.
When the tests are run under valgrind, we get substantial output. The full output is attached, but here is a sample:
This output seems to suggest that we are double-freeing
HTTP2Frame
objects that are stored in an array of some kind.So far I have not been able to produce a smaller reproducer, though I'll work on doing this. I also have so far failed to reproduce on macOS, though I'll also pursue doing that.