Coder Social home page Coder Social logo

Warning that lead to process hung about mysql HOT 10 CLOSED

amphp avatar amphp commented on July 18, 2024
Warning that lead to process hung

from mysql.

Comments (10)

bwoebi avatar bwoebi commented on July 18, 2024

Depending on where in the code this originates from, it indeed may lead to every query being stalled permanently as well as the related Promises obviously then.

Would be quite important to know when this happens; to start a backtrace for the context would help a lot. (e.g. an error handler calling print new \Exception;)
Also, try setting define("MYSQL_DEBUG", true);. This will log the whole raw protocol I/O stream to stderr.

Thanks :-)

from mysql.

dbalabka avatar dbalabka commented on July 18, 2024

@bwoebi it finally have stopped with uncatched exception:

  Loop stopped without resolving the promise

Exception trace:
 () at /home/sites/dmitry.balabka/src/internal-search/vendor/amphp/amp/lib/functions.php:164
 Amp\Promise\wait()
... [remaining stacktrace related to application methods calls] ...

I will try to get MySQL protocol dump

from mysql.

dbalabka avatar dbalabka commented on July 18, 2024

@bwoebi the last message from MySQL log. I have obfuscated the data

in: 7b 0 0 6d 0 0 0 38 50 0 0 8e 6 0 0 64 c 0 0 22 41 61 61 61 61 61 61 61 61 61 61 20 41 42 43 2D 31 20 42 62 62 62 62 62 20 43 63 63 63 63 63 63 63 63 1d 61 61 61 61 61 61 61 61 61 61 61 2D 61 62 63 2D 31 2D 62 62 62 62 62 62 2D 63 63 63 63 22 41 61 61 61 61 61 61 61 61 61 61 20 41 42 43 2D 31 20 42 62 62 62 62 62 3f 0 78 9c d5 5b 79 90 14 d5 19 ff 14 5c 34 12 92 a2 
len: 123 string(123) "...8P..�...d..."Aaaaaaaaaaa ABC-1 Bbbbbb Ccccccccc.aaaaaaaaaaa-abc-1-bbbbbb-cccc"Aaaaaaaaaaa ABC-1 Bbbbbb?.x��[y�.�.�.\4.��"

from mysql.

bwoebi avatar bwoebi commented on July 18, 2024

I suppose this is a binary result set row packet. I do not have any information about the columns, so this is useless for me.

I need to know what format the columns it tries to parse have, otherwise this is just binary gibberish. (basically: give me more log data. If it contains sensitive data, feel free to mail me at [email protected] instead.)

Also: I meant a backtrace from within the Warning.

from mysql.

bwoebi avatar bwoebi commented on July 18, 2024

@torinaki ping - do you have any further information for me here?

from mysql.

dbalabka avatar dbalabka commented on July 18, 2024

@bwoebi here is trace:

Warning: unpack(): Type V: not enough input, need 4, have 1 in ./vendor/amphp/mysql/lib/DataTypes.php on line 293
Exception in ./vendor/amphp/mysql/lib/DataTypes.php:296
Stack trace:
#0 ./vendor/amphp/mysql/lib/Processor.php(995): Amp\Mysql\DataTypes::decode_unsigned24('')
#1 [internal function]: Amp\Mysql\Processor->parseCompression()
#2 ./vendor/amphp/mysql/lib/Processor.php(950): Generator->send('V\x0F\x00\x03\x00@\x00x\x9C\xAD[ip\x1C\xC5...')
#3 ./vendor/amphp/amp/lib/Loop/NativeDriver.php(162): Amp\Mysql\Processor->onRead('t', Resource id #609, NULL)
#4 ./vendor/amphp/amp/lib/Loop/NativeDriver.php(68): Amp\Loop\NativeDriver->selectStreams(Array, Array, 3.124)
#5 ./vendor/amphp/amp/lib/Loop/Driver.php(130): Amp\Loop\NativeDriver->dispatch(true)
#6 ./vendor/amphp/amp/lib/Loop/Driver.php(70): Amp\Loop\Driver->tick()
#7 ./vendor/amphp/amp/lib/Loop.php(53): Amp\Loop\Driver->run()
#8 ./vendor/amphp/amp/lib/functions.php(158): Amp\Loop::run(Object(Closure))
... [remaining stacktrace related to application methods calls] ...

and I have complete mysql log.
Library version

            "name": "amphp/mysql",
            "version": "v0.2.0",
            "source": {
                "type": "git",
                "url": "https://github.com/amphp/mysql.git",
                "reference": "6ae0e7696ce6cdc0f535ee7a629887d376482921"
            },

from mysql.

bwoebi avatar bwoebi commented on July 18, 2024

Ah that's it :-) Given the stacktrace it now was really obvious what went wrong, thanks!

Can you please verify? @torinaki

from mysql.

dbalabka avatar dbalabka commented on July 18, 2024

@bwoebi seems everything fine. I did multiple trials with latest master and didn't notice any problems.

from mysql.

kelunik avatar kelunik commented on July 18, 2024

@bwoebi Could you tag a new bugfix then?

from mysql.

bwoebi avatar bwoebi commented on July 18, 2024

Tagged v0.2.2.

from mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.