Ticket #885 (reopened bug)

Opened 2 years ago

Last modified 12 months ago

[app_server] deadlock on font change

Reported by: diver Owned by: axeld
Priority: critical Milestone: R1
Component: Servers/app_server Version: R1 development
Cc: Blocked By:
Platform: All Blocking:

Description

I can reproduce it only on real hw now. After i compile recent haiku sources and boot it, i set resolution to 1152*864@77.1 Hzafter that i lauched Fonts from Terminal and changed default to DjVu font (as it support cyrillic glyphs), a second later app_server freezed.

Change History

Changed 2 years ago by axeld

  • priority changed from normal to critical

Bug #893 is a duplicate of this one.

Changed 2 years ago by jackburton

Axel, I might be wrong, but the case for AS_SET_SYSTEM_FONT, in ServerApp, looks suspicious.

There we acquire the gFontManager lock, then we instantiate a LockedDesktopSettings, which in turn tries to acquire the gFontManager lock again (in DesktopSettingsPrivate::_Load()).

Changed 2 years ago by axeld

  • status changed from new to closed
  • resolution set to fixed

While AS_SET_SYSTEM_FONT was indeed to blame, DesktopSettingsPrivate::_Load() was not called in this context. However, ServerFont::SetFamilyAndStyle() implicitly locks the font manager, and thus, it dead locked with the case above: you must not hold the font manager lock when locking the desktop. Fixed in r19051.

Changed 12 months ago by diver

  • status changed from closed to reopened
  • resolution fixed deleted

Happens again 2 times in r22510, reopening.

Changed 12 months ago by diver

I could reproduce this deadlock by changing Bold Font 2-20 times.

Note: See TracTickets for help on using tickets.