← Back to team overview

dx-packages team mailing list archive

[Bug 1244244] [NEW] libdbusmenu crashes in prop_array_teardown

 

Public bug reported:

It is possible that this issue has the same cause as the #837009. I am
not sure about it, so I am creating another one.

I have attached a stack trace. The problem is in prop_array. On widow
closing, in my particular case functions are invoked in the next order

1. Check in menuitem_property_idle that priv->prop_array is not NULL
2. Entering dbusmenu_server_dispose
3. Deallocation of  priv->prop_array and assigning NULL to it
3. Exiting dbusmenu_server_dispose
4. Entering dbusmenu_server_finalize
5. Exiting dbusmenu_server_finalize
6. Invoking  prop_array_teardown that accesses priv->prop_array->len which has been deallocated in #3

As a simple fix I would think about checking of the array for NULL in
the beginning of prop_array_teardown.  But I found that in my case the
prop array is invoked from different threads (I used (pid_t) syscall
(SYS_gettid) to compare the thread ids). By this reason, it seems the
code needs better synchronization.

Please let me know if I can disable multithreading for the library or
may be I use libdbusmenu incorrectly.

Actually the problem happens in Intellij IDEA when I am trying to use
Jayatana library which is written on top of Ayatana library. This issue
is a stopper for using Unity menu.

My environment is Ubuntu 13.04

I can provide a dump as well.

** Affects: libdbusmenu (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "Stacktrace.txt"
   https://bugs.launchpad.net/bugs/1244244/+attachment/3889763/+files/Stacktrace.txt

** Package changed: indicator-messages (Ubuntu) => libdbusmenu (Ubuntu)

-- 
You received this bug notification because you are a member of DX
Packages, which is subscribed to indicator-messages in Ubuntu.
Matching subscriptions: dx-packages, dx-packages
https://bugs.launchpad.net/bugs/1244244

Title:
  libdbusmenu crashes in prop_array_teardown

Status in “libdbusmenu” package in Ubuntu:
  New

Bug description:
  It is possible that this issue has the same cause as the #837009. I am
  not sure about it, so I am creating another one.

  I have attached a stack trace. The problem is in prop_array. On widow
  closing, in my particular case functions are invoked in the next order

  1. Check in menuitem_property_idle that priv->prop_array is not NULL
  2. Entering dbusmenu_server_dispose
  3. Deallocation of  priv->prop_array and assigning NULL to it
  3. Exiting dbusmenu_server_dispose
  4. Entering dbusmenu_server_finalize
  5. Exiting dbusmenu_server_finalize
  6. Invoking  prop_array_teardown that accesses priv->prop_array->len which has been deallocated in #3

  As a simple fix I would think about checking of the array for NULL in
  the beginning of prop_array_teardown.  But I found that in my case the
  prop array is invoked from different threads (I used (pid_t) syscall
  (SYS_gettid) to compare the thread ids). By this reason, it seems the
  code needs better synchronization.

  Please let me know if I can disable multithreading for the library or
  may be I use libdbusmenu incorrectly.

  Actually the problem happens in Intellij IDEA when I am trying to use
  Jayatana library which is written on top of Ayatana library. This
  issue is a stopper for using Unity menu.

  My environment is Ubuntu 13.04

  I can provide a dump as well.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/1244244/+subscriptions


Follow ups

References