Unhandled exception

It seems that I hit an unhandled exception.
It seems to happen during initialization.

  [2021-05-28 07:15:53.608] [6,8] [warning] 794ms, parsed frame for magic=81, opcode=b5, opaque=7, body_len=1265. Invalid magic of the next frame: 21, 220 bytes to parse
  0000: 21 00 00 00 00 00 21 00 00 00 c5 0a 00 00 00 00 00 00 00 00 00 00 00 72 3d 30 78 33 63 20 30 78
  0020: 66 66 66 66 66 66 65 30 20 30 78 66 66 66 66 66 66 62 31 20 30 78 66 66 66 66 66 66 61 37 20 30
  0040: 78 66 66 66 66 66 66 39 65 20 30 78 37 66 20 30 78 66 66 66 66 66 66 61 31 20 30 78 30 36 37 32
  0060: 30 66 36 33 37 37 32 36 66 66 66 66 66 66 38 62 37 39 66 66 66 66 66 66 65 37 2c 73 3d 73 43 4d
  0080: 51 74 65 33 2b 56 4c 37 76 59 76 35 37 6e 79 68 5a 68 55 2b 50 30 5a 65 70 6b 32 5a 34 66 47 77
  00A0: 39 58 4d 42 66 6a 49 64 57 4f 55 48 44 65 4f 4b 67 4f 2b 6b 45 63 49 31 61 4b 69 39 6b 38 44 2f
  00C0: 42 6a 33 7a 2f 4c 54 43 69 42 74 41 6a 35 47 61 2f 42 77 3d 3d 2c 69 3d 34 30 30 30
  [2021-05-28 07:15:53.608] [6,8] [critical] 0ms, *** Fatal error encountered during exception handling (rev="a79d098eb238b3883e49e1738c35167642e8834f", compiler="GNU 8.3.0", system="Linux-4.14.138-rancher", date="2021-05-25 10:18:16") ***
  [2021-05-28 07:15:53.608] [6,8] [critical] 0ms, Caught unhandled std::exception-derived exception. what(): tao::json::events::from_string:1:1147: invalid unescaped character
  terminate called after throwing an instance of 'tao::json::pegtl::parse_error'
    what():  tao::json::events::from_string:1:1147: invalid unescaped character
  [2021-05-28 07:15:53.609] [6,8] [critical] 0ms, Call stack:
      /usr/local/bundle/gems/couchbase-3.1.1/lib/couchbase/libcouchbase.so(print_backtrace_to_buffer+0x2f) [0x7f5a9cbfa000+0x38ebcf]
      /usr/local/bundle/gems/couchbase-3.1.1/lib/couchbase/libcouchbase.so() [0x7f5a9cbfa000+0x38eded]
      /usr/local/bundle/gems/couchbase-3.1.1/lib/couchbase/libcouchbase.so() [0x7f5a9cbfa000+0x38f8e2]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6() [0x7f5aa4f16000+0x928c6]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6() [0x7f5aa4f16000+0x92901]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6() [0x7f5aa4f16000+0x928ba]
      /usr/local/bundle/gems/couchbase-3.1.1/lib/couchbase/libcouchbase.so(_ZN4asio6detail9scheduler3runERSt10error_code+0x840) [0x7f5a9cbfa000+0x260f00]
      /usr/local/bundle/gems/couchbase-3.1.1/lib/couchbase/libcouchbase.so() [0x7f5a9cbfa000+0x162ecc]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6() [0x7f5aa4f16000+0xbbb2f]
      /lib/x86_64-linux-gnu/libpthread.so.0() [0x7f5aa54ac000+0x7fa3]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f5aa509a000+0xf94cf]

Hello @Stefano can you please share some more details

  • SDK version
  • Server version
  • OS
    Code snippet that causes this exception

Hi @AV25242 .

Sorry for my late answer by this issue didn’t happen anymore so I did not see about your answer.

My SDK was couchbase-ruby-client v3.1.1
The server was couchbase:community-6.5.1.
OS was a dockerfile based on Debian GNU/Linux 10 (buster)

The code snippet that caused the exception was during the initialization.
Also it seemed to happen when multiple connection are created at once.

In my case I have a docker-compose with multiple micro-service (around 15) that are connected on Couchbase all at once with 20 connections.

I repeat that this issue is not happening anymore.

1 Like

Thank you very much @Stefano, glad that you have reached out and good to know that you are not facing any issues.

From the log it seems like the some concurrency issue in protocol parser. The issue should have been fixed on master with updated C++ core. The master is not yet tagged, but will be released as 3.3.0 in second half of April with more features.

1 Like