mongosniff crashes on start

Bug #1584431 reported by ahsdkjhkbvnmxcv on 2016-05-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mongodb (Ubuntu)
Joshua Powers
Joshua Powers
Joshua Powers

Bug Description

== Begin SRU Template ==

 * 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
 * # 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]

* Xenial x64

#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 -->> 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/ [0x7f614d369ef6]
 /usr/lib/x86_64-linux-gnu/ [0x7f614d36e9d1]
 /usr/lib/x86_64-linux-gnu/ [0x7f614d3731fd]
 mongosniff(_Z8toolMainiPPcS0_+0x69a) [0x616a5a]
 mongosniff(main+0x9) [0x5e57a9]
 /lib/x86_64-linux-gnu/ [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)

Joshua Powers (powersj) on 2017-01-25
Changed in mongodb (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Joshua Powers (powersj) wrote :

Hi! Thanks for the report. I tried to reproduce this today and was able to with your comments above. I did have to execute something on the mongo shell and then got the crash.

I will nominate this for Trusty, Xenial, and Yakkety as it is fixed in Zesty.

Changed in mongodb (Ubuntu):
status: Triaged → Fix Released
assignee: nobody → Joshua Powers (powersj)
Joshua Powers (powersj) on 2017-03-23
Changed in mongodb (Ubuntu Trusty):
status: New → Invalid
Changed in mongodb (Ubuntu Xenial):
status: New → In Progress
Changed in mongodb (Ubuntu Yakkety):
status: New → In Progress
Changed in mongodb (Ubuntu Trusty):
importance: Undecided → Medium
Changed in mongodb (Ubuntu Xenial):
importance: Undecided → Medium
Changed in mongodb (Ubuntu Yakkety):
importance: Undecided → Medium
Changed in mongodb (Ubuntu Trusty):
assignee: nobody → Joshua Powers (powersj)
Changed in mongodb (Ubuntu Yakkety):
assignee: nobody → Joshua Powers (powersj)
Changed in mongodb (Ubuntu Xenial):
assignee: nobody → Joshua Powers (powersj)
Joshua Powers (powersj) on 2017-03-31
description: updated
description: updated
no longer affects: mongodb (Ubuntu Trusty)
Joshua Powers (powersj) wrote :

I believe next steps here are an upload to proposed and then sru verification. Can someone confirm?

Robie Basak (racb) wrote :

I've just got round to this again - sorry for the delay.

AFAICT, the quilt patch doesn't apply cleanly neither in Xenial nor in Yakkety. I don't know if I have a tooling problem here though. I don't remember if I verified this when I reviewed. Please could you take a look?

Joshua Powers (powersj) wrote :

Both merge requests updated with fixed patches for when other patches applied.

Joshua Powers (powersj) wrote :

Marking yakkety invalid as it is now EOL. Working to get xenial merge unstuck.

Changed in mongodb (Ubuntu Yakkety):
status: In Progress → Invalid
Nish Aravamudan (nacc) wrote :

Sponsored via git workflow.

Hello ahsdkjhkbvnmxcv, or anyone else affected,

Accepted mongodb into xenial-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in mongodb (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Joshua Powers (powersj) wrote :

Looks like the test starting mongod during the build on armhf failed with:

[Errno 111] Connection refused
[Errno 111] Connection refused
timeout starting mongod

This succeeds on every other arch and I did not see any issues with it on the latest rebuild document:

Can a rebuild be attempted?

Changed in mongodb (Ubuntu Yakkety):
status: Invalid → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers