Also encountering this issue with "tail -f <log>", for a log file
produced by a script with a LOT of rapid output.

Similar issues happen with a simple bash builtin like "read -s -t 1 -N 1
<var>": it periodically gets in a state where it immediately reports
"read: 0: read failed: Resource temporarily unavailable".  I initially
noticed this with a log watcher script that periodically (every 1s)
gathers the tail-end of a log file (same one I'm monitoring with "tail
-f" above), then checks for single-character user commands between log
polling cycles.  I verified that stdin was NOT left in a non-blocking
state and managed to reproduce it without even watching the log file or
doing anything else (just a tight loop with the above "read" command).
This happens a lot more frequently than "tail -f" getting interrupted
above, and the event tends to repeat in bursts.

This has so far happened under MATE Terminal and konsole, with or
without byobu.  It does not happen with other distros I've tried.
Nothing amiss appears in the system/kernel logs around this time either.
Load average on this system commonly reaches 10-16 with almost no swap
usage (it's an 8-core+8-thread machine doing various CI builds).  I have
yet to try it on a text-only TTY, but I suppose I could try that next.

System info: Ubuntu 18.04.2
Linux motsognir 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 
x86_64 x86_64 x86_64 GNU/Linux

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/151440

Title:
  standard output: Resource temporarily unavailable

Status in linux package in Ubuntu:
  Incomplete

Bug description:
  I am running Gutsy, upgraded on the 9 October 2007.
  The current kernel is:
  Linux version 2.6.22-14-generic (buildd@palmer) (gcc version 4.1.3 20070929 
(prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Oct 9 09:51:52 GMT 2007

  I have an amd x2, but I am running the 32 bit OS (or so I think).

  Currently I have KSysguard, Firefox, emacs and Rhythmbox running.

  I am developing using tcl scripting. I run my tcl script from an
  xterm, with output teed to a log file in the form:

  ./tcl_script | tee log_file

  The script produces a lot of output, quite fast. Around 50% of the times the 
script stops and I get the message:
  "tee: write error"

  Sometimes I see also: "tee: standard output: Resource temporarily
  unavailable"

  I get the following message

  The error seems to disappear if I redirect the output of tee to a file
  in the way:

  ./tcl_script | tee log_file > file

  
  This same script is working fine in other machines (Solaris). I do not attach 
the script since it is actually a very big test suite.

  
  more information

   lspci
  00:00.0 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a1)
  00:01.0 ISA bridge: nVidia Corporation MCP61 LPC Bridge (rev a2)
  00:01.1 SMBus: nVidia Corporation MCP61 SMBus (rev a2)
  00:01.2 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a2)
  00:02.0 USB Controller: nVidia Corporation MCP61 USB Controller (rev a2)
  00:02.1 USB Controller: nVidia Corporation MCP61 USB Controller (rev a2)
  00:04.0 PCI bridge: nVidia Corporation MCP61 PCI bridge (rev a1)
  00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
  00:06.0 IDE interface: nVidia Corporation MCP61 IDE (rev a2)
  00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)
  00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
  00:08.1 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
  00:09.0 PCI bridge: nVidia Corporation MCP61 PCI Express bridge (rev a2)
  00:0b.0 PCI bridge: nVidia Corporation MCP61 PCI Express bridge (rev a2)
  00:0c.0 PCI bridge: nVidia Corporation MCP61 PCI Express bridge (rev a2)
  00:0d.0 VGA compatible controller: nVidia Corporation GeForce 6100 nForce 430 
(rev a2)
  00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] 
HyperTransport Technology Configuration
  00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] 
Address Map
  00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM 
Controller
  00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] 
Miscellaneous Control

  
  lsmod

  Module                  Size  Used by
  nls_iso8859_1           5120  1 
  nls_cp437               6784  1 
  vfat                   14080  1 
  fat                    54300  1 vfat
  af_packet              24840  2 
  rfcomm                 42136  2 
  l2cap                  26240  11 rfcomm
  bluetooth              57060  4 rfcomm,l2cap
  sr_mod                 17828  0 
  ipv6                  273892  14 
  powernow_k8            16960  1 
  cpufreq_ondemand        9612  1 
  cpufreq_powersave       2688  0 
  cpufreq_conservative     8072  0 
  cpufreq_userspace       5280  0 
  cpufreq_stats           7232  0 
  freq_table              5792  3 powernow_k8,cpufreq_ondemand,cpufreq_stats
  sbs                    19592  0 
  dock                   10656  0 
  ac                      6148  0 
  video                  18060  0 
  button                  8976  0 
  container               5504  0 
  battery                11012  0 
  w83627ehf              19984  0 
  i2c_isa                 5248  1 w83627ehf
  lp                     12580  0 
  usb_storage            73024  3 
  snd_hda_intel         263712  4 
  snd_pcm_oss            44672  0 
  snd_mixer_oss          17664  1 snd_pcm_oss
  snd_pcm                80388  3 snd_hda_intel,snd_pcm_oss
  snd_seq_dummy           4740  0 
  snd_seq_oss            33152  0 
  snd_seq_midi            9600  0 
  serio_raw               8068  0 
  ide_cd                 32672  0 
  cdrom                  37536  2 sr_mod,ide_cd
  snd_rawmidi            25728  1 snd_seq_midi
  psmouse                39952  0 
  snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
  parport_pc             37412  1 
  parport                37448  2 lp,parport_pc
  nvidia               6221648  34 
  k8temp                  6656  0 
  pcspkr                  4224  0 
  snd_seq                53232  6 
snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
  agpgart                35016  1 nvidia
  snd_timer              24324  3 snd_pcm,snd_seq
  snd_seq_device          9228  5 
snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
  snd                    54660  15 
snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
  i2c_nforce2             7040  0 
  i2c_core               26112  4 w83627ehf,i2c_isa,nvidia,i2c_nforce2
  shpchp                 34580  0 
  pci_hotplug            32704  1 shpchp
  soundcore               8800  1 snd
  snd_page_alloc         11400  2 snd_hda_intel,snd_pcm
  evdev                  11136  3 
  ext3                  133896  3 
  jbd                    60456  1 ext3
  mbcache                 9732  1 ext3
  sg                     36764  0 
  sd_mod                 30336  9 
  libusual               18448  1 usb_storage
  sata_nv                20612  2 
  amd74xx                15260  0 [permanent]
  ide_core              116804  3 usb_storage,ide_cd,amd74xx
  ata_generic             8452  0 
  libata                125168  2 sata_nv,ata_generic
  scsi_mod              147084  5 sr_mod,usb_storage,sg,sd_mod,libata
  ohci_hcd               22916  0 
  forcedeth              51592  0 
  ehci_hcd               36108  0 
  usbcore               138248  5 usb_storage,libusual,ohci_hcd,ehci_hcd
  thermal                14344  1 
  processor              32072  2 powernow_k8,thermal
  fan                     5764  1 
  fuse                   47124  1 
  apparmor               40728  0 
  commoncap               8320  1 apparmor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/151440/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to