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

Deno (release build) always dies at 2nd await #919

Closed
kevinkassimo opened this issue Oct 5, 2018 · 2 comments
Closed

Deno (release build) always dies at 2nd await #919

kevinkassimo opened this issue Oct 5, 2018 · 2 comments
Labels
bug Something isn't working correctly

Comments

@kevinkassimo
Copy link
Contributor

kevinkassimo commented Oct 5, 2018

Run this script (echo_server.ts) using RELEASE build:

import * as deno from "deno";

const listener = deno.listen("tcp", "127.0.0.1:4545");
listener.accept().then(async (conn) => {
  await deno.copy(conn, conn);
  conn.close();
  listener.close();
});

and then try

cat package.json | nc localhost 4545

On mac, the server immediately dies, and the sending side would display

read(net): Connection reset by peer

Should be related to #888 . ntasks is unexpectedly decremented to 0 prematurely.

UPDATE:
Actually much worse. As shown in the following, the second await result would never be printed

import * as deno from "deno";

(async () => {
  console.log(await deno.stat("."));
  // Script dies here
  console.log(await deno.stat(".."));
})();
@kevinkassimo kevinkassimo changed the title TCP echo server dies before completing deno.copy Deno (release build) always dies at 2nd await Oct 5, 2018
@ry
Copy link
Member

ry commented Oct 5, 2018

Thank you. I can repeat and will work on this now.

@kevinkassimo
Copy link
Contributor Author

@ry I feel that we would want to probably create priority labels for bugs? This one I feel is definitely like a P0 bug

@ry ry added the bug Something isn't working correctly label Oct 5, 2018
ry added a commit to ry/deno that referenced this issue Oct 5, 2018
* Two fewer syscalls.
* Simpler and matches the interface to epoll_wait().
* Potentially fixes denoland#919.
ry added a commit to ry/deno that referenced this issue Oct 5, 2018
* Two fewer syscalls.
* Simpler and matches the interface to epoll_wait().
* Potentially fixes denoland#919.
ry added a commit to ry/deno that referenced this issue Oct 6, 2018
ry added a commit to ry/deno that referenced this issue Oct 6, 2018
ry added a commit to ry/deno that referenced this issue Oct 6, 2018
The fix for these wasn't immediately obvious - they seem to have been
broken already but were skipped as reported in denoland#919.
ry added a commit to ry/deno that referenced this issue Oct 6, 2018
ry pushed a commit to ry/deno that referenced this issue Oct 6, 2018
ry added a commit to ry/deno that referenced this issue Oct 6, 2018
ry added a commit to ry/deno that referenced this issue Oct 7, 2018
The fix for these wasn't immediately obvious - they seem to have been
broken already but were skipped as reported in denoland#919.
ry pushed a commit to ry/deno that referenced this issue Oct 7, 2018
ry added a commit to ry/deno that referenced this issue Oct 7, 2018
ry added a commit that referenced this issue Oct 7, 2018
The fix for these wasn't immediately obvious - they seem to have been
broken already but were skipped as reported in #919.
ry pushed a commit that referenced this issue Oct 7, 2018
@ry ry closed this as completed in 0514f54 Oct 7, 2018
ry added a commit to ry/deno that referenced this issue Oct 12, 2018
- Add --types command line flag.
- Add metrics()
- Add redirect follow feature denoland#934
- Fix clearTimer bug denoland#942
- Improve error printing denoland#935
- Expose I/O interfaces Closer, Seeker, ReaderCloser, WriteCloser,
  ReadSeeker, WriteSeeker, ReadWriteCloser, ReadWriteSeeker
- Fix silent death on double await denoland#919
- Add Conn.closeRead() and Conn.closeWrite() denoland#903
@ry ry mentioned this issue Oct 12, 2018
ry added a commit to ry/deno that referenced this issue Oct 12, 2018
- Fix promise reject issue (denoland#936)
- Add --types command line flag.
- Add metrics()
- Add redirect follow feature denoland#934
- Fix clearTimer bug denoland#942
- Improve error printing denoland#935
- Expose I/O interfaces Closer, Seeker, ReaderCloser, WriteCloser,
  ReadSeeker, WriteSeeker, ReadWriteCloser, ReadWriteSeeker
- Fix silent death on double await denoland#919
- Add Conn.closeRead() and Conn.closeWrite() denoland#903
ry added a commit that referenced this issue Oct 12, 2018
- Fix promise reject issue (#936)
- Add --types command line flag.
- Add metrics()
- Add redirect follow feature #934
- Fix clearTimer bug #942
- Improve error printing #935
- Expose I/O interfaces Closer, Seeker, ReaderCloser, WriteCloser,
  ReadSeeker, WriteSeeker, ReadWriteCloser, ReadWriteSeeker
- Fix silent death on double await #919
- Add Conn.closeRead() and Conn.closeWrite() #903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants