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

Using PkarrPublisher on the macOS platform in release mode causes a segmentation fault. #2844

Open
zh522130 opened this issue Oct 28, 2024 · 0 comments
Labels
bug Something isn't working c-iroh-net MacOS

Comments

@zh522130
Copy link
Contributor

zh522130 commented Oct 28, 2024

Environment:

  • Operating System: macOS
  • Architecture: x64_64
  • Rust Version: 1.82.0 (This probably doesn't matter, as the issue existed before the upgrade)

How to reproduce?

Use .discovery_n0() in Endpoint::builder() for any iroh-net example, and run the example in release mode on macOS.

Commenting out the following code in discovery_n0 avoids the segmentation fault:

self.discovery.push(Box::new(|secret_key| {
    Some(Box::new(PkarrPublisher::n0_dns(secret_key.clone())))
}));

Log

Log information when a segmentation fault occurs while running with lldb:

Process 14835 stopped
* thread #15, name = 'tokio-runtime-worker', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x000000010091c30f listen`_$LT$simple_dns..dns..rdata..RData$u20$as$u20$simple_dns..dns..packet_part..PacketPart$GT$::parse::hf633f606481706d4 at macros.rs:172:13 [opt]
   169                  TYPE::Unknown(rdatatype) => RData::NULL(rdatatype, NULL::parse(data, position)?),
   170              };
   171 
-> 172              Ok(rdata)
   173          }
   174 
   175 
Target 0: (listen) stopped.
warning: listen was compiled with optimization - stepping may behave oddly; variables may not be available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c-iroh-net MacOS
Projects
Status: No status
Development

No branches or pull requests

2 participants