[Bug 5554] New: Error in `python': free(): invalid pointer: 0x00007ff368007640 when running tests

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Fri Apr 28 18:36:44 EDT 2017


https://bz.mercurial-scm.org/show_bug.cgi?id=5554

            Bug ID: 5554
           Summary: Error in `python': free(): invalid pointer:
                    0x00007ff368007640 when running tests
           Product: Mercurial
           Version: 4.0
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: critical
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: gregory.szorc at gmail.com
                CC: mercurial-devel at mercurial-scm.org

I was running the test suite locally and got the following crash when running
test-censor.t. It doesn't reproduce in isolation. In fact, I haven't been able
to reproduce it. I'm hoping this is just my system being in a bad state. But
just in case someone thinks this could be a bug in our C code, I'm filing it.

*** Error in `python': free(): invalid pointer: 0x00007ff368007640 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7908b)[0x7ff3823d808b]
/lib/x86_64-linux-gnu/libc.so.6(+0x826fa)[0x7ff3823e16fa]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ff3823e512c]
python(PyThread_ReInitTLS+0x81)[0x4f6e71]
python(PyOS_AfterFork+0x37)[0x4fd907]
python[0x501706]
python(PyEval_EvalFrameEx+0x5520)[0x4b5b80]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python(PyEval_EvalFrameEx+0x5855)[0x4b5eb5]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python[0x52cbee]
python(PyObject_Call+0x3a)[0x422eaa]
python[0x429cfc]
python(PyObject_Call+0x3a)[0x422eaa]
python[0x48262d]
python[0x48024a]
python(PyObject_Call+0x3a)[0x422eaa]
python(PyEval_EvalFrameEx+0x520d)[0x4b586d]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python(PyEval_EvalFrameEx+0x5855)[0x4b5eb5]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python(PyEval_EvalFrameEx+0x5855)[0x4b5eb5]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python(PyEval_EvalFrameEx+0x5855)[0x4b5eb5]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python(PyEval_EvalFrameEx+0x5855)[0x4b5eb5]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python[0x52cbee]
python(PyObject_Call+0x3a)[0x422eaa]
python(PyEval_EvalFrameEx+0x1926)[0x4b1f86]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python[0x52cb0c]
python(PyObject_Call+0x3a)[0x422eaa]
python[0x429cfc]
python(PyObject_Call+0x3a)[0x422eaa]
python[0x4821e5]
python(PyObject_Call+0x3a)[0x422eaa]
python(PyEval_EvalFrameEx+0x520d)[0x4b586d]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python[0x52cbee]
python(PyObject_Call+0x3a)[0x422eaa]
python(PyEval_EvalFrameEx+0x1926)[0x4b1f86]
python(PyEval_EvalFrameEx+0x5975)[0x4b5fd5]
python(PyEval_EvalFrameEx+0x5975)[0x4b5fd5]
python(PyEval_EvalCodeEx+0x7fc)[0x4b97fc]
python[0x52cb0c]
python(PyObject_Call+0x3a)[0x422eaa]
python[0x429cfc]
python(PyObject_Call+0x3a)[0x422eaa]
python(PyEval_CallObjectWithKeywords+0x47)[0x4b0437]
python[0x4fb702]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76da)[0x7ff382e3d6da]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x5f)[0x7ff38246717f]
======= Memory map: ========
00400000-005a0000 r-xp 00000000 fd:00 1325880                           
/home/gps/.pyenv/versions/2.7.12/bin/python2.7
0079f000-007a0000 r--p 0019f000 fd:00 1325880                           
/home/gps/.pyenv/versions/2.7.12/bin/python2.7
007a0000-007dc000 rw-p 001a0000 fd:00 1325880                           
/home/gps/.pyenv/versions/2.7.12/bin/python2.7
007dc000-007fd000 rw-p 00000000 00:00 0
01f2d000-028ac000 rw-p 00000000 00:00 0                                  [heap]
7ff314000000-7ff314021000 rw-p 00000000 00:00 0
7ff314021000-7ff318000000 ---p 00000000 00:00 0
7ff31c000000-7ff31c021000 rw-p 00000000 00:00 0
7ff31c021000-7ff320000000 ---p 00000000 00:00 0
7ff320000000-7ff320037000 rw-p 00000000 00:00 0
7ff320037000-7ff324000000 ---p 00000000 00:00 0
7ff324000000-7ff32403e000 rw-p 00000000 00:00 0
7ff32403e000-7ff328000000 ---p 00000000 00:00 0
7ff328000000-7ff328021000 rw-p 00000000 00:00 0
7ff328021000-7ff32c000000 ---p 00000000 00:00 0
7ff32c000000-7ff32c06c000 rw-p 00000000 00:00 0
7ff32c06c000-7ff330000000 ---p 00000000 00:00 0
7ff3317fb000-7ff3317fc000 ---p 00000000 00:00 0
7ff3317fc000-7ff331ffc000 rw-p 00000000 00:00 0
7ff331ffc000-7ff331ffd000 ---p 00000000 00:00 0
7ff331ffd000-7ff3327fd000 rw-p 00000000 00:00 0
7ff3327fd000-7ff3327fe000 ---p 00000000 00:00 0
7ff3327fe000-7ff332ffe000 rw-p 00000000 00:00 0
7ff332ffe000-7ff332fff000 ---p 00000000 00:00 0
7ff332fff000-7ff3337ff000 rw-p 00000000 00:00 0
7ff3337ff000-7ff333800000 ---p 00000000 00:00 0
7ff333800000-7ff334000000 rw-p 00000000 00:00 0
7ff334000000-7ff334033000 rw-p 00000000 00:00 0
7ff334033000-7ff338000000 ---p 00000000 00:00 0
7ff338000000-7ff33804b000 rw-p 00000000 00:00 0
7ff33804b000-7ff33c000000 ---p 00000000 00:00 0
7ff33c000000-7ff33c066000 rw-p 00000000 00:00 0
7ff33c066000-7ff340000000 ---p 00000000 00:00 0
7ff340000000-7ff340030000 rw-p 00000000 00:00 0
7ff340030000-7ff344000000 ---p 00000000 00:00 0
7ff344000000-7ff344037000 rw-p 00000000 00:00 0
7ff344037000-7ff348000000 ---p 00000000 00:00 0
7ff348000000-7ff348029000 rw-p 00000000 00:00 0
7ff348029000-7ff34c000000 ---p 00000000 00:00 0
7ff34c000000-7ff34c022000 rw-p 00000000 00:00 0
7ff34c022000-7ff350000000 ---p 00000000 00:00 0
7ff3505e2000-7ff3505f8000 r-xp 00000000 fd:00 2360021                   
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ff3505f8000-7ff3507f7000 ---p 00016000 fd:00 2360021                   
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ff3507f7000-7ff3507f8000 r--p 00015000 fd:00 2360021                   
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ff3507f8000-7ff3507f9000 rw-p 00016000 fd:00 2360021                   
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ff3507f9000-7ff3507fa000 ---p 00000000 00:00 0
7ff3507fa000-7ff350ffa000 rw-p 00000000 00:00 0
7ff350ffa000-7ff350ffb000 ---p 00000000 00:00 0
7ff350ffb000-7ff3517fb000 rw-p 00000000 00:00 0
7ff3517fb000-7ff3517fc000 ---p 00000000 00:00 0
7ff3517fc000-7ff351ffc000 rw-p 00000000 00:00 0
7ff351ffc000-7ff351ffd000 ---p 00000000 00:00 0
7ff351ffd000-7ff3527fd000 rw-p 00000000 00:00 0
7ff3527fd000-7ff3527fe000 ---p 00000000 00:00 0
7ff3527fe000-7ff352ffe000 rw-p 00000000 00:00 0
7ff352ffe000-7ff352fff000 ---p 00000000 00:00 0
7ff352fff000-7ff3537ff000 rw-p 00000000 00:00 0
7ff3537ff000-7ff353800000 ---p 00000000 00:00 0
7ff353800000-7ff354000000 rw-p 00000000 00:00 0
7ff354000000-7ff354032000 rw-p 00000000 00:00 0
7ff354032000-7ff358000000 ---p 00000000 00:00 0
7ff358000000-7ff358024000 rw-p 00000000 00:00 0
7ff358024000-7ff35c000000 ---p 00000000 00:00 0
7ff35c000000-7ff35c025000 rw-p 00000000 00:00 0
7ff35c025000-7ff360000000 ---p 00000000 00:00 0
7ff360000000-7ff360031000 rw-p 00000000 00:00 0
7ff360031000-7ff364000000 ---p 00000000 00:00 0
7ff364000000-7ff36405f000 rw-p 00000000 00:00 0
7ff36405f000-7ff368000000 ---p 00000000 00:00 0
7ff368000000-7ff36805f000 rw-p 00000000 00:00 0
7ff36805f000-7ff36c000000 ---p 00000000 00:00 0
7ff36c000000-7ff36c04e000 rw-p 00000000 00:00 0
7ff36c04e000-7ff370000000 ---p 00000000 00:00 0
7ff370000000-7ff370035000 rw-p 00000000 00:00 0
7ff370035000-7ff374000000 ---p 00000000 00:00 0
7ff374038000-7ff3746f8000 rw-p 00000000 00:00 0
7ff3746f8000-7ff3746f9000 ---p 00000000 00:00 0
7ff3746f9000-7ff374ef9000 rw-p 00000000 00:00 0
7ff374ef9000-7ff374efa000 ---p 00000000 00:00 0
7ff374efa000-7ff3756fa000 rw-p 00000000 00:00 0
7ff3756fa000-7ff3756fb000 ---p 00000000 00:00 0
7ff3756fb000-7ff375efb000 rw-p 00000000 00:00 0
7ff375efb000-7ff375efc000 ---p 00000000 00:00 0
7ff375efc000-7ff3766fc000 rw-p 00000000 00:00 0
7ff3766fc000-7ff3766fd000 ---p 00000000 00:00 0
7ff3766fd000-7ff376efd000 rw-p 00000000 00:00 0
7ff376efe000-7ff376ffe000 rw-p 00000000 00:00 0
7ff376ffe000-7ff376fff000 ---p 00000000 00:00 0
7ff376fff000-7ff3777ff000 rw-p 00000000 00:00 0
7ff3777ff000-7ff377800000 ---p 00000000 00:00 0
7ff377800000-7ff378000000 rw-p 00000000 00:00 0
7ff378000000-7ff378021000 rw-p 00000000 00:00 0
7ff378021000-7ff37c000000 ---p 00000000 00:00 0
7ff37c018000-7ff37c098000 rw-p 00000000 00:00 0
7ff37c098000-7ff37c099000 ---p 00000000 00:00 0
7ff37c099000-7ff37c899000 rw-p 00000000 00:00 0
7ff37c899000-7ff37c89a000 ---p 00000000 00:00 0
7ff37c89a000-7ff37e7da000 rw-p 00000000 00:00 0
7ff37e7da000-7ff37e7e5000 r-xp 00000000 fd:00 2365007                   
/lib/x86_64-linux-gnu/libnss_files-2.24.so
7ff37e7e5000-7ff37e9e4000 ---p 0000b000 fd:00 2365007                   
/lib/x86_64-linux-gnu/libnss_files-2.24.so
7ff37e9e4000-7ff37e9e5000 r--p 0000a000 fd:00 2365007                   
/lib/x86_64-linux-gnu/libnss_files-2.24.so
7ff37e9e5000-7ff37e9e6000 rw-p 0000b000 fd:00 2365007                   
/lib/x86_64-linux-gnu/libnss_files-2.24.so
7ff37e9e6000-7ff37eaac000 rw-p 00000000 00:00 0
7ff37eaac000-7ff37eacb000 r-xp 00000000 fd:00 1330543                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_io.so
7ff37eacb000-7ff37ecca000 ---p 0001f000 fd:00 1330543                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_io.so
7ff37ecca000-7ff37eccb000 r--p 0001e000 fd:00 1330543                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_io.so
7ff37eccb000-7ff37ecd5000 rw-p 0001f000 fd:00 1330543                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_io.so
7ff37ecd5000-7ff37ed15000 rw-p 00000000 00:00 0
7ff37ed15000-7ff37ed18000 r-xp 00000000 fd:00 1330528                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/fcntl.so
7ff37ed18000-7ff37ef18000 ---p 00003000 fd:00 1330528                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/fcntl.so
7ff37ef18000-7ff37ef19000 r--p 00003000 fd:00 1330528                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/fcntl.so
7ff37ef19000-7ff37ef1a000 rw-p 00004000 fd:00 1330528                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/fcntl.so
7ff37ef1a000-7ff37ef1f000 r-xp 00000000 fd:00 1330580                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/select.so
7ff37ef1f000-7ff37f11e000 ---p 00005000 fd:00 1330580                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/select.so
7ff37f11e000-7ff37f11f000 r--p 00004000 fd:00 1330580                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/select.so
7ff37f11f000-7ff37f121000 rw-p 00005000 fd:00 1330580                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/select.so
7ff37f121000-7ff37f125000 r-xp 00000000 fd:00 1330570                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/time.so
7ff37f125000-7ff37f324000 ---p 00004000 fd:00 1330570                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/time.so
7ff37f324000-7ff37f325000 r--p 00003000 fd:00 1330570                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/time.so
7ff37f325000-7ff37f327000 rw-p 00004000 fd:00 1330570                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/time.so
7ff37f327000-7ff37f32b000 r-xp 00000000 fd:00 1330533                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/cStringIO.so
7ff37f32b000-7ff37f52a000 ---p 00004000 fd:00 1330533                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/cStringIO.so
7ff37f52a000-7ff37f52b000 r--p 00003000 fd:00 1330533                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/cStringIO.so
7ff37f52b000-7ff37f52d000 rw-p 00004000 fd:00 1330533                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/cStringIO.so
7ff37f52d000-7ff37f58b000 r-xp 00000000 fd:00 2365077                   
/lib/x86_64-linux-gnu/libssl.so.1.0.0
7ff37f58b000-7ff37f78b000 ---p 0005e000 fd:00 2365077                   
/lib/x86_64-linux-gnu/libssl.so.1.0.0
7ff37f78b000-7ff37f78f000 r--p 0005e000 fd:00 2365077                   
/lib/x86_64-linux-gnu/libssl.so.1.0.0
7ff37f78f000-7ff37f796000 rw-p 00062000 fd:00 2365077                   
/lib/x86_64-linux-gnu/libssl.so.1.0.0
7ff37f796000-7ff37f7aa000 r-xp 00000000 fd:00 1330579                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_ssl.so
7ff37f7aa000-7ff37f9a9000 ---p 00014000 fd:00 1330579                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_ssl.so
7ff37f9a9000-7ff37f9aa000 r--p 00013000 fd:00 1330579                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_ssl.so
7ff37f9aa000-7ff37f9ae000 rw-p 00014000 fd:00 1330579                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_ssl.so
7ff37f9ae000-7ff37f9bf000 r-xp 00000000 fd:00 1330585                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_socket.so
7ff37f9bf000-7ff37fbbe000 ---p 00011000 fd:00 1330585                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_socket.so
7ff37fbbe000-7ff37fbbf000 r--p 00010000 fd:00 1330585                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_socket.so
7ff37fbbf000-7ff37fbc4000 rw-p 00011000 fd:00 1330585                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_socket.so
7ff37fbc4000-7ff37fbc6000 r-xp 00000000 fd:00 1330562                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/grp.so
7ff37fbc6000-7ff37fdc5000 ---p 00002000 fd:00 1330562                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/grp.so
7ff37fdc5000-7ff37fdc6000 r--p 00001000 fd:00 1330562                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/grp.so
7ff37fdc6000-7ff37fdc7000 rw-p 00002000 fd:00 1330562                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/grp.so
7ff37fdc7000-7ff37fdca000 r-xp 00000000 fd:00 1330572                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_random.so
7ff37fdca000-7ff37ffc9000 ---p 00003000 fd:00 1330572                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_random.so
7ff37ffc9000-7ff37ffca000 r--p 00002000 fd:00 1330572                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_random.so
7ff37ffca000-7ff37ffcb000 rw-p 00003000 fd:00 1330572                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_random.so
7ff37ffcb000-7ff3801e4000 r-xp 00000000 fd:00 2365073                   
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ff3801e4000-7ff3803e4000 ---p 00219000 fd:00 2365073                   
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ff3803e4000-7ff380400000 r--p 00219000 fd:00 2365073                   
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ff380400000-7ff38040c000 rw-p 00235000 fd:00 2365073                   
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ff38040c000-7ff38040f000 rw-p 00000000 00:00 0
7ff38040f000-7ff380414000 r-xp 00000000 fd:00 1330525                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_hashlib.so
7ff380414000-7ff380613000 ---p 00005000 fd:00 1330525                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_hashlib.so
7ff380613000-7ff380614000 r--p 00004000 fd:00 1330525                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_hashlib.so
7ff380614000-7ff380615000 rw-p 00005000 fd:00 1330525                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_hashlib.so
7ff380615000-7ff380630000 r-xp 00000000 fd:00 2364667                   
/lib/x86_64-linux-gnu/libz.so.1.2.11
7ff380630000-7ff38082f000 ---p 0001b000 fd:00 2364667                   
/lib/x86_64-linux-gnu/libz.so.1.2.11
7ff38082f000-7ff380830000 r--p 0001a000 fd:00 2364667                   
/lib/x86_64-linux-gnu/libz.so.1.2.11
7ff380830000-7ff380831000 rw-p 0001b000 fd:00 2364667                   
/lib/x86_64-linux-gnu/libz.so.1.2.11
7ff380831000-7ff380836000 r-xp 00000000 fd:00 1330569                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/binascii.so
7ff380836000-7ff380a35000 ---p 00005000 fd:00 1330569                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/binascii.so
7ff380a35000-7ff380a36000 r--p 00004000 fd:00 1330569                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/binascii.so
7ff380a36000-7ff380a37000 rw-p 00005000 fd:00 1330569                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/binascii.so
7ff380a37000-7ff380a41000 r-xp 00000000 fd:00 1330584                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/math.so
7ff380a41000-7ff380c40000 ---p 0000a000 fd:00 1330584                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/math.so
7ff380c40000-7ff380c41000 r--p 00009000 fd:00 1330584                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/math.so
7ff380c41000-7ff380c43000 rw-p 0000a000 fd:00 1330584                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/math.so
7ff380c43000-7ff380c4c000 r-xp 00000000 fd:00 1330524                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_json.so
7ff380c4c000-7ff380e4c000 ---p 00009000 fd:00 1330524                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_json.so
7ff380e4c000-7ff380e4d000 r--p 00009000 fd:00 1330524                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_json.so
7ff380e4d000-7ff380e4e000 rw-p 0000a000 fd:00 1330524                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_json.so
7ff380e4e000-7ff380e57000 r-xp 00000000 fd:00 1330556                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_struct.so
7ff380e57000-7ff381056000 ---p 00009000 fd:00 1330556                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_struct.so
7ff381056000-7ff381057000 r--p 00008000 fd:00 1330556                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_struct.so
7ff381057000-7ff381059000 rw-p 00009000 fd:00 1330556                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_struct.so
7ff381059000-7ff38105f000 r-xp 00000000 fd:00 1330563                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/strop.so
7ff38105f000-7ff38125e000 ---p 00006000 fd:00 1330563                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/strop.so
7ff38125e000-7ff38125f000 r--p 00005000 fd:00 1330563                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/strop.so
7ff38125f000-7ff381261000 rw-p 00006000 fd:00 1330563                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/strop.so
7ff381261000-7ff381264000 r-xp 00000000 fd:00 1330553                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_functools.so
7ff381264000-7ff381463000 ---p 00003000 fd:00 1330553                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_functools.so
7ff381463000-7ff381464000 r--p 00002000 fd:00 1330553                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_functools.so
7ff381464000-7ff381465000 rw-p 00003000 fd:00 1330553                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_functools.so
7ff381465000-7ff38146d000 r-xp 00000000 fd:00 1330574                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_collections.so
7ff38146d000-7ff38166c000 ---p 00008000 fd:00 1330574                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_collections.so
7ff38166c000-7ff38166d000 r--p 00007000 fd:00 1330574                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_collections.so
7ff38166d000-7ff38166f000 rw-p 00008000 fd:00 1330574                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_collections.so
7ff38166f000-7ff381672000 r-xp 00000000 fd:00 1330548                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_heapq.so
7ff381672000-7ff381871000 ---p 00003000 fd:00 1330548                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_heapq.so
7ff381871000-7ff381872000 r--p 00002000 fd:00 1330548                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_heapq.so
7ff381872000-7ff381874000 rw-p 00003000 fd:00 1330548                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_heapq.so
7ff381874000-7ff38187d000 r-xp 00000000 fd:00 1330564                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/operator.so
7ff38187d000-7ff381a7c000 ---p 00009000 fd:00 1330564                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/operator.so
7ff381a7c000-7ff381a7d000 r--p 00008000 fd:00 1330564                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/operator.so
7ff381a7d000-7ff381a7f000 rw-p 00009000 fd:00 1330564                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/operator.so
7ff381a7f000-7ff381aff000 rw-p 00000000 00:00 0
7ff381b2e000-7ff381c6f000 rw-p 00000000 00:00 0
7ff381c6f000-7ff381c7a000 r-xp 00000000 fd:00 1330523                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/itertools.so
7ff381c7a000-7ff381e79000 ---p 0000b000 fd:00 1330523                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/itertools.so
7ff381e79000-7ff381e7a000 r--p 0000a000 fd:00 1330523                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/itertools.so
7ff381e7a000-7ff381e7f000 rw-p 0000b000 fd:00 1330523                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/itertools.so
7ff381e7f000-7ff38215a000 r--p 00000000 fd:00 5390392                   
/usr/lib/locale/locale-archive
7ff38215a000-7ff38215e000 r-xp 00000000 fd:00 1330549                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_locale.so
7ff38215e000-7ff38235d000 ---p 00004000 fd:00 1330549                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_locale.so
7ff38235d000-7ff38235e000 r--p 00003000 fd:00 1330549                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_locale.so
7ff38235e000-7ff38235f000 rw-p 00004000 fd:00 1330549                   
/home/gps/.pyenv/versions/2.7.12/lib/python2.7/lib-dynload/_locale.so
7ff38235f000-7ff38251c000 r-xp 00000000 fd:00 2364997                   
/lib/x86_64-linux-gnu/libc-2.24.so
7ff38251c000-7ff38271c000 ---p 001bd000 fd:00 2364997                   
/lib/x86_64-linux-gnu/libc-2.24.so
7ff38271c000-7ff382720000 r--p 001bd000 fd:00 2364997                   
/lib/x86_64-linux-gnu/libc-2.24.so
7ff382720000-7ff382722000 rw-p 001c1000 fd:00 2364997                   
/lib/x86_64-linux-gnu/libc-2.24.so
7ff382722000-7ff382726000 rw-p 00000000 00:00 0
7ff382726000-7ff38282e000 r-xp 00000000 fd:00 2365001                   
/lib/x86_64-linux-gnu/libm-2.24.so
7ff38282e000-7ff382a2d000 ---p 00108000 fd:00 2365001                   
/lib/x86_64-linux-gnu/libm-2.24.so
7ff382a2d000-7ff382a2e000 r--p 00107000 fd:00 2365001                   
/lib/x86_64-linux-gnu/libm-2.24.so
7ff382a2e000-7ff382a2f000 rw-p 00108000 fd:00 2365001                   
/lib/x86_64-linux-gnu/libm-2.24.so
7ff382a2f000-7ff382a31000 r-xp 00000000 fd:00 2365019                   
/lib/x86_64-linux-gnu/libutil-2.24.so
7ff382a31000-7ff382c30000 ---p 00002000 fd:00 2365019                   
/lib/x86_64-linux-gnu/libutil-2.24.so
7ff382c30000-7ff382c31000 r--p 00001000 fd:00 2365019                   
/lib/x86_64-linux-gnu/libutil-2.24.so
7ff382c31000-7ff382c32000 rw-p 00002000 fd:00 2365019                   
/lib/x86_64-linux-gnu/libutil-2.24.so
7ff382c32000-7ff382c35000 r-xp 00000000 fd:00 2365000                   
/lib/x86_64-linux-gnu/libdl-2.24.so
7ff382c35000-7ff382e34000 ---p 00003000 fd:00 2365000                   
/lib/x86_64-linux-gnu/libdl-2.24.so
7ff382e34000-7ff382e35000 r--p 00002000 fd:00 2365000                   
/lib/x86_64-linux-gnu/libdl-2.24.so
7ff382e35000-7ff382e36000 rw-p 00003000 fd:00 2365000                   
/lib/x86_64-linux-gnu/libdl-2.24.so
7ff382e36000-7ff382e4e000 r-xp 00000000 fd:00 2365014                   
/lib/x86_64-linux-gnu/libpthread-2.24.so
7ff382e4e000-7ff38304e000 ---p 00018000 fd:00 2365014                   
/lib/x86_64-linux-gnu/libpthread-2.24.so
7ff38304e000-7ff38304f000 r--p 00018000 fd:00 2365014                   
/lib/x86_64-linux-gnu/libpthread-2.24.so
7ff38304f000-7ff383050000 rw-p 00019000 fd:00 2365014                   
/lib/x86_64-linux-gnu/libpthread-2.24.so
7ff383050000-7ff383054000 rw-p 00000000 00:00 0
7ff383054000-7ff383079000 r-xp 00000000 fd:00 2359690                   
/lib/x86_64-linux-gnu/ld-2.24.so
7ff3830ad000-7ff38316d000 rw-p 00000000 00:00 0
7ff38319e000-7ff383260000 rw-p 00000000 00:00 0
7ff383275000-7ff383276000 rw-p 00000000 00:00 0
7ff383276000-7ff383279000 rw-p 00000000 00:00 0
7ff383279000-7ff38327a000 r--p 00025000 fd:00 2359690                   
/lib/x86_64-linux-gnu/ld-2.24.so
7ff38327a000-7ff38327b000 rw-p 00026000 fd:00 2359690                   
/lib/x86_64-linux-gnu/ld-2.24.so
7ff38327b000-7ff38327c000 rw-p 00000000 00:00 0
7ffc2f2b2000-7ffc2f2d3000 rw-p 00000000 00:00 0                         
[stack]
7ffc2f336000-7ffc2f338000 r--p 00000000 00:00 0                          [vvar]
7ffc2f338000-7ffc2f33a000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                 
[vsyscall]

Note that the crash occurs in clone() -> PyOS_AfterFork -> PyThread_ReInitTLS.
So this is after some Python process forks.

Relevant code in Python/thread.c for 2.7.12 (code is nearly unchanged in 3.6):

/* Forget everything not associated with the current thread id.
 * This function is called from PyOS_AfterFork().  It is necessary
 * because other thread ids which were in use at the time of the fork
 * may be reused for new threads created in the forked process.
 */
void
PyThread_ReInitTLS(void)
{
    long id = PyThread_get_thread_ident();
    struct key *p, **q;

    if (!keymutex)
        return;

    /* As with interpreter_lock in PyEval_ReInitThreads()
       we just create a new lock without freeing the old one */
    keymutex = PyThread_allocate_lock();

    /* Delete all keys which do not match the current thread id */
    q = &keyhead;
    while ((p = *q) != NULL) {
        if (p->id != id) {
            *q = p->next;
            free((void *)p);
            /* NB This does *not* free p->value! */
        }
        else
            q = &p->next;
    }
}


This feels like a race condition in CPython. How I managed to trigger it, I
don't know.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list