{"action":"created","issue":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1093","repository_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1093/labels{/name}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1093/comments","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1093/events","html_url":"https://github.com/rabbitmq/rabbitmq-server/issues/1093","id":204053598,"number":1093,"title":"Using long-long-int in field-table causes 'no function clause matching' exception","user":{"login":"lukasgeyer","id":3421018,"avatar_url":"https://avatars.githubusercontent.com/u/3421018?v=3","gravatar_id":"","url":"https://api.github.com/users/lukasgeyer","html_url":"https://github.com/lukasgeyer","followers_url":"https://api.github.com/users/lukasgeyer/followers","following_url":"https://api.github.com/users/lukasgeyer/following{/other_user}","gists_url":"https://api.github.com/users/lukasgeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasgeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasgeyer/subscriptions","organizations_url":"https://api.github.com/users/lukasgeyer/orgs","repos_url":"https://api.github.com/users/lukasgeyer/repos","events_url":"https://api.github.com/users/lukasgeyer/events{/privacy}","received_events_url":"https://api.github.com/users/lukasgeyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-01-30T16:09:50Z","updated_at":"2017-01-31T09:55:53Z","closed_at":null,"body":"Setting the `x-message-ttl` argument to a `long-long-int` value (which is allowed according to https://www.rabbitmq.com/ttl.html#per-queue-message-ttl, *The argument can be of AMQP type short-short-int, short-int, long-int, or long-long-int.*) causes a `no function clause matching` exception to be thrown :\r\n```\r\n=CRASH REPORT==== 30-Jan-2017::16:20:52 ===\r\n  crasher:\r\n    initial call: rabbit_reader:init/4\r\n    pid: <0.24601.16>\r\n    registered_name: []\r\n    exception error: no function clause matching\r\n                     rabbit_binary_parser:parse_table(<<13,120,45,109,101,115,\r\n                                                        115,97,103,101,45,116,\r\n                                                        116,108,76,0,0,0,0,0,\r\n                                                        0,11,184>>) (src/rabbit_binary_parser.erl, line 50)\r\n      in function  rabbit_framing_amqp_0_9_1:decode_method_fields/2 (src/rabbit_framing_amqp_0_9_1.erl, line 786)\r\n      in call from rabbit_command_assembler:process/2 (src/rabbit_command_assembler.erl, line 81)\r\n      in call from rabbit_reader:process_frame/3 (src/rabbit_reader.erl, line 978)\r\n      in call from rabbit_reader:handle_input/3 (src/rabbit_reader.erl, line 1035)\r\n      in call from rabbit_reader:recvloop/4 (src/rabbit_reader.erl, line 446)\r\n      in call from rabbit_reader:run/1 (src/rabbit_reader.erl, line 428)\r\n      in call from rabbit_reader:start_connection/4 (src/rabbit_reader.erl, line 386)\r\n    ancestors: [<0.24599.16>,<0.284.0>,<0.283.0>,<0.282.0>,rabbit_sup,\r\n                  <0.164.0>]\r\n    messages: [{'EXIT',#Port<0.43454>,normal}]\r\n    links: [<0.24599.16>]\r\n    dictionary: [{process_name,\r\n                      {rabbit_reader,<<\"127.0.0.1:42236 -> 127.0.0.1:5672\">>}},\r\n                  {{ch_pid,<0.24609.16>},{1,#Ref<0.0.1572865.75873>}},\r\n                  {{channel,1},\r\n                   {<0.24609.16>,{method,rabbit_framing_amqp_0_9_1}}}]\r\n    trap_exit: true\r\n    status: running\r\n    heap_size: 1598\r\n    stack_size: 27\r\n    reductions: 4193\r\n  neighbours:\r\n```\r\nUsing `long-long-uint` (`6c`) instead of `long-long-int` (`4c`) works. The frame is identical in both cases (except for the value type).\r\n```\r\n0000   01 00 01 00 00 00 2c 00 32 00 0a 00 00 09 71 75  ......,.2.....qu\r\n0010   65 75 65 4e 61 6d 65 08 00 00 00 17 0d 78 2d 6d  eueName......x-m\r\n0020   65 73 73 61 67 65 2d 74 74 6c 6c 00 00 00 00 00  essage-ttll.....\r\n0030   00 0b b8 ce                                      ....\r\n\r\n0000   01 00 01 00 00 00 2c 00 32 00 0a 00 00 09 71 75  ......,.2.....qu\r\n0010   65 75 65 4e 61 6d 65 08 00 00 00 17 0d 78 2d 6d  eueName......x-m\r\n0020   65 73 73 61 67 65 2d 74 74 6c 4c 00 00 00 00 00  essage-ttlL.....\r\n0030   00 0b b8 ce                                      ....\r\n```\r\nRabbitMQ is `3.6.6`, Erlang is `19.2.1`. The same problem is also experienced on `3.6.5` and `19.1.5`."},"comment":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/comments/276320957","html_url":"https://github.com/rabbitmq/rabbitmq-server/issues/1093#issuecomment-276320957","issue_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/1093","id":276320957,"user":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars.githubusercontent.com/u/1090?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"created_at":"2017-01-31T09:55:53Z","updated_at":"2017-01-31T09:55:53Z","body":"So it can be a matter of adding one [more clause for `L` fields](https://github.com/rabbitmq/rabbitmq-common/blob/stable/src/rabbit_binary_parser.erl#L71) (as opposed to `l`, that's a lowercase L):\r\n\r\n```\r\n?SIMPLE_PARSE_TABLE($L, Value:64/signed, long);\r\n```\r\n\r\nWill wait for a client to reproduce with without hacking Pika."}}
{"actor":{"display_login":"michaelklishin"}}