[SERVER-50891] mongod 3.6.20-rc2 core dumps if dbpath DNE or perms block Created: 11/Sep/20  Updated: 29/Oct/23  Resolved: 23/Nov/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.6.15, 3.6.20
Fix Version/s: 3.6.22

Type: Bug Priority: Major - P3
Reporter: Andrew Feierabend (Inactive) Assignee: Gabriel Russell (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File 3.6.20-rc2_core_dump_repro    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:
  1. Install MDB server via either DEB file / TGZ file / or apt package manager.
  2. Run a chown 444 on the dbpath your mongod is using
  3. Core Dump

In actual practice, this is largely missed on DEB / apt installs, since both create the necessary dir with correct permissions. But this will spring on many TGZ initial installations, and will likely surface for the package manager / DEB installations during initial configuration, especially if admins seek to use custom users to run their mongod instances.

Sprint: Service arch 2020-10-05, Service arch 2020-11-02, Service arch 2020-11-16, Service arch 2020-11-30
Participants:

 Description   

Attempting to spin up a v3.6.20-rc2 mongod reliably core dumps if either:

  • the dbpath does not exist, or
  • the dbpath is permissions restricted to the user that launches mongod.

This does not match expected behavior, where an error is instead thrown and the server terminates gracefully.

See attached repro file. All it takes is a chmod 444 on the dbpath to core dump the next mongod start attempt.



 Comments   
Comment by Githook User [ 23/Nov/20 ]

Author:

{'name': 'Gabriel Russell', 'email': 'gabriel.russell@mongodb.com', 'username': 'gabrielrussell'}

Message: SERVER-50891 alow opCtx's to be created without globalStorageEngines

o It's required that one be able to create opCtx's without
globalStorageEngines. When the globalStorageEngine fails to get properly
initialized, the process will shutdown. Shutdown tasks will then need to
be able to create and use opCtx's
Branch: v3.6
https://github.com/mongodb/mongo/commit/35fa4e01778f93a5ece635307a5bba04c6648f3f

Comment by Gabriel Russell (Inactive) [ 11/Nov/20 ]

https://mongodbcr.appspot.com/717980001/

Comment by Connie Chen [ 15/Sep/20 ]

If this is only on 3.6 then we'll assign this to backlog

Comment by Eric Sedor [ 11/Sep/20 ]

Thanks andrew.feierabend. It looks like this reproduces as early as 3.6.15; this error is logged in 3.6.14 and earlier. That error is still logged in 3.6.15+, but right before the invariant is hit.

Generated at Thu Feb 08 05:23:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.