Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] CDI debugger deadlock issue

Hi,

I have a quick question about CDI debugger commands and target synchronization. I'm issuing a debugger command from my plug-in as follows:

                synchronized (target.getLock()) {
                    if (target.isTerminated() || !target.isSuspended()
                            || target.isRunning()) {
                        return;
                    }           
                    session.postCommand(cmd);
                    ...

What seems to be happening is the target itself does not grab the lock when it issues it's own commands, so immediately after I've checked that the target is suspended, it issues a continue and begins running again, causing deadlock when I call postCommand().

Has this been seen before and is there a recommended solution?

Thanks,
Mike

Back to the top