Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Oct 2015 03:13:28 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-threads@FreeBSD.org
Subject:   [Bug 203521] MongoDB hangs during mi_switch
Message-ID:  <bug-203521-16@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203521

            Bug ID: 203521
           Summary: MongoDB hangs during mi_switch
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: threads
          Assignee: freebsd-threads@FreeBSD.org
          Reporter: rwestlun@gmail.com

I'm running a webserver on 10.2-RELEASE with MongoDB-2.6.7 in a ZFS-backed
jail.  After rebooting after an unrelated crash, my jail is unable to fully
start.  ezjail-admin just blocks.

I used jexec to get in to the jail and found this:

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
20928 mongodb       1  52    0   100M 40412K wait    0   0:00   0.00% mongod
26645 root          1  20    0 23588K  3408K pause   1   0:00   0.00% tcsh
20391 root          1  20    0 17084K  2480K wait    1   0:00   0.00% sh
20898 mongodb       1  52    0 23592K  2492K pause   0   0:00   0.00% csh
20821 root          1  20    0 14512K  1748K select  1   0:00   0.00% syslogd
20870 root          1  52    0 47724K  2252K wait    1   0:00   0.00% su
21003 mongodb       1  52    0   104M 41244K umtxn   1   0:00   0.00% mongod
20862 root          1  20    0 17084K  2580K wait    0   0:00   0.00% sh
73529 root          1  20    0 21936K  2292K CPU1    1   0:00   0.00% top
21000 mongodb       1  52    0   100M 40408K wait    0   0:00   0.00% mongod


MongoDB is stuck in state 'umtxn'.

And procstat:

root@recipes:/ # procstat -kk 21003
  PID    TID COMM             TDNAME           KSTACK
21003 100205 mongod           -                mi_switch+0xe1
sleepq_catch_signals+0xab sleepq_wait_sig+0xf _sleep+0x27d umtxq_sleep+0x125
do_lock_umutex+0x1f74 __umtx_op_wait_umutex+0x78 amd64_syscall+0x357
Xfast_syscall+0xfb

root@recipes:/ # procstat -r 21003
  PID COMM             RESOURCE                          VALUE
21003 mongod           user time                    00:00:00.000000
21003 mongod           system time                  00:00:00.007805
21003 mongod           maximum RSS                            40940 KB
21003 mongod           integral shared memory                 14588 KB
21003 mongod           integral unshared data                   360 KB
21003 mongod           integral unshared stack                  128 KB
21003 mongod           page reclaims                            324
21003 mongod           page faults                                0
21003 mongod           swaps                                      0
21003 mongod           block reads                                1
21003 mongod           block writes                               1
21003 mongod           messages sent                              0
21003 mongod           messages received                          0
21003 mongod           signals received                           0
21003 mongod           voluntary context switches                 2
21003 mongod           involuntary context switches               0

root@recipes:/ # procstat -t 21003
  PID    TID COMM             TDNAME           CPU  PRI STATE   WCHAN
21003 100205 mongod           -                  1  152 sleep   umtxn


root@recipes:/ # uname -a
FreeBSD recipes 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12
15:26:37 UTC 2015     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC
 amd64


It looks like maybe a deadlock is preventing the context switch.  This happens
every time I reset the jail.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203521-16>