Skip to content

EXC_BAD_INSTRUCTION in lib crypto.3.dylib when v3.1.0 is run under the debugger. v3.0.8 does not generate problem lib. (Apple M1/M2) #20753

Closed

Description

@softeky

Activity

  1. changed the title [-]EXC_BAD_INSTRUCTION in lib crypto.3.dylib when v3.1.0 is compiled from terminal. v3.0.8 does not generate problem lib.[/-] [+]EXC_BAD_INSTRUCTION in lib crypto.3.dylib when v3.1.0 is compiled from terminal. v3.0.8 does not generate problem lib. (Apple M1/M2)[/+] on Apr 17, 2023
  2. tom-cosgrove-arm commented on Apr 17, 2023

    @tom-cosgrove-arm
    Contributor

    This is a known problem which should be fixed by #20305, but which hasn't been released yet.

    Note that this should only happen when run under the debugger, which is shown in the stackoverflow question, but stated in this issue - I will edit to reflect this.

    Note that it's actually a failure of SIGILL under macOS - see the comment at the top of https://github.com/mono/mono/pull/20321/files for details

  3. changed the title [-]EXC_BAD_INSTRUCTION in lib crypto.3.dylib when v3.1.0 is compiled from terminal. v3.0.8 does not generate problem lib. (Apple M1/M2)[/-] [+]EXC_BAD_INSTRUCTION in lib crypto.3.dylib when v3.1.0 is run under the debugger. v3.0.8 does not generate problem lib. (Apple M1/M2)[/+] on Apr 17, 2023
  4. tom-cosgrove-arm commented on Apr 17, 2023

    @tom-cosgrove-arm
    Contributor

    (not sure how to set the labels for this - it's a bug report,. but for a bug that's already fixed, and other issues have mentioned this, so does that make it a duplicate?)

  5. paulidale commented on Apr 17, 2023

    @paulidale
    Contributor

    Duplicate IMO

  6. added
    triaged: bug
    branch: 3.0
    on Apr 17, 2023
  7. Bo98 commented on May 4, 2023

    @Bo98

    This is a known problem which should be fixed by #20305, but which hasn't been released yet.

    Does it need porting to the openssl-3.1 branch? Don't see the commit on that branch yet.

    (This issue appears to be labelled branch: 3.0 but it sounds like it should be branch: 3.1)

  8. added
    triaged: feature
    and removed
    triaged: bug
    on May 4, 2023
  9. t8m commented on May 4, 2023

    @t8m
    Member

    This is not really a bug. Although inconvenient for debugging, this does not affect normal execution.

    The #20305 was merged only to the master branch.

  10. added
    branch: 3.1
    triaged: refactor
    and removed
    triaged: feature
    on May 4, 2023
  11. cjnewman commented on Jun 15, 2023

    @cjnewman

    This bug just wasted a half hour of my time. It also leaves bad smell about OpenSSL project if I have to downgrade to an older version to debug on my MacBook.

    Was able to work around this by changing brew linkage in gmake file as follows:

    ifeq ($(ARCH),arm64)
    # To debug on ARM, need an older version as OpenSSL 3.1 breaks lldb         
    # OpenSSL bug: https://github.com/openssl/openssl/issues/20155                  
    # get working version with: brew install [email protected]                            
    OPENSSL_LIB_PATH:=/opt/homebrew/opt/[email protected]/lib/
    OPENSSL_INC_PATH:=/opt/homebrew/opt/[email protected]/include/
    
  12. Bo98 commented on Jun 21, 2023

    @Bo98

    Given this is a regression introduced in 3.1, is there a reduced part of #20305 that could be backported rather than the whole thing? (@tom-cosgrove-arm might know?)

    I agree and understand that a full backport is large, risky and not eligible.

    I'm asking because we've been asked on multiple occasions now downstream to withdraw OpenSSL 3.1 due to this issue.

  13. tom-cosgrove-arm commented on Jun 21, 2023

    @tom-cosgrove-arm
    Contributor

    I have a minimal fix, I just need to get it through internal review

  14. added a commit that references this issue on Jun 22, 2023
    c6e01ba
  15. tom-cosgrove-arm commented on Jun 22, 2023

    @tom-cosgrove-arm
    Contributor

    I don't think the label branch: 3.0 is right here, as there isn't a problem with 3.0, as I understand it

  16. removed
    branch: 3.0
    on Jun 23, 2023
  17. added a commit that references this issue on Jun 25, 2023
    50af729
  18. tom-cosgrove-arm commented on Jun 26, 2023

    @tom-cosgrove-arm
    Contributor

    This should be fixed by #21261, which has now been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    branch: 3.1triaged: refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions