Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Internal memory corruption #7274

@carlos-reyes-123

Description

@carlos-reyes-123

This is not the type of bug report that I like to leave, but I feel obligated to at least report what I know.

I have been working on a relatively large closed-source application using Node.js 0.11.11. It consists of about three dozen source files and about 10,000 lines of source code. The code depends on about 50 NPM packages. Up until a couple of days ago, Node 0.11 was just working great.

I just finished switching from Mongoose/MongoDb to Bookshelf/Postgresql. When I went to test the new code, within a second of the application starting it hangs with 100% CPU. Memory usage remains constant. I isolated the problem to the first database access call. Rewriting parts of my code did not help.

It is not clear to me if Bookshelf is using the native or the Javascript Postgresql driver. I also saw no way of controlling the choice.

My code makes heavy use of the yield statement. It uses Bluebird and Koa. The only Node.js command line flag is “--harmony_generators”.

I pulled out onto separate files my source code that executes up until the point of failure. This is 100% identical to the code inside the main application. It works perfectly. In fact, I could not cause the failure to occur.

In the failing code the garbage collector appears to be running repeatedly. Trying to use “node debug” did not work. It simply refuses to run my program when I say “c” for continue.

I took a snapshot of the source code and put it aside. I am working on a short deadline and this is a showstopper. I am in the process of switching to Node.js 0.10.26, swapping out Express for Koa, and removing the yield statements.

I suppose I could go back to MongoDb, but there would be no guarantee of running into the problem again. The release of Node.js 0.12 does not appear to be imminent, and I need to get on with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions