** Description changed:

+ == Begin SRU Template ==
+ [Impact]
+ 
+  * mongosniff crashes when it receives messages with no namespace. The result 
is that a user cannot even press only the enter key without the mongosniff 
application crashing.
+ * mongosniff in Xenial and Yakkety is essentially broken currently because of 
a check in the code that gets the message namespace, but if there is no 
namespace it crashes.
+ 
+ [Test Case]
+ 
+  * lxc launch ubuntu-daily:xenial xenial
+  * lxc exec xenial bash
+  * apt install mongodb
+  * mongosniff --source NET lo
+  * # Open a 2nd terminal and run the following
+  * lxc exec xenial bash
+  * mongo
+  * # Observe mongosniff abort, with a core dump, in the first window
+ 
+ 
+ [Regression Potential]
+ 
+ * Users currently experiencing this issue would be expecting a SRU fix to 
come from us as the application is broken in a major way.
+ * The only work around it would would require rebuilding mongodb from source 
with the fix to resolve the issue.
+ * The change was limited to the mongosniff source code only.
+ 
+ [Other Info]
+ 
  Ubuntu:
  * Xenial x64
  
  Packages:
  #user@localhost:~$ for i in `dpkg --get-selections|grep -v deinstall|grep 
mongo|cut -f1`; do echo $i `sudo apt-cache show $i|sed -n -e 's/^.*Version: 
1://p'`; done
  * mongodb 2.6.10-0ubuntu1
  * mongodb-clients 2.6.10-0ubuntu1
  * mongodb-server 2.6.10-0ubuntu1
  
  ----
  Steps to reproduce:
  
  1. start service
  2. start sniffer
  3. start shell
  4. crash sniffer
  ---
  
  user@localhost:~$ sudo service mongodb start
  
  user@localhost:~$ mongo
  MongoDB shell version: 2.6.10
  connecting to: test
  
  (...)
  
  user@localhost:~$ sudo mongosniff --source NET lo
- sniffing... 27017 
+ sniffing... 27017
  127.0.0.1:37522  -->> 127.0.0.1:27017 admin.$cmd  60 bytes  id:0      0
-       query: { whatsmyuri: 1 }  ntoreturn: 1 ntoskip: 0
+  query: { whatsmyuri: 1 }  ntoreturn: 1 ntoskip: 0
  2016-05-22T01:26:35.545-0400 Assertion failure messageShouldHaveNs() 
src/mongo/db/dbmessage.cpp 82
- 2016-05-22T01:26:35.553-0400 0xea35a9 0xe397cf 0xe14772 0x86aca8 0x615c13 
0x7f614d369ef6 0x7f614d36e9d1 0x7f614d3731fd 0x616a5a 0x5e57a9 0x7f614c71a830 
0x614389 
-  mongosniff(_ZN5mongo15printStackTraceERSo+0x39) [0xea35a9]
-  mongosniff(_ZN5mongo10logContextEPKc+0x21f) [0xe397cf]
-  mongosniff(_ZN5mongo12verifyFailedEPKcS1_j+0x142) [0xe14772]
-  mongosniff() [0x86aca8]
-  mongosniff(_Z10got_packetPhPK11pcap_pkthdrPKh+0x573) [0x615c13]
-  /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(+0x5ef6) [0x7f614d369ef6]
-  /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(+0xa9d1) [0x7f614d36e9d1]
-  /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(pcap_loop+0x5d) [0x7f614d3731fd]
-  mongosniff(_Z8toolMainiPPcS0_+0x69a) [0x616a5a]
-  mongosniff(main+0x9) [0x5e57a9]
-  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f614c71a830]
-  mongosniff(_start+0x29) [0x614389]
+ 2016-05-22T01:26:35.553-0400 0xea35a9 0xe397cf 0xe14772 0x86aca8 0x615c13 
0x7f614d369ef6 0x7f614d36e9d1 0x7f614d3731fd 0x616a5a 0x5e57a9 0x7f614c71a830 
0x614389
+  mongosniff(_ZN5mongo15printStackTraceERSo+0x39) [0xea35a9]
+  mongosniff(_ZN5mongo10logContextEPKc+0x21f) [0xe397cf]
+  mongosniff(_ZN5mongo12verifyFailedEPKcS1_j+0x142) [0xe14772]
+  mongosniff() [0x86aca8]
+  mongosniff(_Z10got_packetPhPK11pcap_pkthdrPKh+0x573) [0x615c13]
+  /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(+0x5ef6) [0x7f614d369ef6]
+  /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(+0xa9d1) [0x7f614d36e9d1]
+  /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(pcap_loop+0x5d) [0x7f614d3731fd]
+  mongosniff(_Z8toolMainiPPcS0_+0x69a) [0x616a5a]
+  mongosniff(main+0x9) [0x5e57a9]
+  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f614c71a830]
+  mongosniff(_start+0x29) [0x614389]
  terminate called after throwing an instance of 'mongo::AssertionException'
-   what():  assertion src/mongo/db/dbmessage.cpp:82
+   what():  assertion src/mongo/db/dbmessage.cpp:82
  Aborted (core dumped)
  user@localhost:~$

** Description changed:

  == Begin SRU Template ==
  [Impact]
  
-  * mongosniff crashes when it receives messages with no namespace. The result 
is that a user cannot even press only the enter key without the mongosniff 
application crashing.
+  * mongosniff crashes when it receives messages with no namespace. The result 
is that a user cannot even press only the enter key without the mongosniff 
application crashing.
  * mongosniff in Xenial and Yakkety is essentially broken currently because of 
a check in the code that gets the message namespace, but if there is no 
namespace it crashes.
  
  [Test Case]
  
-  * lxc launch ubuntu-daily:xenial xenial
-  * lxc exec xenial bash
-  * apt install mongodb
-  * mongosniff --source NET lo
-  * # Open a 2nd terminal and run the following
-  * lxc exec xenial bash
-  * mongo
-  * # Observe mongosniff abort, with a core dump, in the first window
- 
+  * lxc launch ubuntu-daily:xenial xenial
+  * lxc exec xenial bash
+  * apt install mongodb
+  * mongosniff --source NET lo
+  * # Open a 2nd terminal and run the following
+  * lxc exec xenial bash
+  * mongo
+  * # press enter a few times or type 'help'
+  * # Observe mongosniff abort, with a core dump, in the first window
  
  [Regression Potential]
  
  * Users currently experiencing this issue would be expecting a SRU fix to 
come from us as the application is broken in a major way.
  * The only work around it would would require rebuilding mongodb from source 
with the fix to resolve the issue.
  * The change was limited to the mongosniff source code only.
  
  [Other Info]
  
  Ubuntu:
  * Xenial x64
  
  Packages:
  #user@localhost:~$ for i in `dpkg --get-selections|grep -v deinstall|grep 
mongo|cut -f1`; do echo $i `sudo apt-cache show $i|sed -n -e 's/^.*Version: 
1://p'`; done
  * mongodb 2.6.10-0ubuntu1
  * mongodb-clients 2.6.10-0ubuntu1
  * mongodb-server 2.6.10-0ubuntu1
  
  ----
  Steps to reproduce:
  
  1. start service
  2. start sniffer
  3. start shell
  4. crash sniffer
  ---
  
  user@localhost:~$ sudo service mongodb start
  
  user@localhost:~$ mongo
  MongoDB shell version: 2.6.10
  connecting to: test
  
  (...)
  
  user@localhost:~$ sudo mongosniff --source NET lo
  sniffing... 27017
  127.0.0.1:37522  -->> 127.0.0.1:27017 admin.$cmd  60 bytes  id:0      0
   query: { whatsmyuri: 1 }  ntoreturn: 1 ntoskip: 0
  2016-05-22T01:26:35.545-0400 Assertion failure messageShouldHaveNs() 
src/mongo/db/dbmessage.cpp 82
  2016-05-22T01:26:35.553-0400 0xea35a9 0xe397cf 0xe14772 0x86aca8 0x615c13 
0x7f614d369ef6 0x7f614d36e9d1 0x7f614d3731fd 0x616a5a 0x5e57a9 0x7f614c71a830 
0x614389
   mongosniff(_ZN5mongo15printStackTraceERSo+0x39) [0xea35a9]
   mongosniff(_ZN5mongo10logContextEPKc+0x21f) [0xe397cf]
   mongosniff(_ZN5mongo12verifyFailedEPKcS1_j+0x142) [0xe14772]
   mongosniff() [0x86aca8]
   mongosniff(_Z10got_packetPhPK11pcap_pkthdrPKh+0x573) [0x615c13]
   /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(+0x5ef6) [0x7f614d369ef6]
   /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(+0xa9d1) [0x7f614d36e9d1]
   /usr/lib/x86_64-linux-gnu/libpcap.so.0.8(pcap_loop+0x5d) [0x7f614d3731fd]
   mongosniff(_Z8toolMainiPPcS0_+0x69a) [0x616a5a]
   mongosniff(main+0x9) [0x5e57a9]
   /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f614c71a830]
   mongosniff(_start+0x29) [0x614389]
  terminate called after throwing an instance of 'mongo::AssertionException'
    what():  assertion src/mongo/db/dbmessage.cpp:82
  Aborted (core dumped)
  user@localhost:~$

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1584431

Title:
  mongosniff crashes on start

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mongodb/+bug/1584431/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to