On Fri, 28 Apr 2006, Theo Schlossnagle wrote:

The file that uses the spinlocks:
/src/backend/storage/lmgr/s_lock.c

can be compiled standalone with -DS_LOCK_TEST


To get the test to compile I had to link in tas.o as the attached patch shows. Unfortunately this doesn't work for platforms that don't have a tas.o, bailing out with file not found. Perhaps it's not important to fix this test, but I thought I'd mention it.

Anyway the test exits with

Stuck spinlock (80618e9) detected at ./s_lock.c:355.

on a linux gcc build this exits with

Stuck spinlock (0x5013ad) detected at ./s_lock.c:402.

Kris Jurka
? src/backend/storage/lmgr/s_lock_test
Index: src/backend/storage/lmgr/Makefile
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/storage/lmgr/Makefile,v
retrieving revision 1.20
diff -c -r1.20 Makefile
*** src/backend/storage/lmgr/Makefile   7 Oct 2004 00:08:04 -0000       1.20
--- src/backend/storage/lmgr/Makefile   28 Apr 2006 21:13:52 -0000
***************
*** 21,26 ****
--- 21,27 ----
  
  s_lock_test: s_lock.c $(top_builddir)/src/port/libpgport.a
        $(CC) $(CPPFLAGS) $(CFLAGS) -DS_LOCK_TEST=1 $(srcdir)/s_lock.c \
+               $(top_builddir)/src/backend/port/tas.o \
                -L $(top_builddir)/src/port -lpgport -o s_lock_test
  
  check: s_lock_test
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to