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

Hard exception when destroying a HTTP/2 stream on aborted event #35306

Closed
szmarczak opened this issue Sep 22, 2020 · 2 comments
Closed

Hard exception when destroying a HTTP/2 stream on aborted event #35306

szmarczak opened this issue Sep 22, 2020 · 2 comments
Labels
http2 Issues or PRs related to the http2 subsystem.

Comments

@szmarczak
Copy link
Member

  • Version: 12.18.4, 10.22.1
  • Platform: Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux
  • Subsystem: http2

What steps will reproduce the bug?

const http2 = require('http2');

const server = http2.createServer((request, response) => {
    response.destroy();
});

server.listen(() => {
    const session = http2.connect(`http://localhost:${server.address().port}`);
    const request = session.request({
        ':method': 'POST'
    });
    
    request.once('aborted', () => {
        request.destroy();
    });
    
    setTimeout(() => {
        server.close();
    }, 100);
});

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior?

What do you see instead?

internal/http2/core.js:522
    if (stream[kSession][kType] === NGHTTP2_SESSION_SERVER &&
                        ^

TypeError: Cannot read property 'Symbol(type)' of undefined
    at Http2Stream.onStreamClose (internal/http2/core.js:522:25)

Additional information

This is fixed on Node.js 14.

@szmarczak szmarczak changed the title Hard rejection when destroying a HTTP/2 stream on aborted event Hard exception when destroying a HTTP/2 stream on aborted event Sep 22, 2020
szmarczak added a commit to szmarczak/http2-wrapper that referenced this issue Sep 22, 2020
@watilde watilde added the http2 Issues or PRs related to the http2 subsystem. label Sep 26, 2020
@gireeshpunathil
Copy link
Member

@nodejs/http2

@mcollina
Copy link
Member

I verified and this is not happening on Node v14, v16 and master. I'm closing this on the ground that the fix would likely not get backported to v12 as it's in maintenance now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants