Problem with inn_lock_range

Sang-yong Suh sysuh at kigam.re.kr
Thu Dec 19 07:24:07 UTC 2002


On Thu, Dec 19, 2002 at 03:57:42AM -0000, Kiernan, Alex wrote:
> 
> I've been staring at the buffindexed problems and, at least on Solaris, I
> think I know why its broken - inn_lock_range doesn't work for files which
> are mmaped. Basically all the fcntl(F_SETLKW) return EAGAIN, because:
> 
> "    The fcntl() function will fail if:
> 
>      EAGAIN
> ...
>            or the cmd argument
>            is F_SETLK, F_SETLK64, F_SETLKW, or F_SETLKW64, manda-
>            tory file/record locking  is  set,  and  the  file  is
>            currently   being   mapped  to  virtual  memory  using
>            mmap(2).
> "

The situation is same for Linux:

       EAGAIN   Operation is prohibited because the file has been
                memory-mapped by another process.

By the way, Linux gives no error(even EAGAIN) to LockRange at all.
However, I am encountering streams of duplicated block allocation events.
I am appending two syslog type trace results of buffindexed, run01 and
run02.  The first one is before lock_update, and the second one is
after lock_update.
--
sysuh

yfs:~/tmp$ wc -l run.*/dup.log
    471 run.01/dup.log
    678 run.02/dup.log
   1149 total

yfs:~/tmp$ more run.01/dup.log
Dec 18 00:00:53 expireover[4889] group 0x00007303 block (0,2922) allocated
Dec 18 00:00:53 innd[1091] group 0x00007303 block (0,2922) allocated
Dec 18 01:06:50 expireover[4889] group 0x00007303 block (0,2922) released

Dec 18 00:03:39 expireover[4889] group 0x00001f5e block (0,58825) allocated
Dec 18 00:03:39 innd[1091] group 0x00001f5e block (0,58825) allocated
Dec 18 00:47:04 expireover[4889] group 0x00001f5e block (0,58825) released

Dec 18 00:03:47 expireover[4889] group 0x000050fe block (1,60457) allocated
Dec 18 00:03:47 innd[1091] group 0x000050fe block (1,60457) allocated
Dec 18 00:59:39 expireover[4889] group 0x000050fe block (1,60457) released

Dec 18 00:03:51 expireover[4889] group 0x00001085 block (0,63977) allocated
Dec 18 00:03:51 innd[1091] group 0x00001085 block (0,63977) allocated
Dec 18 00:29:52 expireover[4889] group 0x00001085 block (0,63977) released
Dec 18 00:45:50 expireover[4889] group 0x00001cad block (0,63977) allocated

Dec 17 16:03:32 makehistory[32596] group 0x000000f7 block (1,73505) allocated
Dec 18 00:02:38 expireover[4889] group 0x000000f7 block (1,73505) released
Dec 18 00:04:16 innd[1091] group 0x00001f0a block (1,73505) allocated
Dec 18 00:04:16 expireover[4889] group 0x00001f0a block (1,73505) allocated
Dec 18 00:46:59 expireover[4889] group 0x00001f0a block (1,73505) released
Dec 18 00:53:13 expireover[4889] group 0x0000296c block (1,73505) allocated

yfs:~/tmp$ more run.02/dup.log
Dec 19 00:07:09 expireover[16111] group 0x000002f4 block (0,116489) allocated
Dec 19 00:07:09 innd[12285] group 0x000079e7 block (0,116489) allocated

Dec 18 18:40:47 overchan[11902] group 0x00000101 block (0,128804) allocated
Dec 19 00:03:03 expireover[16111] group 0x00000101 block (0,128804) released
Dec 19 00:07:49 innd[12285] group 0x00007a0b block (0,128804) allocated
Dec 19 00:07:49 expireover[16111] group 0x000002ff block (0,128804) allocated

Dec 19 00:08:19 expireover[16111] group 0x00000f4b block (0,135721) allocated
Dec 19 00:08:19 innd[12285] group 0x00000f4b block (0,135721) allocated
Dec 19 00:20:40 expireover[16111] group 0x00000f4b block (0,135721) released

Dec 19 00:09:27 expireover[16111] group 0x0000034c block (0,166985) allocated
Dec 19 00:09:27 innd[12285] group 0x0000962b block (0,166985) allocated

Dec 18 18:44:15 overchan[11902] group 0x00000037 block (1,172260) allocated
Dec 19 00:01:55 expireover[16111] group 0x00000037 block (1,172260) released
Dec 19 00:09:39 expireover[16111] group 0x0000036d block (1,172260) allocated
Dec 19 00:09:39 innd[12285] group 0x0000b4aa block (1,172260) allocated

Dec 18 18:44:20 overchan[11902] group 0x000002f4 block (1,174884) allocated
Dec 19 00:07:12 expireover[16111] group 0x000002f4 block (1,174884) released
Dec 19 00:09:45 innd[12285] group 0x000072e1 block (1,174884) allocated




More information about the inn-workers mailing list