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

Manticore 6.2.0 WARNING: conn (local)(12), sock=8088: bailing on failed MySQL header, AsyncNetInputBuffer_c::AppendData: error 11 (Resource temporarily unavailable) return -1 #1337

Closed
masarinetwork opened this issue Aug 6, 2023 · 5 comments
Assignees

Comments

@masarinetwork
Copy link

There is an error on on searchd.log after Upgrade to 6.2.0 from 6.0.4.

[Sun Aug 6 21:10:14.727 2023] [17639] WARNING: conn (local)(12), sock=8088: bailing on failed MySQL header, AsyncNetInputBuffer_c::AppendData: error 11 (Resource temporarily unavailable) return -1
[Sun Aug 6 21:10:14.727 2023] [17639] WARNING: send() failed: 32: Broken pipe, sock=8088
[Sun Aug 6 21:10:17.733 2023] [17643] WARNING: conn (local)(113), sock=8189: bailing on failed MySQL header, AsyncNetInputBuffer_c::AppendData: error 11 (Resource temporarily unavailable) return -1
[Sun Aug 6 21:10:17.733 2023] [17643] WARNING: send() failed: 32: Broken pipe, sock=8189
[Sun Aug 6 21:10:28.739 2023] [17650] WARNING: conn (local)(145), sock=8221: bailing on failed MySQL header, AsyncNetInputBuffer_c::AppendData: error 11 (Resource temporarily unavailable) return -1
[Sun Aug 6 21:10:28.739 2023] [17650] WARNING: send() failed: 32: Broken pipe, sock=8221
[Sun Aug 6 21:10:44.758 2023] [17646] WARNING: conn (local)(38), sock=8114: bailing on failed MySQL header, AsyncNetInputBuffer_c::AppendData: error 11 (Resource temporarily unavailable) return -1

Run on Centos 7 with with 12 CPU, 256 GB RAM, Local Index.

@tomatolog
Copy link
Contributor

what client do you use for this warning to pop up?

@masarinetwork
Copy link
Author

I use PHP PDO, connect using Socket rather than Port 9306. Work fine on Manticore 6.0.4 and before. Downgraded to 6.0.4 and work fine.

@Dlahacz
Copy link

Dlahacz commented Aug 10, 2023

Hi,
Having similar issue
searchD log

WARNING: conn 172.18.0.5:41654(4), sock=64: bailing on failed MySQL header, invalid size read 4(-1)
WARNING: conn 172.18.0.5:36090(5), sock=65: bailing on failed MySQL header, invalid size read 4(-1)

Node.js with mysql2 library crashing with

Warning: got packets out of order. Expected 2 but received 1
[1691497927803] FATAL (adonis-api/64 on a018f2a931f2): "uncaughtException" detected
    Error: bailing on failed MySQL header, invalid size read 4(-1)
        at Connection.protocolError (/home/node/app/node_modules/mysql2/lib/connection.js:394:17)
        at Connection.handlePacket (/home/node/app/node_modules/mysql2/lib/connection.js:445:14)
        at PacketParser.onPacket (/home/node/app/node_modules/mysql2/lib/connection.js:85:12)
        at PacketParser.executeStart (/home/node/app/node_modules/mysql2/lib/packet_parser.js:75:16)
        at Socket.<anonymous> (/home/node/app/node_modules/mysql2/lib/connection.js:92:25)
        at Socket.emit (node:events:390:28)
        at Socket.emit (node:domain:475:12)
        at addChunk (node:internal/streams/readable:315:12)
        at readableAddChunk (node:internal/streams/readable:289:9)
        at Socket.Readable.push (node:internal/streams/readable:228:10)
[1691497927805] WARN (adonis-api/64 on a018f2a931f2): pino.final with prettyPrint does not support flushing

/home/node/app/node_modules/mysql2/lib/connection.js:394
    const err = new Error(message);
                ^
Error: bailing on failed MySQL header, invalid size read 4(-1)
    at Connection.protocolError (/home/node/app/node_modules/mysql2/lib/connection.js:394:17)
    at Connection.handlePacket (/home/node/app/node_modules/mysql2/lib/connection.js:445:14)
    at PacketParser.onPacket (/home/node/app/node_modules/mysql2/lib/connection.js:85:12)
    at PacketParser.executeStart (/home/node/app/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/node/app/node_modules/mysql2/lib/connection.js:92:25)
    at Socket.emit (node:events:390:28)
    at Socket.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
[ warn ]  Underlying HTTP server died with "1 code"

@sanikolaev
Copy link
Collaborator

There is an error

This is not an error, but a warning. You can easily reproduce it by mysql -P9306 -h0 + kill 9 the mysql client. The warning usually means that you don't properly close a connection to Manticore in the application.

Node.js with mysql2 library crashing with

Can't reproduce:

root@dffc10fad50b:~/test# cat script
var mysql = require('mysql');

// Create a connection pool
var con = mysql.createConnection({
    host: '127.0.0.1',
    port: 9306
});

con.connect(function(err) {
  if (err) throw err;
  console.log("Connected!");
  con.query("SHOW TABLES", function (err, result) {
    if (err) throw err;
    console.log("Result: " + result);
    con.end();
  });
});
root@dffc10fad50b:~/test# node script
Connected!
Result: [object Object]

Please provide a script to reproduce the crash.

@sanikolaev sanikolaev added the waiting Waiting for the original poster (in most cases) or something else label Aug 14, 2023
@tomatolog tomatolog self-assigned this Aug 14, 2023
@tomatolog
Copy link
Contributor

should be fixed at 0a880563 and now bailing on failed MySQL header should not appear in the daemon log in regular log verbosity

@sanikolaev sanikolaev added rel::6.2.12 and removed waiting Waiting for the original poster (in most cases) or something else labels Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants