Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault: 11 #1177

Closed
RafaShargo opened this issue Jan 29, 2018 · 7 comments
Closed

Segmentation fault: 11 #1177

RafaShargo opened this issue Jan 29, 2018 · 7 comments

Comments

@RafaShargo
Copy link

RafaShargo commented Jan 29, 2018

Hi!

I'm trying to generate the Appcast with the ./bin/generate_appcast option, but all I get is a Segmentation fault: 11 error. I found another user that had the same error and I tried to re-generate the PMD files, but that did n to work either. I'm running Xcode 9.2 (the project is in Swift 4, if it matters), macOS High Sierra 10.13.2 and Sparkle 1.18.1 via CocoaPods.

I attach the output with the lldb r bt options:

(lldb) r
bProcess 8217 launched: './bin/generate_appcast' (x86_64)
btProcess 8217 stopped

  • thread test #3, queue = 'com.apple.root.default-qos', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001004c8531 generate_appcastswift::_swift_getClass(void const*) + 33 generate_appcastswift::_swift_getClass:
    -> 0x1004c8531 <+33>: andq (%rdi), %rax
    0x1004c8534 <+36>: retq
    0x1004c8535 <+37>: nopw %cs:(%rax,%rax)

generate_appcast`swift::_swift_getClassOfAllocated:
0x1004c8540 <+0>: pushq %rbp
Target 0: (generate_appcast) stopped.

(lldb) bt

  • thread test #3, queue = 'com.apple.root.default-qos', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    • frame #0: 0x00000001004c8531 generate_appcastswift::_swift_getClass(void const*) + 33 frame #1: 0x0000000100499057 generate_appcastunwrapExistential(swift::OpaqueValue*, swift::TargetExistentialTypeMetadataswift::InProcess const*, swift::OpaqueValue*&, swift::TargetMetadataswift::InProcess const*&, bool&, bool&) + 71
      frame Testing #2: 0x0000000100492933 generate_appcastswift_dynamicCast + 595 frame #3: 0x000000010002574d generate_appcastspecialized dsaSignature(path=, privateKey=) at DSASignature.swift:52 [opt]
      frame Sparkle runs thread-unsafe code on secondary threads #4: 0x000000010001fb95 generate_appcastspecialized closure #2 in makeAppcast(archivesSourceDir:privateKey:) [inlined] generate_appcast.dsaSignature(path: Foundation.URL, privateKey: __ObjC.SecKey) throws -> Swift.String at Appcast.swift:0 [opt] frame #5: 0x000000010001fb87 generate_appcastspecialized closure Testing #2 in makeAppcast(update=, privateKey=, group=) at Appcast.swift:37 [opt]
      frame Sparkle runs thread-unsafe code on secondary threads #6: 0x000000010001f9e4 generate_appcastpartial apply for closure #2 in makeAppcast(archivesSourceDir:privateKey:) [inlined] closure #2 () -> () in generate_appcast.makeAppcast(archivesSourceDir: Foundation.URL, privateKey: __ObjC.SecKey) throws -> Swift.Dictionary<Swift.String, Swift.Array<generate_appcast.ArchiveItem>> at Appcast.swift:0 [opt] frame #7: 0x000000010001f9d6 generate_appcastpartial apply for closure Testing #2 in makeAppcast(archivesSourceDir:privateKey:) at Appcast.swift:0 [opt]
      frame Sparkle runs thread-unsafe code on secondary threads #8: 0x0000000100016b00 generate_appcastthunk for @callee_owned () -> () at main.swift:0 [opt] frame #9: 0x00007fff56b86591 libdispatch.dylib_dispatch_call_block_and_release + 12
      frame Sparkle runs thread-unsafe code on secondary threads #10: 0x00007fff56b7ed50 libdispatch.dylib_dispatch_client_callout + 8 frame #11: 0x00007fff56b8bc61 libdispatch.dylib_dispatch_queue_override_invoke + 880
      frame Sparkle runs thread-unsafe code on secondary threads #12: 0x00007fff56b80941 libdispatch.dylib_dispatch_root_queue_drain + 515 frame #13: 0x00007fff56b806ed libdispatch.dylib_dispatch_worker_thread3 + 101
      frame Sparkle runs thread-unsafe code on secondary threads #14: 0x00007fff56e431ca libsystem_pthread.dylib_pthread_wqthread + 1387 frame #15: 0x00007fff56e42c4d libsystem_pthread.dylibstart_wqthread + 13
      (lldb)

I really appreciate your help!

@kornelski
Copy link
Member

The crash is now fixed in the latest pre-release: https://github.com/sparkle-project/Sparkle/releases/tag/1.19.1rc1

The root cause is that signing failed. Perhaps non-crashing appcast generator will tell you more why. If you're creating a new app, try generating DSA keys again.

@RomanMAF
Copy link

Hi! I'm afraid it's still crashing as of 1.19.1rc2.

@kornelski
Copy link
Member

Can you post the crash log? I'd expect it to be different than the last time.

@RomanMAF
Copy link

RomanMAF commented Apr 12, 2018

There you go:

(lldb) r
Process 92808 stopped

  • thread test #3, queue = 'com.apple.root.default-qos', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001004c8531 generate_appcastswift::_swift_getClass(void const*) + 33 generate_appcastswift::_swift_getClass:
    -> 0x1004c8531 <+33>: andq (%rdi), %rax
    0x1004c8534 <+36>: retq
    0x1004c8535 <+37>: nopw %cs:(%rax,%rax)

generate_appcast`swift::_swift_getClassOfAllocated:
0x1004c8540 <+0>: pushq %rbp
Target 0: (generate_appcast) stopped.

(lldb) bt

  • thread test #3, queue = 'com.apple.root.default-qos', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    • frame #0: 0x00000001004c8531 generate_appcastswift::_swift_getClass(void const*) + 33 frame #1: 0x0000000100499057 generate_appcastunwrapExistential(swift::OpaqueValue*, swift::TargetExistentialTypeMetadataswift::InProcess const*, swift::OpaqueValue*&, swift::TargetMetadataswift::InProcess const*&, bool&, bool&) + 71
      frame Testing #2: 0x0000000100492933 generate_appcastswift_dynamicCast + 595 frame #3: 0x000000010002574d generate_appcastspecialized dsaSignature(path=, privateKey=) at DSASignature.swift:52 [opt]
      frame Sparkle runs thread-unsafe code on secondary threads #4: 0x000000010001fb95 generate_appcastspecialized closure #2 in makeAppcast(archivesSourceDir:privateKey:) [inlined] generate_appcast.dsaSignature(path: Foundation.URL, privateKey: __ObjC.SecKey) throws -> Swift.String at Appcast.swift:0 [opt] frame #5: 0x000000010001fb87 generate_appcastspecialized closure Testing #2 in makeAppcast(update=, privateKey=, group=) at Appcast.swift:37 [opt]
      frame Sparkle runs thread-unsafe code on secondary threads #6: 0x000000010001f9e4 generate_appcastpartial apply for closure #2 in makeAppcast(archivesSourceDir:privateKey:) [inlined] closure #2 () -> () in generate_appcast.makeAppcast(archivesSourceDir: Foundation.URL, privateKey: __ObjC.SecKey) throws -> Swift.Dictionary<Swift.String, Swift.Array<generate_appcast.ArchiveItem>> at Appcast.swift:0 [opt] frame #7: 0x000000010001f9d6 generate_appcastpartial apply for closure Testing #2 in makeAppcast(archivesSourceDir:privateKey:) at Appcast.swift:0 [opt]
      frame Sparkle runs thread-unsafe code on secondary threads #8: 0x0000000100016b00 generate_appcastthunk for @callee_owned () -> () at main.swift:0 [opt] frame #9: 0x00007fff6d37d64a libdispatch.dylib_dispatch_call_block_and_release + 12
      frame Sparkle runs thread-unsafe code on secondary threads #10: 0x00007fff6d375e08 libdispatch.dylib_dispatch_client_callout + 8 frame #11: 0x00007fff6d382d15 libdispatch.dylib_dispatch_queue_override_invoke + 880
      frame Sparkle runs thread-unsafe code on secondary threads #12: 0x00007fff6d3779f9 libdispatch.dylib_dispatch_root_queue_drain + 515 frame #13: 0x00007fff6d3777a5 libdispatch.dylib_dispatch_worker_thread3 + 101
      frame Sparkle runs thread-unsafe code on secondary threads #14: 0x00007fff6d6c7169 libsystem_pthread.dylib_pthread_wqthread + 1387 frame #15: 0x00007fff6d6c6be9 libsystem_pthread.dylibstart_wqthread + 13

I'm running 10.13.4, latest Xcode 9.3, generate_appcast copied from 1.19.1rc2 archive.

@kornelski
Copy link
Member

That crash log still looks like from an old version. The DSASignature.swift line 52 doesn't force unwrap any more: ec7f55d

@RomanMAF
Copy link

Oh, sorry, taking that back, it was the old binary indeed.

@kornelski
Copy link
Member

Phew!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants