Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-62561

jstests/libunwind/stacktrace_signal.js must explicitly convert pids to strings

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Hide

      Replace the test with the following code block to simulate:

      (function() {
      const pid = 1.13879e+06;
      runMongoProgram('/bin/kill', '-s', 'SIGUSR2', pid);
      })();
       
      Show
      Replace the test with the following code block to simulate: (function() { const pid = 1.13879e+06; runMongoProgram('/bin/kill', '-s', 'SIGUSR2', pid); })();
    • STM 2022-01-24
    • 14
    • 0

      This code block is vulnerable to receiving a large pid from MongoRunner. In practice, a mongod instance had a pid of 1138790 which was represented in javascript as 1.13879e+06.

      This can be fixed by calling .toString() on the PID.

            Assignee:
            richard.samuels@mongodb.com Richard Samuels (Inactive)
            Reporter:
            richard.samuels@mongodb.com Richard Samuels (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: