All threads are blocked

Item Value
SQLCODE -307
Constant SQLE_THREAD_DEADLOCK
SQLSTATE 40W06
Sybase error code 1205
ODBC 2 State 40001
ODBC 3 State 40001

Probable cause 

You attempted to read or write a row and it is locked by another user. Also, all other threads (see the -gn server option) are blocked waiting for a lock to be released. This is a deadlock situation and your transaction has been chosen as the one to rollback.