50% chance of no GUI when starting chromium
Reported by
markustr...@gmail.com,
Nov 4 2016
|
||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2902.0 Safari/537.36
Steps to reproduce the problem:
When I start chromium on my system no GUI is shown
~50% of the time. I have to kill all chrome processes
and start again until eventually a GUI is shown.
What is the expected behavior?
Show GUI every time I start chromium.
What went wrong?
strace shows chrome hangs here:
...
futex(0x7fdc770e04c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
mkdir("/home/markus/.cache", 0700) = -1 EEXIST (File exists)
futex(0x7fdc770e04c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
stat("/home/markus/.cache/bus", 0x7fff94eb0850) = -1 ENOENT (No such file or directory)
getresuid([1000], [1000], [1000]) = 0
getresgid([1000], [1000], [1000]) = 0
futex(0x7fdc770e04c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/var/lib/dbus/machine-id", O_RDONLY) = 77
fstat(77, {st_mode=S_IFREG|0644, st_size=33, ...}) = 0
read(77, "500fac476577f8a0a3d748f800000095"..., 33) = 33
close(77) = 0
pipe2([77, 78], 0) = 0
pipe2([79, 80], 0) = 0
pipe2([81, 82], O_CLOEXEC) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fdc7031f050) = 19060
close(78) = 0
close(80) = 0
close(82) = 0
read(77,
(Of course the read should succeed, because the write
end has been closed:
read(77, "", 8) = 0)
Did this work before? N/A
Chrome version: 56.0.2902.0 Channel: n/a
OS Version:
Flash Version:
,
Nov 4 2016
When the read happens before the child closes and reuses the descriptor
it works fine. So it is a race condition. Perhaps O_CLOEXEC should be
set for all pipe2 calls.
723 pipe2([79, 80], 0) = 0
723 pipe2([81, 82], 0) = 0
723 pipe2([83, 84], O_CLOEXEC) = 0
723 clone( <unfinished ...>
770 mprotect(0x7fd01ccff000, 4096, PROT_READ) = 0
723 <... clone resumed> child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f15ce3bcbd0) = 790
738 read(78, <unfinished ...>
723 close(80 <unfinished ...>
790 set_robust_list(0x7f15ce3bcbe0, 24) = 0
738 <... read resumed> "\3:\17\10\260\370\300\313\323\305\247\27\20\200\200\200\200\3:\17\10\314\243\260\257\320\300\247\27\20\200\200"..., 65536) = 65536
723 <... close resumed> ) = 0
738 read(78, <unfinished ...>
723 close(82 <unfinished ...>
738 <... read resumed> "ld Technologies - Forums - Threa"..., 65536) = 65536
723 <... close resumed> ) = 0
723 close(84 <unfinished ...>
738 read(78, <unfinished ...>
723 <... close resumed> ) = 0
738 <... read resumed> "tionary:\17\10\363\247\252\371\243\332\247\27\20\200\200\200\200\3\22s\10\243\314\r\20\1"..., 65536) = 65536
723 read(79, <unfinished ...>
738 mmap(0xb04a1dcb000, 2101248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...>
739 futex(0x55eb04543d00, FUTEX_WAIT_PRIVATE, 2, {0, 806586} <unfinished ...>
738 <... mmap resumed> ) = 0xb04a1dcb000
738 madvise(0xb04a1dcb000, 2101248, MADV_FREE) = 0
738 futex(0x55eb04543d00, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
739 <... futex resumed> ) = 0
738 <... futex resumed> ) = 1
739 futex(0x55eb04543d00, FUTEX_WAKE_PRIVATE, 1) = 0
790 rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x7f15d19d9350}, {0x55eafcd703c0, [], SA_RESTORER, 0x7f15d5568c90}, 8) = 0
790 rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTORER|SA_RESTART, 0x7f15d19d9350}, {0x55eafcd70660, [], SA_RESTORER, 0x7f15d5568c90}, 8) = 0
790 rt_sigaction(SIGTERM, {SIG_DFL, [TERM], SA_RESTORER|SA_RESTART, 0x7f15d19d9350}, {0x55eafcd706a0, [], SA_RESTORER, 0x7f15d5568c90}, 8) = 0
790 rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTORER|SA_RESTART, 0x7f15d19d9350}, {0x55eafcd70640, [], SA_RESTORER, 0x7f15d5568c90}, 8) = 0
790 rt_sigaction(SIGPIPE, {SIG_DFL, [PIPE], SA_RESTORER|SA_RESTART, 0x7f15d19d9350}, {SIG_IGN, [], SA_RESTORER, 0x7f15d5568c90}, 8) = 0
790 close(79) = 0
790 close(81) = 0
790 close(83) = 0
790 open("/proc/self/fd", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 79
790 fstat(79, {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0
790 getdents(79, /* 85 entries */, 32768) = 2040
...
723 <... read resumed> "", 8) = 0
,
Nov 8 2016
Could you please try with new profile with no apps and extensions, if you still face the chrome crash , please provide us the crash id and Chrome version details. Thanks !
,
Nov 9 2016
After debugging this further, it turned out to be a GLib issue. These pipe2 calls come from libglib-2.0.so.0. If I change them to always set the O_CLOEXEC flag, Chromium starts fine reliably. I wonder why not more folks are hitting this issue?
,
Nov 9 2016
,
Nov 16 2016
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 22 2016
,
Mar 13 2017
Cleaning up "Needs-Review" label as we are not using this label for triage. Ref bug 684919
,
Mar 13 2017
,
Mar 15 2018
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by markustr...@gmail.com
, Nov 4 2016strace -f shows: 30323 pipe2([77, 78], 0) = 0 30323 pipe2( <unfinished ...> 30376 mprotect(0x7f9f60f35000, 225280, PROT_READ <unfinished ...> 30323 <... pipe2 resumed> [79, 80], 0) = 0 30376 <... mprotect resumed> ) = 0 30323 pipe2([81, 82], O_CLOEXEC) = 0 30323 clone( <unfinished ...> 30376 futex(0x7f9f5e2472c0, FUTEX_WAKE_PRIVATE, 2147483647) = 0 30347 <... fdatasync resumed> ) = 0 30376 munmap(0x7f9f6934a000, 163087) = 0 30376 fcntl(125, F_DUPFD_CLOEXEC, 3) = 126 30376 fstat(126, {st_mode=S_IFCHR|0660, st_rdev=makedev(226, 0), ...}) = 0 30376 readlink("/sys/dev/char/226:0/device/subsystem", "../../../../bus/pci", 4096) = 19 30376 open("/dev/dri", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 127 30376 fstat(127, {st_mode=S_IFDIR|0755, st_size=100, ...}) = 0 30376 getdents(127, /* 5 entries */, 32768) = 144 30376 stat("/dev/dri/card0", {st_mode=S_IFCHR|0660, st_rdev=makedev(226, 0), ...}) = 0 30376 readlink("/sys/dev/char/226:0/device/subsystem", "../../../../bus/pci", 4096) = 19 30376 open("/sys/dev/char/226:0/device/uevent", O_RDONLY <unfinished ...> 30347 ftruncate(75, 0 <unfinished ...> 30390 set_robust_list(0x7f1500b2cbe0, 24) = 0 30347 <... ftruncate resumed> ) = 0 30323 <... clone resumed> child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1500b2cbd0) = 30390 30347 fdatasync(75 <unfinished ...> 30390 rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x7f1504149350}, {0x5571715363c0, [], SA_RESTORER, 0x7f1507cd8c90}, 8) = 0 30390 rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTORER|SA_RESTART, 0x7f1504149350}, {0x557171536660, [], SA_RESTORER, 0x7f1507cd8c90}, 8) = 0 30390 rt_sigaction(SIGTERM, {SIG_DFL, [TERM], SA_RESTORER|SA_RESTART, 0x7f1504149350}, {0x5571715366a0, [], SA_RESTORER, 0x7f1507cd8c90}, 8) = 0 30390 rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTORER|SA_RESTART, 0x7f1504149350}, {0x557171536640, [], SA_RESTORER, 0x7f1507cd8c90}, 8) = 0 30390 rt_sigaction(SIGPIPE, {SIG_DFL, [PIPE], SA_RESTORER|SA_RESTART, 0x7f1504149350}, {SIG_IGN, [], SA_RESTORER, 0x7f1507cd8c90}, 8) = 0 30390 close(77) = 0 30390 close(79) = 0 30390 close(81) = 0 30323 close(78) = 0 30390 open("/proc/self/fd", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC <unfinished ...> 30323 close(80) = 0 30390 <... open resumed> ) = 77 30323 close(82 <unfinished ...> 30390 fstat(77, <unfinished ...> 30323 <... close resumed> ) = 0 30390 <... fstat resumed> {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0 30323 read(77, <unfinished ...> 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 133155} <unfinished ...> 30387 mmap(0x366bdd3de000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x366bdd3de000 30387 madvise(0x366bdd3de000, 1048576, MADV_FREE) = 0 30390 <... futex resumed> ) = -1 ETIMEDOUT (Connection timed out) 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 4288}) = -1 ETIMEDOUT (Connection timed out) 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 527}) = -1 ETIMEDOUT (Connection timed out) 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 202324}) = -1 ETIMEDOUT (Connection timed out) 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 615283}) = -1 ETIMEDOUT (Connection timed out) 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 393173}) = -1 ETIMEDOUT (Connection timed out) 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 28087}) = -1 ETIMEDOUT (Connection timed out) 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 974683}) = -1 ETIMEDOUT (Connection timed out) 30390 futex(0x557178d09d00, FUTEX_WAIT_PRIVATE, 2, {0, 1646983} <unfinished ...> 30387 mmap(0x366bdd4de000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x366bdd4de000 30387 madvise(0x366bdd4de000, 1048576, MADV_FREE) = 0 30387 madvise(0x366bdc22e000, 20480, MADV_FREE) = 0 30387 madvise(0x366bdd2b2000, 16384, MADV_FREE) = 0 30387 madvise(0x366bdcc42000, 20480, MADV_FREE) = 0 30387 madvise(0x366bdd2b9000, 32768, MADV_FREE) = 0 30390 <... futex resumed> ) = -1 ETIMEDOUT (Connection timed out)