Skip to content

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

@mohitreddy1996

Description

@mohitreddy1996

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions