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

Panic post upgrading from rustc 1.66 to later versions on MacOS #328

Open
mohitreddy1996 opened this issue Sep 24, 2023 · 0 comments
Open

Comments

@mohitreddy1996
Copy link

Error - thread 'main' panicked at 'assertion failed: self.port == MACH_PORT_NULL', /Users/mohitreddy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ipc-channel-0.17.0/src/platform/macos/mod.rs:602:9

Saw the above errors with the following versions of rustc -

rustc -V
rustc 1.68.2 (9eb3afe9e 2023-03-27)

rustc -V
rustc 1.70.0 (90c541806 2023-05-31)

rustc -V
rustc 1.72.0 (5680fa18f 2023-08-23)

Sample code (happy to provide more detailed code if required, but IMO the setup looks correct. We have been running the same code for sometime now on local machines).

Code which setups the OneShot server and is the main process -

    let (server, sname) = IpcOneShotServer::new().unwrap();
    let (_, x): (_, IpcReceiver<T>) = server.accept().unwrap();
    
    // we keep x around and use it to receive data on it

Code with the producer of the channel. This is run as child process -

    let tx0 = IpcSender::connect(server_name)?;
    let (tx1, rx1): (
        IpcSender<T>,
        IpcReceiver<T>,
    ) = ipc_channel::ipc::channel().unwrap();
    tx0.send(rx1).unwrap();

    // we keep tx1 around

Versions which seem to work ipc-channel crate 1.16.0 and rustc 1.66.0. NOTE: ipc-channel 1.17.0 fails with the same error on rustc 1.66.0.

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

1 participant