Hello,
I support a product that has a feature where it basically creates a snapshot of as many databases as a customer desires at a certain schedule. Part of this process uses the CREATE MANIFEST command. We see that when multiple threads are each issuing the CREATE MANIFEST command simultaneously, there is a deadlock error and one ASE spid will hang forever.
Adaptive Server Enterprise/15.7.0/EBF 20308 SMP ESD#01 Refresh#2/P/Solaris AMD64/OS 5.10/ase157esd1refresh2/2927/64-bit/FBO/Fri Jun 22 05:52:58 2012
To reproduce this, I create a script that tries to create some manifest files:
$ cat manifest.sql
select 'Begin...'
go
declare @i int
select @i=1
while (@i=1)
begin
create manifest file Vmarket to "/tmp/Vmarket.manifest"
create manifest file neal to "/tmp/neal.manifest"
create manifest file Vneal to "/tmp/Vneal.manifest"
create manifest file Vpubs2 to "/tmp/Vpubs2.manifest"
select @i
end
go
NOTE: All databases are using their own devices
Then I start two ISQL sessions to simulate two threads running at the same time (my product could have N threads for N databases running the CREATE MANIFEST command at the same time).
One will be blocked indefinetly:
isql -SSRC_157_4K -Usa -Psybase -w 220 -i manifest.sql -t 300
--------
Begin...
(1 row affected)
CT-LIBRARY error:
ct_results(): user api layer: internal Client Library error: Read from the server has timed out.
The other will get deadlock messages:
$ isql -SSRC_157_4K -Usa -Psybase -w 220 -i manifest.sql -t 300
(1 row affected)
-----------
1
(1 row affected)
Msg 1205, Level 13, State 1:
Server 'SRC_157_4K', Line 10:
Your server command (family id #0, process id #22) encountered a deadlock situation. Please re-run your command.
Msg 14533, Level 17, State 5:
Server 'SRC_157_4K', Line 10:
CREATE MANIFEST_FILE could not acquire '
Invalid pointer param number 3, pointer value 0x1
' lock needed for this command.
Is this a known issue that might be fixed in more recent versions of ASE?
Thanks,
Neal