Jeff Trawick wrote:
testshm failing for me with 1.2.x but not 1.2.11 Line 254: Error destroying shared memory block (22): Invalid argument (new code added to testshm.c after 1.2.11) Maybe I can look further tonight...
Hmmm. I believe this has detected a real flaw ;-) We need to gracefully release the now-removed shm without complaining that we cannot find it to remove it, unless apr_shm_create -> apr_shm_remove -> release (either pool cleanup, or apr_shm_destroy) is a completely invalid construct, in which case this entire test was bogus initially. But I think we want to support the behavior; we need to ensure the remove is the very final act of apr_shm_destroy/cleanup. And decide if we should ignore the error 2 (what I see on linux), error 22 (what you observe on hp) as part of the cleanup, or return it to the caller and document the anomily. My hunch is that the rv's at lines 52 and 73 of shmem/unix/shm.c should simply be ignored. OR we can unset shm_t's filename* to NULL on shm_remove, but that requires a careful audit that the proper cleanup procedure will still result from the internal call to shm_cleanup_owner. In fact - this test could have gone one step further, and proven by removing shm before shm2 that we have messed up the unlinking of the multiple instances of the same named resource. This flaw is significant. Need a fast solution. Thoughts? Bill
