This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v11] Add pretty printers for the NPTL lock types


2016-12-23 16:37 GMT-03:00 Martin Galvan <omgalvan.86@gmail.com>:
> 2016-12-23 15:47 GMT-03:00 Torvald Riegel <triegel@redhat.com>:
>>   Status = Locked, possibly with no waiters, Owner ID = 0, Robust = No,
>
> That's odd, IIRC locked mutexes always record their owner's ID. I
> assume manually printing mutex->__data.__owner at that point shows 0
> too, right?

I've done some more testing and still can't reproduce the error. I've
tried using gdb 7.12 (sources downloaded from the GNU FTP site) and
Python 2.7.5 on Ubuntu 16.04, x86_64. gdb -configure shows:

This GDB was configured as follows:
   configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=/home/martin/Documents/gdb-7.12/install/share/gdb
(relocatable)
             --with-jit-reader-dir=/home/martin/Documents/gdb-7.12/install/lib/gdb
(relocatable)
             --without-libunwind-ia64
             --without-lzma
             --with-python=/home/martin/Documents/python-2.7.5/install
             --without-guile
             --with-separate-debug-dir=/home/martin/Documents/gdb-7.12/install/lib/debug
(relocatable)
             --without-babeltrace

I set LD_LIBRARY_PATH to the Python 2.7.5 lib install path so that gdb
would pick the correct libpython2.7.so. I can post the output of gdb's
python's sysconfig.get_config_vars(), though it's quite verbose.

In any case, manually running gdb and stepping through the target
until line 80 (after locking the non-robust mutex, which is where I'm
assuming the test fails) still shows mutex->__data.__owner as being
the owner's TID.

Perhaps it would be useful to see what the mutex's member values are
in your case. At one point I thought your mutex might've been showing
all zeroes, but at least __data.__lock must be non-zero for it to show
as locked. Any other info that could help me reproduce the error is
welcome.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]