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

std::regex_error using GCC 8.3 #391

Closed
madabhaviamit opened this issue Apr 29, 2020 · 15 comments
Closed

std::regex_error using GCC 8.3 #391

madabhaviamit opened this issue Apr 29, 2020 · 15 comments
Labels

Comments

@madabhaviamit
Copy link

Hi Team,

When I call transport.produce() on server, mediasoup worker dies unexpectedly. I am attaching the screenshot of the same, I am using mediasoup version 3.5.7
image

Google chrome : Version 78.0.3904.87 (Official Build) (64-bit)
Operating system: RHEL 7.4 (64-bit)
Node version: 12.16.2
gcc/clang version: gcc 8.3.0
mediasoup version: 3.5.7
mediasoup-client version: 3.2.0

I was not able to attach the core dump here in github, However i have uploaded it to my google drive and sharing the link of the core dump - https://drive.google.com/file/d/1Wac5ptPZtsjhkuxh7u_Okv78n3N2XCf9/view?usp=drivesdk

@ibc
Copy link
Member

ibc commented Apr 29, 2020

Please enter node_modules/mediasoup/worker, run make and paste here the first 30 lines of the output.

@madabhaviamit
Copy link
Author

/usr/bin/python2 ./scripts/configure.py -R mediasoup-worker
['-R', 'mediasoup-worker', '/opt/LiveCast_Build_Core/node_modules/mediasoup/worker/mediasoup-worker.gyp', '-I', '/opt/LiveCast_Build_Core/node_modules/mediasoup/worker/common.gypi', '--depth=.', '-f', 'make', '-Goutput_dir=/opt/LiveCast_Build_Core/node_modules/mediasoup/worker/out', '--generator-output', '/opt/LiveCast_Build_Core/node_modules/mediasoup/worker/out', '-Dgcc_version=83', '-Dclang=0', '-Dhost_arch=x64', '-Dtarget_arch=x64', '-Dopenssl_fips=', '-Dmediasoup_asan=false', '-Dnode_byteorder=little']
make -j4 BUILDTYPE=Release -C out
make[1]: Entering directory /opt/LiveCast_Build_Core/node_modules/mediasoup/worker/out' make[1]: Nothing to be done for all'.
make[1]: Leaving directory `/opt/LiveCast_Build_Core/node_modules/mediasoup/worker/out'

@ibc
Copy link
Member

ibc commented Apr 29, 2020

I need the Producer options given to transport.produce() in server side, specially the rtpParameters.

@madabhaviamit
Copy link
Author

Hi, i call transport.produce() from client two times, first time for video track and next time for audio track. Worker dies for the first call itself. Here are the rtp parametes.

@madabhaviamit
Copy link
Author

madabhaviamit commented Apr 29, 2020

{
   "mid":"0",
   "codecs":[
      {
         "mimeType":"video/VP8",
         "clockRate":90000,
         "payloadType":96,
         "rtcpFeedback":[
            {
               "type":"goog-remb",
               "parameter":""
            },
            {
               "type":"transport-cc",
               "parameter":""
            },
            {
               "type":"ccm",
               "parameter":"fir"
            },
            {
               "type":"nack",
               "parameter":""
            },
            {
               "type":"nack",
               "parameter":"pli"
            }
         ],
         "parameters":{

         }
      },
      {
         "mimeType":"video/rtx",
         "clockRate":90000,
         "payloadType":97,
         "rtcpFeedback":[

         ],
         "parameters":{
            "apt":96
         }
      }
   ],
   "headerExtensions":[
      {
         "uri":"urn:ietf:params:rtp-hdrext:sdes:mid",
         "id":4
      },
      {
         "uri":"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id",
         "id":5
      },
      {
         "uri":"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id",
         "id":6
      },
      {
         "uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
         "id":2
      },
      {
         "uri":"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
         "id":3
      },
      {
         "uri":"http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07",
         "id":8
      },
      {
         "uri":"urn:3gpp:video-orientation",
         "id":13
      },
      {
         "uri":"urn:ietf:params:rtp-hdrext:toffset",
         "id":14
      }
   ],
   "encodings":[
      {
         "ssrc":1099969245,
         "rtx":{
            "ssrc":2433247802
         },
         "active":true,
         "maxBitrate":100000,
         "scalabilityMode":"S1T3"
      },
      {
         "ssrc":1099969246,
         "rtx":{
            "ssrc":2433247803
         },
         "active":true,
         "maxBitrate":300000,
         "scalabilityMode":"S1T3"
      },
      {
         "ssrc":1099969247,
         "rtx":{
            "ssrc":2433247804
         },
         "active":true,
         "maxBitrate":900000,
         "scalabilityMode":"S1T3"
      }
   ],
   "rtcp":{
      "cname":"5RK+SDs4ARXYdIio"
   }
}

@ibc
Copy link
Member

ibc commented Apr 29, 2020

We have tons of tests that cover scalabilityMode and they run in different Linux versions with different GCC versions and all them are passing:

So, unless there is a bug in GCC 8.3, I don't know why it fails for you. Anyway, above you attached the binary coredump which is completely useless for us (we don't have your mediasoup-worker compiled binary). I've improved the doc about how to inspect such a coredump:

If not clear, please take a look to basic usage of gdb (and BTW you need to install gdb in your host).

Can you provide it, please?

@ibc ibc changed the title mediasoup worker died unexpectedly std::regex_error using GCC 8.3 Apr 29, 2020
@madabhaviamit
Copy link
Author

Hi,
Followed the steps updated to get a core dump, there was no mediasoup-worker binary present under "node_modules/mediasoup/worker/out/Release/mediasoup-worker"

image

@ibc
Copy link
Member

ibc commented Apr 30, 2020

And can you look for it? Can you enter in node_modules/mediasoup/worker and run make clean && make? It will print location of the mediasoup-worker binary at the end.

But please, do also other than just follow my exact steps. Use find or whatever to look for the mediasoup-worker file, etc.

@madabhaviamit
Copy link
Author

These are the first few lines from the console after doing gdb back trace, i will dump the backtrace into a file and upload it.

(gdb) bt full
#0 0x00007f119decd387 in raise () from /lib64/libc.so.6
No symbol table info available.
#1 0x00007f119decea78 in abort () from /lib64/libc.so.6
No symbol table info available.
#2 0x00007f119e9f97d5 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
No symbol table info available.
#3 0x00007f119e9f7746 in ?? () from /lib64/libstdc++.so.6
No symbol table info available.
#4 0x00007f119e9f7773 in std::terminate() () from /lib64/libstdc++.so.6
No symbol table info available.
#5 0x00007f119e9f7993 in __cxa_throw () from /lib64/libstdc++.so.6
No symbol table info available.
#6 0x00007f119ea4cdd5 in std::__throw_regex_error(std::regex_constants::error_type) () from /lib64/libstdc++.so.6
No symbol table info available.
#7 0x00000000006c86fa in std::__detail::_Compiler<char const*, std::regex_traits >::_M_bracket_expression (this=0x7ffe33504b20)
at /usr/include/c++/4.8.2/bits/regex_compiler.h:974
__matcher = {_M_traits = @0x114e9a8, _M_is_non_matching = false}
#8 0x00000000006c7835 in std::__detail::_Compiler<char const*, std::regex_traits >::_M_atom (this=0x7ffe33504b20)
at /usr/include/c++/4.8.2/bits/regex_compiler.h:960
No locals.
#9 0x00000000006c6457 in std::__detail::_Compiler<char const*, std::regex_traits >::_M_term (this=0x7ffe33504b20)
at /usr/include/c++/4.8.2/bits/regex_compiler.h:795
No locals.
#10 0x00000000006c491e in std::__detail::_Compiler<char const*, std::regex_traits >::_M_alternative (this=0x7ffe33504b20)
at /usr/include/c++/4.8.2/bits/regex_compiler.h:773
No locals.
#11 0x00000000006c4968 in std::__detail::_Compiler<char const*, std::regex_traits >::_M_alternative (this=0x7ffe33504b20)
at /usr/include/c++/4.8.2/bits/regex_compiler.h:776
__re = {_M_nfa = @0x7ffe33504b70, _M_start = 1, _M_end1 = 1, _M_end2 = -1}
#12 0x00000000006c3876 in std::__detail::_Compiler<char const*, std::regex_traits >::_M_disjunction (this=0x7ffe33504b20)
at /usr/include/c++/4.8.2/bits/regex_compiler.h:758
No locals.
#13 0x00000000006c28ee in std::__detail::_Compiler<char const*, std::regex_traits >::_Compiler (this=0x7ffe33504b20,
__b=@0x7ffe33504c20: 0x8b0a18 "^LST([1-9]\d{0,1})(_KEY)?.", __e=@0x7ffe33504c38: 0x8b0a43 "", __traits=..., __flags=16)
at /usr/include/c++/4.8.2/bits/regex_compiler.h:729
__r = {_M_nfa = @0x7ffe33504b70, _M_start = 0, _M_end1 = 0, _M_end2 = -1}
#14 0x00000000006c0f5e in std::__detail::__compile<char const
, std::regex_traits > (
__b=@0x7ffe33504c20: 0x8b0a18 "^LST([1-9]\d{0,1})(_KEY)?.*", __e=@0x7ffe33504c38: 0x8b0a43 "", __t=..., __f=16)
at /usr/include/c++/4.8.2/bits/regex_compiler.h:1105
---Type to continue, or q to quit---

@ibc
Copy link
Member

ibc commented Apr 30, 2020

Is is possible for you to upgrade to GCC 8.4?

@madabhaviamit
Copy link
Author

madabhaviamit commented Apr 30, 2020 via email

@ibc
Copy link
Member

ibc commented Apr 30, 2020

Proper std::regex is supposed to be fine in GCC >= 4.9. I don't know if there was a bug in GCC 8.3.0 or may be RedHat uses a modified version.

Can you do this in both machines (with GCC 8.3.0 and 8.3.1)?

  • Checkout mediasoup GIT repository to get the latest "v3" branch (the default branch).
  • Enter worker/ folder.
  • Run make test.
  • Paste the results in both machines (tests should fail in 8.3.0 because we added many scalabilityMode tests yesterday).

@madabhaviamit
Copy link
Author

madabhaviamit commented Apr 30, 2020 via email

@madabhaviamit
Copy link
Author

Hi,
Here is the output of gcc 8.3.0
image

And Here is the output from gcc 8.3.1

image

@ibc
Copy link
Member

ibc commented May 4, 2020

It's not even compiling in your host with GCC 8.3.0, no idea, honestly. That seems to be a dependency problem.

@ibc ibc closed this as completed May 4, 2020
@ibc ibc mentioned this issue Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants