Skip to content

Crash at sending of 6th message #1

@bvandergiessen

Description

@bvandergiessen

The first 5 messages are sent without problems, but at the 6th the program completely crashes - not in the way a Node.js program normally exits with an error, but it seems to be the interpreter itself crashing:

node: malloc.c:2372: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & pagemask) == 0)' failed.
Aborted

This is under Node v7.9.0 on a Raspberry Pi 3 running Raspbian GNU/Linux 8.0 (jessie).

The behavior is reproducible: it's always at the 6th message. The first five arrive correctly. I think my code is according to the instructions: at the start of the program it does

var svmq = require('svmq');
var inqueue = new svmq(55809);
var sendarray = new Uint8Array(16);

and after that, each time a message must be sent, sendarray is populated with the right data, after which this is run:

inqueue.push(Buffer.from(sendarray), {type: 3}, (err) => {
    		if (err) console.log('Error: '+err);
    		else console.log('Command put on the message queue');
    	});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions