java.io.IOException: No space left on device

nitrc.org | 3 months ago
  1. 0

    NITRC: NeuroImaging Analysis Kit (NIAK): general-discussion

    nitrc.org | 3 months ago
    java.io.IOException: No space left on device
  2. 0

    GitHub comment 16#77749820

    GitHub | 2 years ago | garaemon
    java.io.IOException: No space left on device
  3. 0

    First we start seeing these: Feb 1, 2015 7:11:00 AM hudson.model.Executor run SEVERE: Unexpected executor death java.io.IOException: No space left on device at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:300) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:220) at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:315) at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:148) at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233) at java.io.BufferedWriter.close(BufferedWriter.java:265) at hudson.util.AtomicFileWriter.close(AtomicFileWriter.java:94) at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:109) at hudson.util.TextFile.write(TextFile.java:121) at hudson.model.Job.saveNextBuildNumber(Job.java:274) at hudson.model.Job.assignBuildNumber(Job.java:332) at hudson.model.Run.<init>(Run.java:286) at hudson.model.AbstractBuild.<init>(AbstractBuild.java:167) at hudson.model.Build.<init>(Build.java:92) at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:34) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:534) at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:186) at hudson.model.AbstractProject.newBuild(AbstractProject.java:1001) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1194) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144) at hudson.model.Executor.run(Executor.java:213) Feb 1, 2015 7:13:49 AM hudson.model.AsyncPeriodicWork$1 run And then more instances get started: INFO: Excess workload after pending Spot instances: 1 Feb 1, 2015 12:39:37 PM hudson.plugins.ec2.EC2Cloud addProvisionedSlave INFO: Provisioning for AMI ami-cc8871a4; Estimated number of total slaves: 15; Estimated number of slaves for ami ami-cc8871a4: 11 Launching ami-cc8871a4 for template generic-slave-cc8871a4 Feb 1, 2015 12:39:37 PM hudson.slaves.NodeProvisioner$StandardStrategyImpl apply INFO: Started provisioning generic-slave-cc8871a4 (ami-cc8871a4) from ec2-us-east-1 with 1 executors. Remaining excess workload: -0.07 Feb 1, 2015 12:39:37 PM hudson.plugins.ec2.SlaveTemplate provisionOndemand INFO: Launching ami-cc8871a4 for template generic-slave-cc8871a4 Looking for existing instances with describe-instance: {InstanceIds: [],Filters: [{Name: image-id,Values: [ami-cc8871a4]}, {Name: instance.group-name,Values: [default, build_slaves]}, {N ame: key-name,Values: [artsy_build_keypair]}, {Name: instance-type,Values: [c1.medium]}, {Name: tag:Name,Values: [build-slave-20140619]}, {Name: instance-state-name,Values: [stopped, sto pping]}],} No existing instance found - created: {InstanceId: i-988b7077,ImageId: ami-cc8871a4,State: {Code: 0,Name: pending},PrivateDnsName: ,PublicDnsName: ,StateTransitionReason: ,KeyName: artsy _build_keypair,AmiLaunchIndex: 0,ProductCodes: [],InstanceType: c1.medium,LaunchTime: Sun Feb 01 12:39:38 EST 2015,Placement: {AvailabilityZone: us-east-1a,GroupName: ,Tenancy: default}, KernelId: aki-88aa75e1,Monitoring: {State: disabled},StateReason: {Code: pending,Message: pending},Architecture: x86_64,RootDeviceType: ebs,RootDeviceName: /dev/sda1,BlockDeviceMappings: [],VirtualizationType: paravirtual,ClientToken: ddc70314-0aff-4d43-8f84-ce4658bf01b5,Tags: [{Key: Name,Value: build-slave-20140619}],SecurityGroups: [{GroupName: default,GroupId: sg-4fc 61326}, {GroupName: build_slaves,GroupId: sg-b751d4df}],Hypervisor: xen,NetworkInterfaces: [],EbsOptimized: false,} Feb 1, 2015 12:39:38 PM hudson.plugins.ec2.SlaveTemplate provisionOndemand INFO: No existing instance found - created: {InstanceId: i-988b7077,ImageId: ami-cc8871a4,State: {Code: 0,Name: pending},PrivateDnsName: ,PublicDnsName: ,StateTransitionReason: ,KeyName: artsy_build_keypair,AmiLaunchIndex: 0,ProductCodes: [],InstanceType: c1.medium,LaunchTime: Sun Feb 01 12:39:38 EST 2015,Placement: {AvailabilityZone: us-east-1a,GroupName: ,Tenancy: def ault},KernelId: aki-88aa75e1,Monitoring: {State: disabled},StateReason: {Code: pending,Message: pending},Architecture: x86_64,RootDeviceType: ebs,RootDeviceName: /dev/sda1,BlockDeviceMap pings: [],VirtualizationType: paravirtual,ClientToken: ddc70314-0aff-4d43-8f84-ce4658bf01b5,Tags: [{Key: Name,Value: build-slave-20140619}],SecurityGroups: [{GroupName: default,GroupId: sg-4fc61326}, {GroupName: build_slaves,GroupId: sg-b751d4df}],Hypervisor: xen,NetworkInterfaces: [],EbsOptimized: false,} Now it will keep spawning instances again and again until EC2 stops giving it more (ours is set to a 50 instance limit for example).

    Jenkins JIRA | 2 years ago | Daniel Doubrovkine
    java.io.IOException: No space left on device
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    First we start seeing these: Feb 1, 2015 7:11:00 AM hudson.model.Executor run SEVERE: Unexpected executor death java.io.IOException: No space left on device at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:300) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:220) at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:315) at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:148) at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233) at java.io.BufferedWriter.close(BufferedWriter.java:265) at hudson.util.AtomicFileWriter.close(AtomicFileWriter.java:94) at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:109) at hudson.util.TextFile.write(TextFile.java:121) at hudson.model.Job.saveNextBuildNumber(Job.java:274) at hudson.model.Job.assignBuildNumber(Job.java:332) at hudson.model.Run.<init>(Run.java:286) at hudson.model.AbstractBuild.<init>(AbstractBuild.java:167) at hudson.model.Build.<init>(Build.java:92) at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:34) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:534) at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:186) at hudson.model.AbstractProject.newBuild(AbstractProject.java:1001) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1194) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144) at hudson.model.Executor.run(Executor.java:213) Feb 1, 2015 7:13:49 AM hudson.model.AsyncPeriodicWork$1 run And then more instances get started: INFO: Excess workload after pending Spot instances: 1 Feb 1, 2015 12:39:37 PM hudson.plugins.ec2.EC2Cloud addProvisionedSlave INFO: Provisioning for AMI ami-cc8871a4; Estimated number of total slaves: 15; Estimated number of slaves for ami ami-cc8871a4: 11 Launching ami-cc8871a4 for template generic-slave-cc8871a4 Feb 1, 2015 12:39:37 PM hudson.slaves.NodeProvisioner$StandardStrategyImpl apply INFO: Started provisioning generic-slave-cc8871a4 (ami-cc8871a4) from ec2-us-east-1 with 1 executors. Remaining excess workload: -0.07 Feb 1, 2015 12:39:37 PM hudson.plugins.ec2.SlaveTemplate provisionOndemand INFO: Launching ami-cc8871a4 for template generic-slave-cc8871a4 Looking for existing instances with describe-instance: {InstanceIds: [],Filters: [{Name: image-id,Values: [ami-cc8871a4]}, {Name: instance.group-name,Values: [default, build_slaves]}, {N ame: key-name,Values: [artsy_build_keypair]}, {Name: instance-type,Values: [c1.medium]}, {Name: tag:Name,Values: [build-slave-20140619]}, {Name: instance-state-name,Values: [stopped, sto pping]}],} No existing instance found - created: {InstanceId: i-988b7077,ImageId: ami-cc8871a4,State: {Code: 0,Name: pending},PrivateDnsName: ,PublicDnsName: ,StateTransitionReason: ,KeyName: artsy _build_keypair,AmiLaunchIndex: 0,ProductCodes: [],InstanceType: c1.medium,LaunchTime: Sun Feb 01 12:39:38 EST 2015,Placement: {AvailabilityZone: us-east-1a,GroupName: ,Tenancy: default}, KernelId: aki-88aa75e1,Monitoring: {State: disabled},StateReason: {Code: pending,Message: pending},Architecture: x86_64,RootDeviceType: ebs,RootDeviceName: /dev/sda1,BlockDeviceMappings: [],VirtualizationType: paravirtual,ClientToken: ddc70314-0aff-4d43-8f84-ce4658bf01b5,Tags: [{Key: Name,Value: build-slave-20140619}],SecurityGroups: [{GroupName: default,GroupId: sg-4fc 61326}, {GroupName: build_slaves,GroupId: sg-b751d4df}],Hypervisor: xen,NetworkInterfaces: [],EbsOptimized: false,} Feb 1, 2015 12:39:38 PM hudson.plugins.ec2.SlaveTemplate provisionOndemand INFO: No existing instance found - created: {InstanceId: i-988b7077,ImageId: ami-cc8871a4,State: {Code: 0,Name: pending},PrivateDnsName: ,PublicDnsName: ,StateTransitionReason: ,KeyName: artsy_build_keypair,AmiLaunchIndex: 0,ProductCodes: [],InstanceType: c1.medium,LaunchTime: Sun Feb 01 12:39:38 EST 2015,Placement: {AvailabilityZone: us-east-1a,GroupName: ,Tenancy: def ault},KernelId: aki-88aa75e1,Monitoring: {State: disabled},StateReason: {Code: pending,Message: pending},Architecture: x86_64,RootDeviceType: ebs,RootDeviceName: /dev/sda1,BlockDeviceMap pings: [],VirtualizationType: paravirtual,ClientToken: ddc70314-0aff-4d43-8f84-ce4658bf01b5,Tags: [{Key: Name,Value: build-slave-20140619}],SecurityGroups: [{GroupName: default,GroupId: sg-4fc61326}, {GroupName: build_slaves,GroupId: sg-b751d4df}],Hypervisor: xen,NetworkInterfaces: [],EbsOptimized: false,} Now it will keep spawning instances again and again until EC2 stops giving it more (ours is set to a 50 instance limit for example).

    Jenkins JIRA | 2 years ago | Daniel Doubrovkine
    java.io.IOException: No space left on device
  6. 0

    FULL PRODUCT VERSION : java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode) ADDITIONAL OS VERSION INFORMATION : Linux <host> 3.2.45-0.6.acc.624.45.283.amzn1acc.x86_64 #1 SMP Fri Nov 21 22:39:25 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux A DESCRIPTION OF THE PROBLEM : When writing to a file and a disk full condition occurs, the file is not properly closed and the handle is leaked even though a try-with-resources is used. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : use Files.newBufferedWriter() in a try with resources construct. Write until disk full. Check to see if file has been properly closed by checking open files. You can check open files on Linux like this: sudo lsof -a +L1 / (grep for the filename) EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - File should not be open, because the try with resources construct should have closed the file. ACTUAL - File remains open as reported by: sudo lsof -a +L1 / ERROR MESSAGES/STACK TRACES THAT OCCUR : This exception is generated: java.io.IOException: No space left on device at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:60) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) at sun.nio.ch.IOUtil.write(IOUtil.java:65) at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:210) at java.nio.channels.Channels.writeFullyImpl(Channels.java:78) at java.nio.channels.Channels.writeFully(Channels.java:101) at java.nio.channels.Channels.access$000(Channels.java:61) at java.nio.channels.Channels$1.write(Channels.java:174) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207) at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129) at java.io.BufferedWriter.write(BufferedWriter.java:230) at java.io.Writer.write(Writer.java:157) [... snip application level info ...] Suppressed: java.io.IOException: No space left on device at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:60) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) at sun.nio.ch.IOUtil.write(IOUtil.java:65) at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:210) at java.nio.channels.Channels.writeFullyImpl(Channels.java:78) at java.nio.channels.Channels.writeFully(Channels.java:101) at java.nio.channels.Channels.access$000(Channels.java:61) at java.nio.channels.Channels$1.write(Channels.java:174) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:316) at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149) at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233) at java.io.BufferedWriter.close(BufferedWriter.java:266) [... snip application level info ...] ... 4 more REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- Run this junit test. Set the path to a disk with limited space to save time. When disk is full, the IOException will be printed. Then, while the test continues to sleep, before termination, check for open files. ----------------------------------- import java.io.BufferedWriter; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.junit.Test; public class DiskFullTest { @Test public void diskFullTest() throws IOException, InterruptedException { StringBuffer text = new StringBuffer(); for (int i = 0; i < 10000; i++) { text.append("HelloWorld! "); } String bigString = text.toString(); Path tempFile = Files.createTempFile(Paths.get("/tmp"), "diskFullTest", null); try (BufferedWriter writer = Files.newBufferedWriter(tempFile, StandardCharsets.UTF_8)) { while (true) { writer.write(bigString); writer.newLine(); } } catch (IOException e) { System.out.println("Exception: " + e); } // Sleep while I check file handles Thread.sleep(30000); // Of course file handles are released when the JVM exits } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : No workaround known.

    JDK Bug System | 1 year ago | Webbug Group
    java.io.IOException: No space left on device

  1. Prakash Premkumar 1 times, last 9 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    No space left on device

    at java.io.FileOutputStream.writeBytes()
  2. Java RT
    BufferedWriter.close
    1. java.io.FileOutputStream.writeBytes(Native Method)
    2. java.io.FileOutputStream.write(FileOutputStream.java:260)
    3. sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
    4. sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:297)
    5. sun.nio.cs.StreamEncoder.close(StreamEncoder.java:130)
    6. java.io.OutputStreamWriter.close(OutputStreamWriter.java:216)
    7. java.io.BufferedWriter.close(BufferedWriter.java:248)
    7 frames