connection.js line 635 infinite loop
See original GitHub issueI was using sequelize
to connect to my postgres
database. However, not paying attention, I didn’t configure the right port and username/password. That made my node.js app loop infinitely on this line. I figured this line out by using node debug
.
break in node_modules/pg/lib/connection.js:635
633 Connection.prototype.parseCString = function(buffer) {
634 var start = this.offset;
>635 while(buffer[this.offset++] !== 0) { }
636 return buffer.toString(this.encoding, start, this.offset - 1);
637 };
debug> o
break in node_modules/pg/lib/connection.js:635
633 Connection.prototype.parseCString = function(buffer) {
634 var start = this.offset;
>635 while(buffer[this.offset++] !== 0) { }
636 return buffer.toString(this.encoding, start, this.offset - 1);
637 };
debug> o
I don’t experience any other issues If I use correct connection data, so this may be a potential bug, just pointing out this discovery.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Node.js connection pool produces infinite loop on error
I have purposely set the password wrong, and when testing, I get an infinite loop of "connection failed" errors - indicating something is ......
Read more >Infinite redirect loop on access_denied error #635 - GitHub
When a user does not have permission to access an app (because no role was assigned to his account), an infinite login loop...
Read more >How to Find the Exact Line of an Infinite Loop Bug in the code
In the Summary Tab, you can find the location of this method in the file. Sync Infinite Loop is located. Asynchronous Infinite Loops....
Read more >How to get rid of Google keeping me in a infinite loop ... - Quora
I opened Walmart website and link Ibotta, started my order and after I put 3 items in my cart it wants me to...
Read more >[FIX][LUMIA]Dead Phone,Bricked bootloader,infinite boot loop ...
In previous post I have posted about unlocking bootloader and enabling root access but what if you have bricked your lumia?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I wouldn’t consider it serious troubles. It only causes an issue if you connect the driver to something that isn’t postgres at all and that backend starts sending unexpected binary data back to the driver. Kinda like doing ‘curl’ on to the port postgres is running on: ain’t gonna work. 😯
I will absolutely accept a PR if it fixes bugs or addes enhancements, has tests, and seems reasonable!
This library isn’t built to handle malformed messages at all right now. This case can be fixed by using
indexOf
instead of a manual loop, but the built-in message parsers in general don’t attempt to detect errors. @brianc, would you be interested in changes to that end?