# Summary

Bug hit again, workaround works again, this time with a strace.
I suspect the workaround has a drawback: the characters it eats are lost for 
the script.
Next time I'll try dd to "lose" only one character.

Thank you for your attention.

# Details

The bug has hit again.

Here is a selected portion of

strace head /proc/7514/fd/4


open("/proc/7514/fd/4", O_RDONLY)       = 3
read(3, "\n", 8192)                     = 1
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0
write(1, "\n", 1
)                       = 1
read(3, "a", 8192)                      = 1
read(3, "a", 8192)                      = 1
read(3, "*", 8192)                      = 1
read(3, "\177", 8192)                   = 1
read(3, "e", 8192)                      = 1
read(3, "e", 8192)                      = 1
read(3, "\r", 8192)                     = 1
read(3, ^Cstrace: Process 14679 detached
 <detached ...>

The characters return by read() are what I typed on the terminal hosting
the stuck /usr/bin/script.

I think that script unlocked itself (i.e. the bug went away) as soon as
the first read() returned, but I'm not sure.


Thank you for your attention.


strace head /proc/7514/fd/4 

execve("/usr/bin/head", ["head", "/proc/7514/fd/4"], [/* 31 vars */]) = 0
brk(NULL)                               = 0x18a8000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7ff26a1f6000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=123250, ...}) = 0
mmap(NULL, 123250, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff26a1d7000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\t\2\0\0\0\0\0"..., 
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
mmap(NULL, 3971584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0x7ff269c09000
mprotect(0x7ff269dc9000, 2097152, PROT_NONE) = 0
mmap(0x7ff269fc9000, 24576, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7ff269fc9000
mmap(0x7ff269fcf000, 14848, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff269fcf000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7ff26a1d6000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7ff26a1d5000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7ff26a1d4000
arch_prctl(ARCH_SET_FS, 0x7ff26a1d5700) = 0
mprotect(0x7ff269fc9000, 16384, PROT_READ) = 0
mprotect(0x608000, 4096, PROT_READ)     = 0
mprotect(0x7ff26a1f8000, 4096, PROT_READ) = 0
munmap(0x7ff26a1d7000, 123250)          = 0
brk(NULL)                               = 0x18a8000
brk(0x18c9000)                          = 0x18c9000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3001856, ...}) = 0
mmap(NULL, 3001856, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff26992c000
close(3)                                = 0
open("/proc/7514/fd/4", O_RDONLY)       = 3
read(3, "\n", 8192)                     = 1
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0
write(1, "\n", 1
)                       = 1
read(3, "a", 8192)                      = 1
read(3, "a", 8192)                      = 1
read(3, "*", 8192)                      = 1
read(3, "\177", 8192)                   = 1
read(3, "e", 8192)                      = 1
read(3, "e", 8192)                      = 1
read(3, "\r", 8192)                     = 1
read(3, ^Cstrace: Process 14679 detached
 <detached ...>

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1558236

Title:
  /usr/bin/script freezes and eats all CPU, has to be killed, which
  kills shell and programs inside

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to