Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-terminating application after reading from stdin (unless explicitly close()'d) #1032

Closed
DartBot opened this issue Jan 3, 2012 · 8 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io

Comments

@DartBot
Copy link

DartBot commented Jan 3, 2012

This issue was originally filed by dcarlson@google.com


Behavior of readInto() on stdin seems to have changed. In an older (mid-December) version, our application could call stdin.readInto(...) and terminate. Somewhere before version 2918, the application now fails to terminate unless we add a close() method on stdin.

FYI: We have not set any handler callbacks.

Is this behavior expected/intended?

@DartBot
Copy link
Author

DartBot commented Jan 3, 2012

This comment was originally written by dcarlson@google.com


This is currently the case on at least OS/X, can try on other platforms.

@DartBot
Copy link
Author

DartBot commented Jan 4, 2012

This comment was originally written by dcarlson@google.com

@DartBot
Copy link
Author

DartBot commented Jan 5, 2012

This comment was originally written by dcarlson@google.com


Added Triaged label.

@iposva-google
Copy link
Contributor

Removed Area-Library label.
Added Area-IO label.

@madsager
Copy link
Contributor

stdin is an InputStream and you need to setup handlers to get the data. The API for all streams is asynchronous. Calling readInto when you have not received a onData callback is not guaranteed to give you anything.

This sounds like the intended behavior because you probably never read out the data. Could you provide example code so we can be sure?

@DartBot
Copy link
Author

DartBot commented Mar 20, 2012

This comment was originally written by dcarlson@google.com


I undertand this is a bad use of the API -- I just thought it should not hang.

Some time after Jan 3, this issue has been resolved and I can no longer reproduce it.

We can now close this.

Thanks,
David

@madsager
Copy link
Contributor

Added Fixed label.

@kevmoo
Copy link
Member

kevmoo commented May 14, 2014

Removed Area-IO label.
Added Area-Library, Library-IO labels.

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io labels May 14, 2014
dart-bot pushed a commit that referenced this issue Mar 22, 2021
2021-03-22 sgrekhov@unipro.ru Fixes #1032. Change place where analyzer expects COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
2021-03-22 sgrekhov@unipro.ru Fixes #1027. Typo fixed
2021-03-22 sgrekhov@unipro.ru Fixes #1026. Missed experimental flag added
2021-03-22 sgrekhov@unipro.ru Fixes SDK issue #45381. Use 32-bit int boundaries for 32-bit systems
2021-03-19 sgrekhov@unipro.ru #1024. Tests that plays with the integers not representable in JS moved to separate files. These files will be skipped on JS

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Idc63625a841f1f90b0cce5db9ca6add13e4d1192
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192303
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
dart-bot pushed a commit that referenced this issue Mar 22, 2021
This reverts commit 03e8ddd.

Reason for revert: Change to hooks does not work with Windows.

Original change's description:
> [co19] Roll co19 to ae818220b12ec9c2470519db2c7167cbe4745e12
>
> 2021-03-22 sgrekhov@unipro.ru Fixes #1032. Change place where analyzer expects COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
> 2021-03-22 sgrekhov@unipro.ru Fixes #1027. Typo fixed
> 2021-03-22 sgrekhov@unipro.ru Fixes #1026. Missed experimental flag added
> 2021-03-22 sgrekhov@unipro.ru Fixes SDK issue #45381. Use 32-bit int boundaries for 32-bit systems
> 2021-03-19 sgrekhov@unipro.ru #1024. Tests that plays with the integers not representable in JS moved to separate files. These files will be skipped on JS
>
> Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
> Change-Id: Idc63625a841f1f90b0cce5db9ca6add13e4d1192
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192303
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>

TBR=whesse@google.com,athom@google.com

Change-Id: I5f66db541034377f5d68424073282080d13fd34b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try
Cq-Include-Trybots: dart2js-nnbd-linux-x64-chrome-try
Cq-Include-Trybots: ddc-nnbd-linux-release-chrome-try
Cq-Include-Trybots: front-end-nnbd-linux-release-x64-try
Cq-Include-Trybots: vm-kernel-nnbd-linux-debug-x64-try
Cq-Include-Trybots: vm-kernel-nnbd-linux-release-simarm64-try
Cq-Include-Trybots: vm-kernel-nnbd-linux-release-x64-try
Cq-Include-Trybots: vm-kernel-nnbd-mac-release-x64-try
Cq-Include-Trybots: vm-kernel-nnbd-win-release-x64-try
Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-debug-x64-try
Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-release-simarm64-try
Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192380
Reviewed-by: William Hesse <whesse@google.com>
dart-bot pushed a commit that referenced this issue Mar 22, 2021
This reverts commit 88ee333.

Reason for revert: Hook added by mistake removed.

Original change's description:
> Revert "[co19] Roll co19 to ae818220b12ec9c2470519db2c7167cbe4745e12"
>
> This reverts commit 03e8ddd.
>
> Reason for revert: Change to hooks does not work with Windows.
>
> Original change's description:
> > [co19] Roll co19 to ae818220b12ec9c2470519db2c7167cbe4745e12
> >
> > 2021-03-22 sgrekhov@unipro.ru Fixes #1032. Change place where analyzer expects COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
> > 2021-03-22 sgrekhov@unipro.ru Fixes #1027. Typo fixed
> > 2021-03-22 sgrekhov@unipro.ru Fixes #1026. Missed experimental flag added
> > 2021-03-22 sgrekhov@unipro.ru Fixes SDK issue #45381. Use 32-bit int boundaries for 32-bit systems
> > 2021-03-19 sgrekhov@unipro.ru #1024. Tests that plays with the integers not representable in JS moved to separate files. These files will be skipped on JS
> >
> > Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
> > Change-Id: Idc63625a841f1f90b0cce5db9ca6add13e4d1192
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192303
> > Reviewed-by: William Hesse <whesse@google.com>
> > Commit-Queue: Alexander Thomas <athom@google.com>
>
> TBR=whesse@google.com,athom@google.com
>
> Change-Id: I5f66db541034377f5d68424073282080d13fd34b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try
> Cq-Include-Trybots: dart2js-nnbd-linux-x64-chrome-try
> Cq-Include-Trybots: ddc-nnbd-linux-release-chrome-try
> Cq-Include-Trybots: front-end-nnbd-linux-release-x64-try
> Cq-Include-Trybots: vm-kernel-nnbd-linux-debug-x64-try
> Cq-Include-Trybots: vm-kernel-nnbd-linux-release-simarm64-try
> Cq-Include-Trybots: vm-kernel-nnbd-linux-release-x64-try
> Cq-Include-Trybots: vm-kernel-nnbd-mac-release-x64-try
> Cq-Include-Trybots: vm-kernel-nnbd-win-release-x64-try
> Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-debug-x64-try
> Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-release-simarm64-try
> Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-release-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192380
> Reviewed-by: William Hesse <whesse@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: Ie54fde2d92d1b2cdb3b70835f1f8c17e3c5ac477
Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192384
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
copybara-service bot pushed a commit that referenced this issue Oct 17, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

file (https://github.com/google/file.dart/compare/a18ad1c..7418131):
  7418131  2023-10-11  Parker Lougheed  Remove now unnecessary glob dependency override (#226)

http (https://github.com/dart-lang/http/compare/88ec75e..7240d0a):
  7240d0a  2023-10-11  Brian Quinlan  Remove obsolete pigeon-generated file (#1032)
  827f4fe  2023-10-10  Brian Quinlan  Prepare to release cronet 0.4.0 (#1031)

native (https://github.com/dart-lang/native/compare/22f4481..757f503):
  757f503  2023-10-16  Gabriel Terwesten  Use `Logger.detached` for test loggers (#158)

sse (https://github.com/dart-lang/sse/compare/e190744..37df57d):
  37df57d  2023-10-13  Kevin Moore  Enable and fix latest lints (#91)

test (https://github.com/dart-lang/test/compare/4341470..ba050ae):
  ba050ae2  2023-10-13  Nate Bosch  Move functions to non-deprecated library (#2120)
  96e1ed2d  2023-10-13  Nate Bosch  Remove unused href field from error report (#2118)
  ae7f30e9  2023-10-13  Nate Bosch  Make compiler optional in calls to currentPlatform (#2117)

tools (https://github.com/dart-lang/tools/compare/92c5c15..ddeccf6):
  ddeccf6  2023-10-10  Elias Yishak  Handling malformed log items in log file (#175)

webdev (https://github.com/dart-lang/webdev/compare/7c2c2d7..8d48d5e):
  8d48d5ea  2023-10-13  Ben Konyi  Bump package:vm_service to ^12.0.0 (#2248)
  9102b427  2023-10-13  Anna Gringauze  Add evaluation test to webdev to catch issues with runtime debugging API (#2250)
  63c7e728  2023-10-12  Elliott Brooks  Cider expects messages from a Chrome extension to be a JS object, not a string (#2249)
  a10bf10e  2023-10-11  Devon Carew  regenerate from the latest package:mono_repo (#2247)

Change-Id: I5c16c1387b613d1e6076579b26e6b64735097b7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330662
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io
Projects
None yet
Development

No branches or pull requests

4 participants