Skip to content

macOS reports "RPC struct is bad (errno=72)" error due to unhandled IOException #164

@kohlschuetter

Description

@kohlschuetter

When trying to write data using LocalFileSystem, certain IOExceptions are not caught, such as "No space left on device".

They are thrown up the chain but not handled properly. This causes "RPC struct is bad (errno=72)" to be returned on macOS.

java.io.IOException: No space left on device
	at java.base/sun.nio.ch.FileDispatcherImpl.pwrite0(Native Method)
	at java.base/sun.nio.ch.FileDispatcherImpl.pwrite(FileDispatcherImpl.java:68)
	at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:130)
	at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:97)
	at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:67)
	at java.base/sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:878)
	at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:864)
	at org.dcache.nfs4j.server.LocalFileSystem.write(LocalFileSystem.java:460)
	at org.dcache.nfs.vfs.VirtualFileSystem.write(VirtualFileSystem.java:319)
	at org.dcache.nfs.vfs.VirtualFileSystem.write(VirtualFileSystem.java:335)
	at org.dcache.nfs.vfs.PseudoFs.write(PseudoFs.java:420)
	at org.dcache.nfs.v4.OperationWRITE.process(OperationWRITE.java:90)
	at org.dcache.nfs.v4.AbstractOperationExecutor.execute(AbstractOperationExecutor.java:58)
	at org.dcache.nfs.v4.NFSServerV41.NFSPROC4_COMPOUND_4(NFSServerV41.java:196)
	at org.dcache.nfs.v4.xdr.nfs4_prot_NFS4_PROGRAM_ServerStub.dispatchOncRpcCall(nfs4_prot_NFS4_PROGRAM_ServerStub.java:49)
	at org.dcache.oncrpc4j.rpc.RpcDispatcher$1.run(RpcDispatcher.java:122)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

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