[haiku-bugs] Re: [Haiku] #10898: [package_daemon] crash in Volume::HandleGetLocationInfoRequest()

  • From: "throttle10" <trac@xxxxxxxxxxxx>
  • Date: Thu, 29 Jun 2017 07:50:03 -0000

#10898: [package_daemon] crash in Volume::HandleGetLocationInfoRequest()
--------------------------------------+---------------------------------
   Reporter:  diver                   |      Owner:  bonefish
       Type:  bug                     |     Status:  new
   Priority:  normal                  |  Milestone:  R1
  Component:  Servers/package_daemon  |    Version:  R1/Development
 Resolution:                          |   Keywords:
 Blocked By:                          |   Blocking:  11327, 12232, 13539
Has a Patch:  1                       |   Platform:  All
--------------------------------------+---------------------------------

Comment (by throttle10):

 This is the problem:

- If isActive is false, it means the active state is unchanged, and the
 latest is being replaced. If the latest was the same as the active, then
 we can get into a problem (we will delete the active state while it is
 still referenced).

 If we update system packages, isActive = false. package_daemon deletes
 fLatestState. If fActiveState == fLatestState, fActiveState = NULL.
 Next time iterating volume, package_manage crashing, because it uses
 fActiveState for iterating volume (start HaikuDepot).

 If we restart package_manager, or reboot haiku, it's not reproduced.

 P.S. sorry for my bad english.

--
Ticket URL: <https://dev.haiku-os.org/ticket/10898#comment:9>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: