When cancelling a subscription to stdin, there may be pending I/O operation
that need to be explicitly cancelled before closing the stdin handle.
Otherwise the program would sit waiting for input (until CR is pressed).
Fixes dart-lang/pub#1502
Fixes#22940R=zra@google.com
Review-Url: https://codereview.chromium.org/2650063003 .
This reverts commit 7bf5d87017.
The lock introduced by this change in MallocHooksState is held across
a fork(), which causes deadlock in the child when execvpe() fails and
tries to acquire the lock when freeing memory.
Review-Url: https://codereview.chromium.org/2647793005 .
Guarded by a GN argument, this CL builds a Fuchsia OS image
that includes Dart tree, including the test suite, packages,
test harness, and sufficient build output to run through the
test suite.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2547013003 .
- Don't mark core_isolate_snapshot_buffer as a const pointer.
- Update app snapshots without code to not rewrite the VM isolate snapshot, as already done by app snapshots with code.
Fixes#28368R=asiva@google.com
Review-Url: https://codereview.chromium.org/2637193002 .
- Rename functions to make correspondence between JIT and AOT app snapshot clearer.
- Update documentation on assembly output of AOT snapshots.
- Remove old Dart_PrecompileJIT.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2611343002 .
Somtimes execve() fails and then we fall back to exit(1) in the fork()ed but not
exeve()ed subprocess.
One of the issues is e.g. that we don't want to run LSAN in the fork()ed but not
execve()ed subprocess, the results will be bogus (plus the output of
LSAN is not read on the other side (i.e. the unix pipe is not drained) which
blocks the subprocess indefinitely).
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2632483002 .
About this CL:
The only purpose of `if (fork() == 0) exit(0)` is to wake up
a thread in the parent process which might be blocked on `wait()`.
There is no need to run atexit() handlers in the `fork()`ed child.
This is a *workaround attempt* for a deadlocked `free()` call inside the
processing of atexit handlers in glibc.
(Side note: There might be better ways of notifying the thread, like sending a
signal to the particular pthread with `pthread_kill` which would make the
`wait()` syscall be interrupted.)
About the issue:
It is still unclear why, in this particular case, the tcmalloc locks should
be hold during the `exit()` call:
* via a static initializer tcmalloc uses
`pthread_atfork(before=ObtainAllLocks(),
after_parent=ReleaseAllLocks(),
after_child=ReleaseAllLocks())`
to register locking & unlocking around `fork()`
* glibc's `fork()` runs the either `after_parent` or `after_child` handlers
(unconditionally) which should free the locks
* the `exit()` call later should be free to malloc/free
The [BUG] describes more in detail how we can hit a tcmalloc deadlock in a
different situation (it's a linux kernel bug).
Namely, if the linux kernel runs OOM during `fork()` and therefore fails to
set the new thread-id. The glibc code hits an assert and tries to allocate
memory before `after_parent`/`after_child` handlers were executed which
deadlocks.
BUG=https://github.com/dart-lang/sdk/issues/28246R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2618723002 .
The analyzer has a stricter patch parser than the VM. Patch files
cannot change signatures of patched members. Specifically, they cannot
change:
- the return type
- a parameter's name
- a parameter to an initializing formal
- an optional parameter's default value
BUG=
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2612043002 .
Now, failing to allocate a buffer for stderr or stdout will generate
an ENOMEM OSError exception.
Also previously, read() returning an error would cause buffers for
stderr and stdout to leak. After this change, they'll be reclaimed.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2596543002 .