[Bug 1926298] Re: Segfault added in the recent changes

Dan Bungert 1926298 at bugs.launchpad.net
Thu Apr 29 23:54:12 UTC 2021


** Description changed:

+ [Impact]
+ 
+ On Hirsute/Impish, update-notifier can crash when attempting to run
+ hooks.
+ 
+ [Test Case]
+ 
+ Create a file 'bug'
+ 
+ 'Name: bug
+ Priority: Low
+ Command: "/bin/true"
+ DisplayIf: /bin/true
+ Description: update notifier bug'
+ 
+ and copy it to /var/lib/update-notifier/user.d
+ 
+ [Where problems could occur]
+ 
+ This is not the most absolute minimal version of this fix.
+ If the minimal version of the fix is desired, I can provide that, which should be a +2/-2 diff.
+ The fix changeset includes other glib usage improvements which sound good from a maintainability perspective and may even close other yet unknown bugs but add their own risk of regressions if said maintainability was not done correctly.
+ 
+ [Original Bug Report Description]
+ 
  The issue is new using https://code.launchpad.net/~dbungert/update-
  notifier/+git/update-notifier/+merge/397367 , the previous revision
  didn't have the issue
  
  * Create a file 'bug'
  
  'Name: bug
  Priority: Low
  Command: "/bin/true"
  DisplayIf: /bin/true
  Description: update notifier bug'
  
  and copy it to /var/lib/update-notifier/user.d
  
  ->  update-notifier segfaults
  
  (gdb) bt
  #0  0x00007ffff718c769 in __GI___libc_free (mem=0x5550000aa7f9) at malloc.c:3288
  #1  0x00007ffff7365215 in g_strfreev (str_array=<optimized out>) at ../../../glib/gstrfuncs.c:2553
  #2  g_strfreev (str_array=0x5555555d9e00) at ../../../glib/gstrfuncs.c:2546
  #3  0x000055555555dd2d in hook_command_exists (cmd=0x555555702600 "\"/usr/bin/eog\"") at hooks.c:137
  #4  0x000055555555fd6e in is_hook_relevant (hook_file=0x555555829e7b "apt-file.update-notifier")
-     at hooks.c:717
+     at hooks.c:717
  #5  0x000055555555ffb1 in check_update_hooks (ta=0x5555556c9a20) at hooks.c:781
  #6  0x0000555555560715 in hook_tray_icon_init (ta=0x5555556c9a20) at hooks.c:969
- #7  0x000055555555cd77 in tray_icons_init (un=0x55555562c3e0, 
+ #7  0x000055555555cd77 in tray_icons_init (un=0x55555562c3e0,
  
+ It seems likely to be the error on top of the weekly report for hirsute
+ but that's missing a stacktrace
  
- It seems likely to be the error on top of the weekly report for hirsute but that's missing a stacktrace
- 
- 
- One comment in addition on the change there, was the env split + iterate over pathdirs basically a re-implementation of https://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-find-program-in-path ? If there is particular reason to do that I would recommend just using the glib function instead (which might also fix the issue as a side effect, I didn't check)
+ One comment in addition on the change there, was the env split + iterate
+ over pathdirs basically a re-implementation of
+ https://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-
+ Functions.html#g-find-program-in-path ? If there is particular reason to
+ do that I would recommend just using the glib function instead (which
+ might also fix the issue as a side effect, I didn't check)

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1926298

Title:
  Segfault added in the recent changes

Status in update-notifier package in Ubuntu:
  Confirmed
Status in update-notifier source package in Hirsute:
  New

Bug description:
  [Impact]

  On Hirsute/Impish, update-notifier can crash when attempting to run
  hooks.

  [Test Case]

  Create a file 'bug'

  'Name: bug
  Priority: Low
  Command: "/bin/true"
  DisplayIf: /bin/true
  Description: update notifier bug'

  and copy it to /var/lib/update-notifier/user.d

  [Where problems could occur]

  This is not the most absolute minimal version of this fix.
  If the minimal version of the fix is desired, I can provide that, which should be a +2/-2 diff.
  The fix changeset includes other glib usage improvements which sound good from a maintainability perspective and may even close other yet unknown bugs but add their own risk of regressions if said maintainability was not done correctly.

  [Original Bug Report Description]

  The issue is new using https://code.launchpad.net/~dbungert/update-
  notifier/+git/update-notifier/+merge/397367 , the previous revision
  didn't have the issue

  * Create a file 'bug'

  'Name: bug
  Priority: Low
  Command: "/bin/true"
  DisplayIf: /bin/true
  Description: update notifier bug'

  and copy it to /var/lib/update-notifier/user.d

  ->  update-notifier segfaults

  (gdb) bt
  #0  0x00007ffff718c769 in __GI___libc_free (mem=0x5550000aa7f9) at malloc.c:3288
  #1  0x00007ffff7365215 in g_strfreev (str_array=<optimized out>) at ../../../glib/gstrfuncs.c:2553
  #2  g_strfreev (str_array=0x5555555d9e00) at ../../../glib/gstrfuncs.c:2546
  #3  0x000055555555dd2d in hook_command_exists (cmd=0x555555702600 "\"/usr/bin/eog\"") at hooks.c:137
  #4  0x000055555555fd6e in is_hook_relevant (hook_file=0x555555829e7b "apt-file.update-notifier")
      at hooks.c:717
  #5  0x000055555555ffb1 in check_update_hooks (ta=0x5555556c9a20) at hooks.c:781
  #6  0x0000555555560715 in hook_tray_icon_init (ta=0x5555556c9a20) at hooks.c:969
  #7  0x000055555555cd77 in tray_icons_init (un=0x55555562c3e0,

  It seems likely to be the error on top of the weekly report for
  hirsute but that's missing a stacktrace

  One comment in addition on the change there, was the env split +
  iterate over pathdirs basically a re-implementation of
  https://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-
  Functions.html#g-find-program-in-path ? If there is particular reason
  to do that I would recommend just using the glib function instead
  (which might also fix the issue as a side effect, I didn't check)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1926298/+subscriptions



More information about the Ubuntu-sponsors mailing list