[SERVER-82754] GDB itself segfaults when index cache is enabled while loading core dump on SUSE 12 Created: 03/Nov/23  Updated: 18/Nov/23

Status: Needs Scheduling
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Trevor Guidry
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-82622 Investigate handling gdb segfaults wh... Closed
Operating System: ALL
Sprint: Build and Correctness OnDeck
Participants:
Linked BF Score: 166

 Description   

When the index cache is disabled there is no issue loading the core dump. However when the index cache is enabled then the gdb process segfaults. For some reason this problem appears to be specific to the SUSE 12 platform.

Perhaps a clue will be how setting the index cache directory to a different location than its default of /home/ec2-user/.cache/gdb also avoids the segfault.

$ gdb -nx -iex 'set index-cache enabled on' ./bin/mongod ./dump_mongod.16182.core
GNU gdb (GDB) 12.1
...
 
Fatal signal: Segmentation fault
----- Backtrace -----
0x4ff3b3 ???
0x5ef911 ???
0x5efa54 ???
0x7f81e0aeec8f ???
0x5dec14 ???
0x7fde9b ???
0x8049c8 ???
0x8054bc ???
0x5e8593 ???
0x805534 ???
0x8049c8 ???
0x8067aa ???
0x806811 ???
0x69f042 ???
0x6a0716 ???
0x6a128a ???
0x433394 ???
0x7f81dfe17ac4 ???
0x443778 ???
0xffffffffffffffff ???
---------------------
A fatal error internal to GDB has been detected, further
debugging is not possible.  GDB will now terminate.
 
This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
 
Segmentation fault (core dumped)

$ gdb -nx -iex 'set index-cache directory /data/mci/' -iex 'set index-cache enabled on' ./bin/mongod ./dump_mongod.16182.core
...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
--Type <RET> for more, q to quit, c to continue without paging--c
Core was generated by `/data/mci/09c94b7021f0919f37a0d5d363bbd545/src/dist-test/bin/mongod --setParame'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007effdb442180 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/noelision/libpthread.so.0
[Current thread is 1 (Thread 0x7effdc703b80 (LWP 16182))]



 Comments   
Comment by Daniel Moody [ 03/Nov/23 ]

changing the directory should be simple, I almost went ahead and change it to somewhere under /data in SERVER-80303 just so it would be consistent with the other spawnhost files.

I assume the issue is with some fs mount settings on SUSE for the home dir.

Comment by Max Hirschhorn [ 03/Nov/23 ]

The changes from 68ed37c as part of SERVER-82622 should be reverted as part of addressing SERVER-82754.

Generated at Thu Feb 08 06:50:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.