apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Failure with testshm
Date Fri, 23 May 2008 14:31:43 GMT
After running make check on APR trunk after quite a while I detected
that testshm fails on Linux with one failure:

testshm             : -Line 254: Error destroying shared memory block (2): No such file or
directory

FAILED 1 of 6
Failed Tests            Total   Fail    Failed %
===================================================
testshm                     6      1     16.67%


I am not sure if this is a regression or not or if this is a bug in
APR itself or in the test. The problem seems to be that

       rv = apr_shm_destroy(shm2);

line 249 of testshm.c and

     rv = apr_shm_destroy(shm);

in line 253 of testshm.c.

unlink the same file. The second time this fails because the file is already gone:


5114  open("data/apr.testshm.shm", O_WRONLY|O_LARGEFILE) = 3
5114  stat64("data/apr.testshm.shm", {st_dev=makedev(254, 9), st_ino=238840, st_mode=S_IFREG|0640,
st_nlink=1, 
st_uid=500, st_gid=100, st_blks
ize=4096, st_blocks=8, st_size=4, st_atime=2008/05/23-16:26:28, st_mtime=2008/05/23-16:26:28,

st_ctime=2008/05/23-16:26:28}) = 0
5114  close(3) = 0
5114  shmget(0x109a4f8, 0, 0600) = 11829250
5114  shmctl(11829250, IPC_64|IPC_RMID, 0) = 0
5114  unlink("data/apr.testshm.shm") = 0
5114  open("data/apr.testshm.shm", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = 3
5114  stat64("data/apr.testshm.shm", {st_dev=makedev(254, 9), st_ino=238840, st_mode=S_IFREG|0640,
st_nlink=1, 
st_uid=500, st_gid=100, st_blks
ize=4096, st_blocks=0, st_size=0, st_atime=2008/05/23-16:26:28, st_mtime=2008/05/23-16:26:28,

st_ctime=2008/05/23-16:26:28}) = 0
5114  shmget(0x109a4f8, 10280, IPC_CREAT|IPC_EXCL|0600) = 11862019
5114  shmat(11862019, 0, 0) = 0xb7f16000
5114  shmctl(11862019, IPC_64|IPC_STAT, 0xbff0e458) = 0
5114  getuid32() = 500
5114  getgid32() = 100
5114  shmctl(11862019, IPC_64|IPC_SET, 0xbff0e458) = 0
5114  write(3, "((\0\0", 4) = 4
5114  close(3) = 0
5114  write(1, "\10\\", 2) = 2

rv = apr_shm_destroy(shm2):

5114  shmctl(11862019, IPC_64|IPC_RMID, 0) = 0
5114  shmdt(0xb7f16000) = 0
5114  unlink("data/apr.testshm.shm") = 0

rv = apr_shm_destroy(shm):

5114  shmctl(11829250, IPC_64|IPC_RMID, 0) = 0
5114  shmdt(0xb7f19000) = 0
5114  unlink("data/apr.testshm.shm") = -1 ENOENT (No such file or directory)

Both shared memory segments have different shm ids but are using the same file.

Regards

RĂ¼diger




Mime
View raw message