#210 Engine deadlock during checkpoint

closed-fixed
1
2011-06-18
2009-05-01
podvav
No

bug: http://sourceforge.net/tracker/?func=detail&aid=2748412&group_id=23316&atid=378131

There's a circular dependency between Database and Logger, since both have own locks deadlocks can occur

updated Database::getFileAccess():
rev 2979, lines 825-827:
public synchronized FileAccess getFileAccess() {
return fileaccess;
}
proposed:
public FileAccess getFileAccess()
{
synchronized( fileaccess )
{
return fileaccess;
}
}

Suggested code change fixes the problem while preserving semantics, however I wonder whether it needs a critical section at all: FileAccess has no state -- shouldn't all the methods be static (or controlled by the caller)?

thank you

Discussion

  • podvav
    podvav
    2009-05-01

    updated version

     
    Attachments
  • Fred Toussi
    Fred Toussi
    2009-05-21

    Thanks, FileAccess methods were changed for security reasons. Will review usage of synchronized.

     
  • Fred Toussi
    Fred Toussi
    2009-09-20

    • status: open --> closed-fixed
     
  • Fred Toussi
    Fred Toussi
    2011-06-18

    • priority: 5 --> 1